Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb calls bypassbreakpoints
@ 2004-07-23 15:05 Luís Russo
  2004-07-24  7:53 ` mec.gnu
  2004-07-26 21:21 ` Andrew Cagney
  0 siblings, 2 replies; 4+ messages in thread
From: Luís Russo @ 2004-07-23 15:05 UTC (permalink / raw)
  To: gdb; +Cc: Luís Russo

Hi,

	I am debugging a C file. I set some breakpoints inside my C functions 
that print what's going on.  The breakpoints have a list of commands 
that do some prints and some continues.

	Sometimes I want to call the functions with different arguments from 
those hardcoded in C, and I use the call function.

	But then I get this message:

The program being debugged stopped while in a function called from GDB.
When the function (minSphere) is done executing, GDB will silently
stop (instead of continuing to evaluate the expression containing
the function call)

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

	Thanks,

Luís Russo

INESC
Rua Alves Redol n 9, 1049-001 LISBOA, PORTUGAL
tel:+351 21 3100272
email:lsr@algos.inesc-id.pt


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb calls bypassbreakpoints
  2004-07-23 15:05 gdb calls bypassbreakpoints Luís Russo
@ 2004-07-24  7:53 ` mec.gnu
  2004-07-25  0:03   ` Eli Zaretskii
  2004-07-26 21:21 ` Andrew Cagney
  1 sibling, 1 reply; 4+ messages in thread
From: mec.gnu @ 2004-07-24  7:53 UTC (permalink / raw)
  To: lsr; +Cc: gdb

> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb calls bypassbreakpoints
  2004-07-24  7:53 ` mec.gnu
@ 2004-07-25  0:03   ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2004-07-25  0:03 UTC (permalink / raw)
  To: mec.gnu; +Cc: lsr, gdb

> Date: Fri, 23 Jul 2004 16:45:29 -0400
> From: mec.gnu@mindspring.com
> 
> 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.

Well, perhaps we could arrange for the rest of the evaluation to be
pushed on some queue, and the GDB could examine that queue before it
asks for more commands.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb calls bypassbreakpoints
  2004-07-23 15:05 gdb calls bypassbreakpoints Luís Russo
  2004-07-24  7:53 ` mec.gnu
@ 2004-07-26 21:21 ` Andrew Cagney
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2004-07-26 21:21 UTC (permalink / raw)
  To: Luís Russo; +Cc: gdb

> Hi,

Are you asking that, for the period of the inferior function call, all 
the user breakpoints be disabled?

yes that could be useful

Andrew

>     I am debugging a C file. I set some breakpoints inside my C functions that print what's going on.  The breakpoints have a list of commands that do some prints and some continues.
> 
>     Sometimes I want to call the functions with different arguments from those hardcoded in C, and I use the call function.
> 
>     But then I get this message:
> 
> The program being debugged stopped while in a function called from GDB.
> When the function (minSphere) is done executing, GDB will silently
> stop (instead of continuing to evaluate the expression containing
> the function call)
> 
>     Is there a way to stop this behavior and make gdb act as if the call had came from the C file?
> 
>     Thanks,
> 
> Luís Russo 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-07-26 21:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-23 15:05 gdb calls bypassbreakpoints Luís Russo
2004-07-24  7:53 ` mec.gnu
2004-07-25  0:03   ` Eli Zaretskii
2004-07-26 21:21 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox