From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bruce Stephens Newsgroups: gmane.emacs.devel Subject: gdb modes try to insert breakpoint markers too soon Date: Tue, 15 Feb 2005 13:01:05 +0000 Message-ID: <874qge0yge.fsf@cenderis.demon.co.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1108473330 5425 80.91.229.2 (15 Feb 2005 13:15:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2005 13:15:30 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 15 14:15:29 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D12Y0-0005Pv-Ce for ged-emacs-devel@m.gmane.org; Tue, 15 Feb 2005 14:15:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D12nk-000088-3v for ged-emacs-devel@m.gmane.org; Tue, 15 Feb 2005 08:31:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D12mu-0008IL-EB for emacs-devel@gnu.org; Tue, 15 Feb 2005 08:30:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D12mq-0008GT-R3 for emacs-devel@gnu.org; Tue, 15 Feb 2005 08:30:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D12mq-0008F9-5E for emacs-devel@gnu.org; Tue, 15 Feb 2005 08:30:44 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1D12Vc-0002Zy-Q4 for emacs-devel@gnu.org; Tue, 15 Feb 2005 08:12:57 -0500 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1D12Sw-0004WY-D3 for emacs-devel@gnu.org; Tue, 15 Feb 2005 14:10:10 +0100 Original-Received: from cenderis.demon.co.uk ([62.49.17.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Feb 2005 14:10:10 +0100 Original-Received: from bruce by cenderis.demon.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Feb 2005 14:10:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 37 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: cenderis.demon.co.uk User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:y0vzk4gvom/9urBZzwd5iwrdigQ= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:33472 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33472 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.)