gdb calls bypassbreakpoints

mec.gnu@mindspring.com mec.gnu@mindspring.com
Sat Jul 24 07:53:00 GMT 2004


> Is there a way to stop this behavior and make gdb act as if the call 
> had came from the C file?

Well, no.  When gdb hits a breakpoint in your program, it has to
discard the state information and just get back to the top level
of the interpreter.

That is, if you do this:

  (gdb) break foo
  (gdb) break bar
  (gdb) print foo() + bar()

Then when gdb hits the breakpoint in foo(), it's going to forget
that it was in the middle of evaluating "foo() + bar()".
gdb will continue evaluating foo(), and when that is done,
gdb will ask for more commands and not continue with the
"+ bar()" part.

Michael C
GDB QA Guy



More information about the Gdb mailing list