This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: frame_id question


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]