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]

Re: breakpoint commands and finish


At 10:47 AM 4/17/2003, Michael Snyder wrote:
Matt Thomas wrote:
>
> What should be the behavour of the following?
>
> break function
> commands
> finish
> continue
> end
>
> Should finish cause gdb to stop and wait for a prompt
> or should gdb act on the continue?  (gdb5.x does the
> former while gdb4.x did the latter)

Consistant with your observations, the traditional behavior
has been that gdb would stop and prompt for a new command.
I believe that recently someone has changed it so that it
would at least try to execute the finish and the continue.

Well, I just rebuilt gdb from the latest on sources.redhat.com and the behavior is unchanged.

I was wondering (as an alternative) whether it would be possible
to get a variant of the break command which would place a breakpoint
at the return of a function (and print the return value like finish
does).

rbreak (or ebreak).  I find I often was to place a breakpoint at the
end of a function; it'd be nice if gdb could do that automaticly.

--
Matt Thomas               Internet:   matt at 3am-software dot com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message


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