public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* behavior of finish within command set in gdb5.0
@ 2003-04-11  1:05 Smita
  2003-04-11 13:27 ` Joel Brobecker
  0 siblings, 1 reply; 6+ messages in thread
From: Smita @ 2003-04-11  1:05 UTC (permalink / raw)
  To: gdb


I am trying to specify command set for a breakpoint, like this:

break funtion_name
commands
 finish
continue
end

1. In gdb4.17 (netbsd), it results in a behavior where gdb stops at the
function, prints the return value, and contiues.
2. In gdb5.0 (netbsd), it stops at the function, prints the return value,
and then stops at the gdb prompt, expecting input from the user.

What's the correct behavior of finish? (1) or (2)?

Thanks
Smita





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

* Re: behavior of finish within command set in gdb5.0
  2003-04-11  1:05 behavior of finish within command set in gdb5.0 Smita
@ 2003-04-11 13:27 ` Joel Brobecker
  2003-04-11 17:10   ` Smita
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Joel Brobecker @ 2003-04-11 13:27 UTC (permalink / raw)
  To: Smita; +Cc: gdb

> 1. In gdb4.17 (netbsd), it results in a behavior where gdb stops at the
> function, prints the return value, and contiues.
> 2. In gdb5.0 (netbsd), it stops at the function, prints the return value,
> and then stops at the gdb prompt, expecting input from the user.
> 
> What's the correct behavior of finish? (1) or (2)?

The correct behavior, that is the behavior documented in the GDB
documentation, is (2). The documentation also explains why they chose
(2).

-- 
Joel

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

* Re: behavior of finish within command set in gdb5.0
  2003-04-11 13:27 ` Joel Brobecker
@ 2003-04-11 17:10   ` Smita
  2003-04-15  2:48     ` how to find function size? Smita
  2003-04-15 19:31   ` commands after finish Smita
  2003-04-16 16:47   ` breakpoint at function return Smita
  2 siblings, 1 reply; 6+ messages in thread
From: Smita @ 2003-04-11 17:10 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Smita, gdb

Thanks. Is there a way to make it continue after htting the finish
command?

Thanks
Smita

On Fri, 11 Apr 2003, Joel Brobecker wrote:

> > 1. In gdb4.17 (netbsd), it results in a behavior where gdb stops at the
> > function, prints the return value, and contiues.
> > 2. In gdb5.0 (netbsd), it stops at the function, prints the return value,
> > and then stops at the gdb prompt, expecting input from the user.
> >
> > What's the correct behavior of finish? (1) or (2)?
>
> The correct behavior, that is the behavior documented in the GDB
> documentation, is (2). The documentation also explains why they chose
> (2).
>
> --
> Joel
>

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

* how to find function size?
  2003-04-11 17:10   ` Smita
@ 2003-04-15  2:48     ` Smita
  0 siblings, 0 replies; 6+ messages in thread
From: Smita @ 2003-04-15  2:48 UTC (permalink / raw)
  To: gdb

Hi,
 I was wondering if there is a way to determine the size of a function
given the symbol table?

Thanks
Smita


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

* commands after finish
  2003-04-11 13:27 ` Joel Brobecker
  2003-04-11 17:10   ` Smita
@ 2003-04-15 19:31   ` Smita
  2003-04-16 16:47   ` breakpoint at function return Smita
  2 siblings, 0 replies; 6+ messages in thread
From: Smita @ 2003-04-15 19:31 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Smita, gdb

Hi,
 Is there a way to specify commands when finish stops at the return
address? for example:

break function1
finish
end

Q1: Is there a way to specify commands when fucntion1 returns after finish
command?
Q2: If function1 calls another function then the finish command for
function won't take effect. Am I right?

Thanks
Smita

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

* breakpoint at function return
  2003-04-11 13:27 ` Joel Brobecker
  2003-04-11 17:10   ` Smita
  2003-04-15 19:31   ` commands after finish Smita
@ 2003-04-16 16:47   ` Smita
  2 siblings, 0 replies; 6+ messages in thread
From: Smita @ 2003-04-16 16:47 UTC (permalink / raw)
  To: gdb

Hi,
 Is there a way to put a breakpoint at a function's return point
"statically"?
 I know I can put a breakpoint at *(*(*$r1+4)). But $r1 can
be determined only "dynamically" when the function is called.

Thanks a lot!
Smita

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

end of thread, other threads:[~2003-04-16 16:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-11  1:05 behavior of finish within command set in gdb5.0 Smita
2003-04-11 13:27 ` Joel Brobecker
2003-04-11 17:10   ` Smita
2003-04-15  2:48     ` how to find function size? Smita
2003-04-15 19:31   ` commands after finish Smita
2003-04-16 16:47   ` breakpoint at function return Smita

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).