Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Infinite backtrace on (eg.) ARM
@ 2006-09-22  1:48 Michael Snyder
  2006-09-22  2:59 ` Daniel Jacobowitz
  2006-09-22 19:00 ` Jim Blandy
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Snyder @ 2006-09-22  1:48 UTC (permalink / raw)
  To: GDB Patches ML, Daniel Jacobowitz

Been thinking about this problem.  Check me out here.

Taking a step or two back from the intimate view of gdb internals, 
the problem (if I understand it) is detecting the fact that we have
an unusual case of a function that doesn't save it's return address.
We have to detect the fact that we should stop the frame chain at
this function's frame.

So the most common case of a function that doesn't save its return
address is a leaf function, yes?  But we can distinguish that case
from the pathological case by looking at the frame->level.  A leaf
function can only be at frame level zero, unles we've made a dummy
frame on top of it via a target function call.

So we can check for:
  * doesn't save its PC, and
  * frame->level > 0, and
  * frame->next is not a call dummy.

Except that the information "doesn't save its PC" isn't public
at the point where we want it.  It's hidden within frame_register_unwind
and below -- in this case, in trad_frame.  So we sort of have a problem
of "what do we know, and when do we know it".

So -- what if we exported a method to make that info public?
It's rather specific, but in this case important: "does this
frame save its return address?"



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-10-05 22:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-22  1:48 Infinite backtrace on (eg.) ARM Michael Snyder
2006-09-22  2:59 ` Daniel Jacobowitz
2006-09-22 18:56   ` Michael Snyder
2006-10-05 21:51     ` Ping, " Michael Snyder
2006-10-05 22:27       ` Daniel Jacobowitz
2006-09-22 19:00 ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox