From: Nick Roberts <nickrob@snap.net.nz>
To: gdb@sources.redhat.com
Subject: GDB command "info source"
Date: Tue, 28 Mar 2006 22:21:00 -0000 [thread overview]
Message-ID: <17449.45511.144783.549259@kahikatea.snap.net.nz> (raw)
Starting GNU gdb 6.4.50.20060325-cvs, I get the following:
nickrob/24 src/gdb/gdb -q myprog
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) help info source
Information about the current source file.
(gdb) info source
No current source file.
(gdb) b 10
Breakpoint 1 at 0x8048498: file myprog.c, line 10.
So GDB seems to assume myprog.c is current, but doesn't share that information
with the user until now...
(gdb) info source
Current source file is myprog.c
Compilation directory is /home/nickrob
Source language is c.
Compiled with DWARF 2 debugging format.
Includes preprocessor macro info.
In contrast using MI, GDB does yield this information immediately:
nickrob/25 src/gdb/gdb -q -i=mi myprog
~"Using host libthread_db library \"/lib/tls/libthread_db.so.1\".\n"
(gdb)
-file-list-exec-source-file
^done,line="58",file="myprog.c",fullname="/home/nickrob/myprog.c"
(gdb)
Shouldn't "info source" do the same?
About -file-list-exec-source-file the manual says:
There's no GDB command which directly corresponds to this one.
but apart from this difference, they seem pretty similar. Also
-file-list-exec-source-files could be likened to "info sources".
WDYT?
--
Nick http://www.inet.net.nz/~nickrob
next reply other threads:[~2006-03-28 22:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-28 22:21 Nick Roberts [this message]
2006-03-29 1:23 ` Bob Rossi
2006-03-29 4:21 ` Nick Roberts
2006-03-29 4:35 ` Bob Rossi
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=17449.45511.144783.549259@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=gdb@sources.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