From: Bruce Stephens <Bruce.Stephens@isode.com>
Cc: Andreas Schwab <schwab@suse.de>, emacs-devel@gnu.org
Subject: Re: new gdb/gdba code has bug with absolute source filenames
Date: Thu, 08 Jan 2004 00:46:06 +0000 [thread overview]
Message-ID: <84vfnnb73l.fsf@cenderis.demon.co.uk> (raw)
In-Reply-To: <16380.35732.41673.248437@nick.uklinux.net> (Nick Roberts's message of "Wed, 7 Jan 2004 22:43:32 +0000")
Nick Roberts <nick@nick.uklinux.net> 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.)
next prev parent reply other threads:[~2004-01-08 0:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 22:43 new gdb/gdba code has bug with absolute source filenames Nick Roberts
2004-01-08 0:46 ` Bruce Stephens [this message]
2004-01-08 10:21 ` Nick Roberts
2004-01-08 11:11 ` Bruce Stephens
2004-01-08 10:27 ` Andreas Schwab
2004-01-08 11:04 ` Bruce Stephens
2004-01-08 10:21 ` Andreas Schwab
2004-01-08 12:28 ` Nick Roberts
2004-01-08 13:53 ` Bruce Stephens
-- strict thread matches above, loose matches on Subject: below --
2004-01-08 22:04 Nick Roberts
2004-01-06 17:05 Bruce Stephens
2004-01-06 20:40 ` Andreas Schwab
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=84vfnnb73l.fsf@cenderis.demon.co.uk \
--to=bruce.stephens@isode.com \
--cc=emacs-devel@gnu.org \
--cc=schwab@suse.de \
/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).