arm-elf: wrong size for "long long" - types
Bernd Geiser
bernd@berndgeiser.de
Mon Oct 27 15:57:00 GMT 2003
Hi.
When compiling a program with a "long long" variable for an arm-elf target
with gcc 3.3, I can't print these with gdb 5.3.
A quick look at the stabs shows this:
.stabs "long long int:t(0,6)=r(0,6);0;-1;",128,0,0,0
So, no size info or a value range is given. Putting sth. like
.stabs "long long int:t(0,6)=r(0,6);
001000000000000000000000;000777777777777777777777;",
128,0,0,0
by hand into the assembly file works, however.
So is the stabs broken or does gdb 5.3 have a problem? Here is a sample
debugging session with the included armulator:
(gdb) l
54 long long global=0xabcdef1234ULL;
[...]
61 int main()
62 {
[...]
70 }
(gdb) p/x global
$2 = 0xcdef1234
(gdb) p sizeof(global)
$3 = 4
(gdb) whatis global
type = long long int
(gdb) p sizeof(long long int)
$4 = 8
(gdb)
Especially the fact that $3 != $4 seems like an error to me...
regards,
Bernd
More information about the Gcc-bugs
mailing list