gdb command "next" wrongly working as command "step"

Pedro Alves
Mon Aug 26 13:18:00 GMT 2019

On 8/25/19 8:04 PM, William Tambe wrote:
> Please see below, less noisy GDB output showing a working backtrace
> where I can see the caller in frame #1; but yet GDB command "next" is
> working as though it was "step"; any suggestion where else I could
> look ?

- You'll just have to debug gdb.  Try to figure out why this code, inside
  the "infrun: stepped into subroutine" block,seemingly isn't being reached:

	/* Set a breakpoint at callee's return address (the address
	   at which the caller will resume).  */
	insert_step_resume_breakpoint_at_caller (frame);

- I'd use "nexti" instead of "next" to try stepping over the
  instruction that calls the subroutine, just to make it easier
  to debug what goes wrong.

Pedro Alves

More information about the Gdb mailing list