Re: gdb problem
Re: gdb problem
- Subject: Re: gdb problem
- From: Jonas Maebe <email@hidden>
- Date: Thu, 25 May 2006 19:42:06 +0200
On 25 May 2006, at 18:31, Jim Ingham wrote:
The algorithms for figuring out whether you have stepped into
another function or out of the current function when we step out
of the address range of the source line you were stepping in were
indeed changed in gdb-477. Actually, we didn't do this, this was
a change from the FSF gdb, not that that matters much... They
were made more strongly dependent on our being able to figure out
what happens in the function prologue of the function that we've
just stepped into. I wouldn't be all that surprised if the Free
Pascal Compiler generates prologue patterns that gdb doesn't fully
understand.
So gdb now looks at the machine code of the target of a control
transfer instruction to figure out whether it's a new function or
just part of the current function? That's pretty scary. Can this be
worked around by using DWARF (e.g. the
"__DWARF,__debug_frame,regular,debug" sections define regions
containing functions, no?) or some special stabs?
The sources to the gdb in Xcode 2.3 will show up shortly on:
http://www.opensource.apple.com/darwinsource/
It usually takes a week or so after the release for the tarball of
the sources to get posted.
BTW, if you file a bug on this and attach a little program that
shows this problemthat would be fantastic. Attaching the built
binary as well would be even better, since it would save me having
to get and install the pascal compiler. This same problem does
show up occasionally in optimized C & C++ as well, and we are
working on it. If we have some examples of the Pascal problem, we
can try to get our solution to work for that as well.
I have the problem currently with completely unoptimized code (which
is what you usually debug, obviously). I'll try to create a program
which does various kinds of stack build ups (with different amounts
of parameters, local variables and outgoing function calls, and
compiled with different optimization levels and compiler versions)
and submit that.
FWIW, the prologue of the function I was testing looks like this:
mflr r0
stw r0,8(r1)
stw r31,-4(r1)
stwu r1,-80(r1)
I guess everything is in rs6000-tdep.c/skip_prologue? (I'm looking at
the FSF cvs version now) Could you perhaps tell me where it's called
in order to figure out whether a control transfer goes to a different
function or not?
Thanks,
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden