Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-12

win32 trunk gdb 7.2 (32bit) and qword error

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

This may well be an error in gdb, but since I can't determine where exactly the error is...:

If I debug a 32 bit app (on w32) compiled with trunk (maybe 3 weeks old), under gdb 7.2-1 and hit a qword:
Then I get the high and low 32bits swapped. so instead of a value of 1 gdb reports 0x100000000

Does anyone know if thats gdb, or something on how fpc wrote the dwarf info (-gw) ?

thanks
Martin

Reply by email

Martin
to Martin
Martin wrote 10 lines
This may well be an error in gdb, but since I can't determine where exactly the error is...: If I debug a 32 bit app (on w32) compiled with trunk (maybe 3 weeks old), under gdb 7.2-1 and hit a qword: Then I get the high and low 32bits swapped. so instead of a value of 1 gdb reports 0x100000000 Does anyone know if thats gdb, or something on how fpc wrote the dwarf info (-gw) ?

Ok, and it seems to depend on the value

139784704 / 0x854F200 => bad

139784871 / 0x854F2A7 => good

Martin

Reply by email

Jonas Maebe
to Martin: This may well be an error in gdb, but since I can't determine where exactly the error…
Martin wrote 7 lines
If I debug a 32 bit app (on w32) compiled with trunk (maybe 3 weeks old), under gdb 7.2-1 and hit a qword: Then I get the high and low 32bits swapped. so instead of a value of 1 gdb reports 0x100000000 Does anyone know if thats gdb, or something on how fpc wrote the dwarf info (-gw) ?

That sounds like a bug in that particular gdb version. It at least works fine for me with gdb 7.0.1 under Linux/i386:

$ cat tt3.pp
var
   q: qword;
begin
   q:=139784704;
end.

$ ppn12 -gw tt3.pp
Target OS: Linux for i386
Compiling tt3.pp
tt3.pp(2,3) Note: Local variable "q" is assigned but never used Linking tt3
5 lines compiled, 0.2 sec
1 note(s) issued

$ gdb tt3
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.1) Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tt3...(no debugging symbols found)...done. (gdb) b PASCALMAIN
Breakpoint 1 at 0x80480a8: file tt3.pp, line 4.
(gdb) r
Starting program: /home/jmaebe/private/nobackup/fpc/test/tt3

Breakpoint 1, main () at tt3.pp:4
4 q:=139784704;
(gdb) n
5 end.
(gdb) p q
$1 = 139784704

Jonas

Reply by email