unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Bruce Stephens <bruce@cenderis.demon.co.uk>
Subject: gdb modes try to insert breakpoint markers too soon
Date: Tue, 15 Feb 2005 13:01:05 +0000	[thread overview]
Message-ID: <874qge0yge.fsf@cenderis.demon.co.uk> (raw)

There seems to be an irritating interaction between gdb and the gdb
modes in current CVS Emacs (gdb and gdba).

When I set a breakpoint, gdb prints out something like this:

(gdb) break explode
Breakpoint 2 at 0xb7ce73e2: file explode.c, line 241.

and much the same with --annotate=3 and GDB/MI.  i.e., it seems not to
give the full pathname.

My executable and its libraries are compiled with DWARF2 debugging
information, and readelf shows that all of the directories are known.

When execution hits the breakpoint, gdb displays the full pathname.

So when running under Emacs, on setting the breakpoint, Emacs creates
an empty buffer "explode.c" in the directory in which the executable
was linked.  

When I hit the breakpoint, gdb produces two messages:

Breakpoint 2, explode (bind_arg=0xb719c5c0) at explode.c:241

source /local/brs/top-test/build/isode/src/lib/explode.c:241:6202:beg:0xb7ce73e2

(or whatever).  So again Emacs tries to find explode.c in its search
path, and is then told exactly where it is.

What's the best way of dealing with this?  (I suppose disabling
auto-insert would make this less annoying.)

(Creating a .gdbinit file with lots of "directory" commands mostly
works, but unfortunately I have files with identical names (generally
a bad idea, but in this case justified, I think).  In any case, that
seems silly: the information's available; DDD copes without apparent
difficulty.)

             reply	other threads:[~2005-02-15 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-15 13:01 Bruce Stephens [this message]
2005-02-15 20:26 ` gdb modes try to insert breakpoint markers too soon Nick Roberts
2005-02-16 20:08   ` Bruce Stephens

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874qge0yge.fsf@cenderis.demon.co.uk \
    --to=bruce@cenderis.demon.co.uk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).