* STABS records for 64-bit function arguments via registers in i386
@ 2010-10-13 15:19 kew
2010-10-13 16:07 ` Mark Kettenis
0 siblings, 1 reply; 2+ messages in thread
From: kew @ 2010-10-13 15:19 UTC (permalink / raw)
To: gdb
Hi
In i386 architecture (32 bit) gcc can optimize a static function to pass
function arguments via registers (instead of in the stack). For 64-bit
arguments, it uses 2 registers, but gdb reports only 1 (via "info
scope") when the binary being debugged is compiled using the STABS
debugging format.
I checked using objdump and could see indeed only 1 N_RSYM record being
given (so no wonder gdb would only report 1 register).
How does the STABS debugging format indicate the 2 registers used for
passing 64 function arguments in i386 architecture? Is this supported?
If not, what's the process to add support for it?
If this is not the right mailing list to ask this question, sorry and
please if you could refer me to the right mailing list, I'd appreciate it.
Thanks
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: STABS records for 64-bit function arguments via registers in i386
2010-10-13 15:19 STABS records for 64-bit function arguments via registers in i386 kew
@ 2010-10-13 16:07 ` Mark Kettenis
0 siblings, 0 replies; 2+ messages in thread
From: Mark Kettenis @ 2010-10-13 16:07 UTC (permalink / raw)
To: kew; +Cc: gdb
> Date: Wed, 13 Oct 2010 11:08:19 -0400
> From: kew@emc.com
>
> Hi
>
> In i386 architecture (32 bit) gcc can optimize a static function to pass
> function arguments via registers (instead of in the stack). For 64-bit
> arguments, it uses 2 registers, but gdb reports only 1 (via "info
> scope") when the binary being debugged is compiled using the STABS
> debugging format.
>
> I checked using objdump and could see indeed only 1 N_RSYM record being
> given (so no wonder gdb would only report 1 register).
>
> How does the STABS debugging format indicate the 2 registers used for
> passing 64 function arguments in i386 architecture? Is this supported?
Historically the convention has been that a 64-bit value is stored in
register N and N + 1, where N is the register number that's stored in
the STABS debugging information.
If your compiler doesn't store 64-bit values in that way (and I think
modern versions of GCC no longer do this) things will break.
> If not, what's the process to add support for it?
There isn't really. STABS is a historic debugging format that isn't
expressive enough to support modern compilers and languages like C++.
Use DWARF 2/3/4 instead.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-13 16:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13 15:19 STABS records for 64-bit function arguments via registers in i386 kew
2010-10-13 16:07 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox