On Sun, 2010-10-17 at 00:37 +0300, Juha Manninen (gmail) wrote:
> On Saturday 16 October 2010 19:56:28 Joost van der Sluis wrote:
> > > > So if you really can't do without, just switch to Fedora and you're
> > > > done. ;)
> > >
> > > Wow!
> > > How to generate Dwarf-3 debug info?
> >
> > -gw3
>
> I updated the latest FPC trunk version.
> >From a simple test program I get:
>
> unit1.pas:(.debug_info+0x94): undefined reference to `DBG_FORMS_TForm'
> unit1.pas:(.debug_info+0xab): undefined reference to `DBG_STDCTRLS_TButton'
>
> when built with -gw3. I have Fedora 13 but it is 64 bit system.
> -gw (without 3) works as before.
I also work on a 64 but system. You're sure you used fpc 2.5.1? And that
you disabled smart-linking?
I used attached program to test gdb. (place breakpoint at second
position and do a 'p s[2]')
Joost.
{
Copyright 2008, 2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
}
program arrays;
{$mode objfpc}{$h+}
uses sysutils;
type TStatArrInt= array[0..11] of integer;
TDynArrInt= array of integer;
TStatArrStr= array[0..12] of string;
TDynArrStr= array of string;
TDynArrChar = array of char;
TStatArrChar = array [0..11] of char;
TStat2dArrInt = array[0..11,0..4] of integer;
var StatArrInt: TStatArrInt;
StatArrInt_: Array[0..11] of integer;
DynArrInt: TDynArrInt;
DynArrInt_: Array of integer;
StatArrStr: TStatArrStr;
DynArrStr: TDynArrStr;
StatArrChar: TStatArrChar;
test: array[1..8] of char;
DynArrChar: TDynArrChar;
Stat2dArrInt: TStat2dArrInt;
s: string;
i,j : integer;
begin
for i := 0 to 11 do
begin
StatArrInt[i]:= i+50;
StatArrInt_[i]:= i+50;
StatArrChar[i]:= chr(ord('a')+i);
for j := 0 to 4 do
Stat2dArrInt[i,j]:=i+j;
end;
writeln(StatArrInt_[0]);
writeln(StatArrInt[0]); { set breakpoint 1 here }
writeln(StatArrChar[0]);
writeln(Stat2dArrInt[0,0]);
test[8] := 'a';
setlength(DynArrInt,13);
setlength(DynArrInt_,13);
setlength(DynArrStr,13);
setlength(DynArrChar,13);
for i := 0 to 12 do
begin
DynArrInt[i]:= i+50;
DynArrInt_[i]:= i+50;
DynArrChar[i]:= chr(ord('a')+i);
StatArrStr[i]:='str'+inttostr(i);
DynArrStr[i]:='dstr'+inttostr(i);
end;
writeln(DynArrInt_[1]);
writeln(DynArrInt[1]);
writeln(DynArrStr[1]);
writeln(StatArrStr[1]);
writeln(DynArrChar[1]);
s := 'test'#0'string';
writeln(s); { set breakpoint 2 here }
DynArrStr[0]:='';
writeln(DynArrStr[0]); { set breakpoint 3 here }
end.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus