frame_id question

Jim Blandy jimb@redhat.com
Fri Nov 11 10:23:00 GMT 2005


Vladimir Prus <ghost@cs.msu.su> writes:
> The question is: why frame id has to include program address at all? It it
> ever possible for two frames to have the same stack address? If so, when?

Some functions don't need any stack space at all.  Such a function can
even call other functions if it moves the return address to a
callee-saved register while doing so.  Unwinding through such a call,
the caller's frame will have the same CFA as the callee, but a
different function address.  Since the two frame ID's have different
function addresses, frame_id_eq will declare them distinct, and GDB
won't complain that it has gotten stuck trying to unwind the stack.



More information about the Gdb mailing list