From: Doug Evans <dje@transmeta.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Matt Thomas <matt@3am-software.com>,
Michael Snyder <msnyder@redhat.com>,
gdb@sources.redhat.com
Subject: Re: breakpoint commands and finish
Date: Thu, 17 Apr 2003 20:44:00 -0000 [thread overview]
Message-ID: <16031.4562.644834.479261@casey.transmeta.com> (raw)
In-Reply-To: <20030417201909.GA2867@nevyn.them.org>
Daniel Jacobowitz writes:
> > 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.
>
> It's too darned hard :) Debug info does not represent the exit point
> of the function. It's not always at the end; modern gcc's can emit
> multiple exit edges, too.
And if a tail-call optimization has been done, it gets even harder.
OTOH, if one stops at the first instruction of a function,
presumably it'd then be easy to set a breakpoint at the return address.
I wonder if gdb's macro facility is sufficient to write a macro
that would make this almost user-friendly: it would set a
breakpoint at the start of the function (pre-prologue) then have
commands that first sets a tbreak breakpoint at the return address
and then continues. You couldn't already be in the function of
course (but if you were presumably you'd use "finish").
?
next prev parent reply other threads:[~2003-04-17 20:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-14 20:56 Matt Thomas
2003-04-14 21:00 ` Joel Brobecker
2003-04-14 21:04 ` Joel Brobecker
2003-04-14 21:11 ` Doug Evans
2003-04-14 21:33 ` Joel Brobecker
2003-04-14 22:27 ` Doug Evans
2003-04-14 21:23 ` Matt Thomas
2003-04-17 17:47 ` Michael Snyder
2003-04-17 18:48 ` Matt Thomas
2003-04-17 20:19 ` Daniel Jacobowitz
2003-04-17 20:44 ` Doug Evans [this message]
2003-04-17 20:50 ` Daniel Jacobowitz
2003-04-17 21:19 ` Doug Evans
2003-04-17 21:44 ` Daniel Jacobowitz
2003-04-17 23:11 ` return value of a gdb command Smita
2003-04-17 23:13 ` Daniel Jacobowitz
2003-04-18 12:10 ` Bob Rossi
2003-04-18 13:38 ` Daniel Jacobowitz
2003-04-21 20:55 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16031.4562.644834.479261@casey.transmeta.com \
--to=dje@transmeta.com \
--cc=drow@mvista.com \
--cc=gdb@sources.redhat.com \
--cc=matt@3am-software.com \
--cc=msnyder@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).