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: Re: new gdb/gdba code has bug with absolute source filenames Date: Thu, 08 Jan 2004 00:46:06 +0000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84vfnnb73l.fsf@cenderis.demon.co.uk> References: <16380.35732.41673.248437@nick.uklinux.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073526660 2779 80.91.224.253 (8 Jan 2004 01:51:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2004 01:51:00 +0000 (UTC) Cc: Andreas Schwab , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jan 08 02:50:56 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AePK4-0005tl-00 for ; Thu, 08 Jan 2004 02:50:56 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AePK3-0000j2-00 for ; Thu, 08 Jan 2004 02:50:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AeQ4Y-0002bF-6W for emacs-devel@quimby.gnus.org; Wed, 07 Jan 2004 21:38:58 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AePxo-0000Vr-D9 for emacs-devel@gnu.org; Wed, 07 Jan 2004 21:32:00 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AePqJ-000773-Ms for emacs-devel@gnu.org; Wed, 07 Jan 2004 21:24:46 -0500 Original-Received: from [62.3.217.251] (helo=rufus.isode.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AePH2-0007cM-MR for emacs-devel@gnu.org; Wed, 07 Jan 2004 20:47:48 -0500 Original-Received: from cenderis.demon.co.uk ([62.49.17.254]) by rufus.isode.com via TCP (with SMTP (internal)) with ESMTP; Thu, 8 Jan 2004 00:46:07 +0000 Original-To: Nick Roberts In-Reply-To: <16380.35732.41673.248437@nick.uklinux.net> (Nick Roberts's message of "Wed, 7 Jan 2004 22:43:32 +0000") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19088 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19088 Nick Roberts writes: [...] > I've not considered word wrapping. I can see that this would create > problems but I don't think this fixes the problem stated above as it > happens before execution has started, when "info frame" just gives > "No stack." The source code is located for Emacs with the GDB > command "info source". Actually, it did seem to fix the problem for the test example. But didn't seem to for a real program with a much longer file name. > Bruce, when you see the assembler code for main rather than C source code > what does GDB say when you type "info source" in the GUD buffer? It says: (gdb) info source Current source file is /tmp/hello.c Located in /tmp/hello.c Contains 6 lines. Source language is c. Compiled with DWARF 2 debugging format. Includes preprocessor macro info. > I can't duplicate this problem. What operating system, version of > GDB, gcc etc are you using? Debian GNU/Linux unstable, i386, gdb 6.0-debian, gcc version 3.3.3 20031229 (prerelease) (Debian). > Andreas, I imagine other handlers in gdb-ui.el can't handle word > wrapping so I guess that running GDB command, "set width 0", on > initialisation will help. True. As you suggest, though, it's probably not enough: show width shows that width is 80, so probably that's enough for this example. I used edebug on gdb-source-info. When it starts, *partial-output-hello* contains: Current source file is /tmp/hello.c Located in /tmp/hello.c Contains 6 lines. Source language is c. Compiled with DWARF 2 debugging format. Includes preprocessor macro info. For a hello.c compiled with "gcc -g3 -o hello hello.c" (i.e., some relative path, I guess), it contains: Current source file is hello.c Compilation directory is /tmp Located in /tmp/hello.c Contains 6 lines. Source language is c. Compiled with DWARF 2 debugging format. Includes preprocessor macro info. Perhaps I'm being naive, but it looks to me like gdb-source-info ought to be looking at "Located in ..." and just believing it. (Possibly this wouldn't work for Windows or older gdbs or something.)