This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
frame_id question
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb at sources dot redhat dot com
- Date: Wed, 09 Nov 2005 19:22:16 +0300
- Subject: frame_id question
Hello,
I have some confusion over "frame_id" concept, which is supposed to be
unique identifier of a function frame.
Frame id consists of a stack address and a program address. The program
address should be start address of a function and many of xxx_this_frame_id
function follow this pattern:
static void
xxx_frame_this_id (struct frame_info *next_frame, void **this_cache,
struct frame_id *this_id)
{
.......
(*this_id) = frame_id_build (....,
frame_func_unwind (next_frame));
}
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?
The immediate problem I have is that "frame_func_unwind" requires full debug
info (address boundaries for functions), but in my case assembler modules
have only line information, so frame_func_unwind will always return 0.
Using hardcoded '0' as program address part of frame id does not cause any
problems for me, but I want to be sure.
Thanks in advance,
Volodya