This is the mail archive of the gdb@sources.redhat.com 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]

setting arbitrary frame <address> returns 0x00000000 in ?? ()


How does one force the base frame to a particular address. 
In the case of a program overwriting the stack one might be able to 
locate a possible address by hand to set the frame for the 
purposes of attempting a trace.

The documentation implies that the frame can be set for i386 with
the command
frame <address>

What is wrong with the following example using gdb 6.0 on redhat linux?
Can the frame be set to a particular address with a single command?  
What would be the steps to accomplish this task?  

Obviously in the following example frame 0 would set the frame correctly 
but would be the steps to use the address for the purposes of setting an 
arbitrary frame, thus trigger the code path
stack.c:parse_frame_specification() case 1 
to setup an arbitrary frame?

Thanks for the clarification.

(gdb) b main
Breakpoint 1 at 0x8048466
(gdb) run
Starting program: /vobs/tools/junk 

Breakpoint 1, 0x08048466 in main ()
(gdb) where
#0  0x08048466 in main ()
(gdb) info frame
Stack level 0, frame at 0xbffff6a0:
 eip = 0x8048466 in main; saved eip 0x4003e507
 Arglist at 0xbffff698, args: 
 Locals at 0xbffff698, Previous frame's sp is 0xbffff6a0
 Saved registers:
  ebp at 0xbffff698, eip at 0xbffff69c
(gdb) frame 0xbffff6a0
#0  0x00000000 in ?? ()

dan
-- 
Dan L. Clark                        503/531-6432
nCUBE, 1825 NW 167th Place, Beaverton, OR  97006


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