Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Susan Macchia <susan@smacchia.net>
Cc: Jim Blandy <jimb@codesourcery.com>, gdb@sourceware.org
Subject: Re: MI: -file-list-exec-source-files
Date: Sat, 03 Jun 2006 01:28:00 -0000	[thread overview]
Message-ID: <17536.58772.420434.491191@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20060603004553.33821.qmail@web51812.mail.yahoo.com>

 > Perhaps, but in working on the UI for other debuggers, I have seen this and 
 > it looked like the same situation.  When I worked on Compaq ladebug, we had 
 > to get the list of source files so that the user could choose one to set 
 > bpts in, or to browse.  In retrieving that list from the debugger, I saw e
 > xactly what Nick is seeing.  And in delving into the internals of the 
 > debugger/compiler, I found that the situation I described, with foo.? to 
 > be why I saw more than one source.  This is especially true for C++ when
 > templates are used.   What you really want to see in a list like this is 
 > "foo.c compiled this way", "foo.c compiled that way", and so on.  I don't 
 > think any debugger has solved this problem reasonably from a UI perspective.

I think it's always best to start with the simplest case:

mytest.c:

main ()
{
  myproc ();
}


myproc.c:

myproc ()
{
  return 0;
}

With gcc (GCC) 4.1.0 20060304 (Red Hat 4.1.0-3)
cc -g -c myproc.c
cc -g -o mytest mytest.c myproc.o

With GNU gdb 6.5.50.20060601-cvs, I get:

(gdb)
-file-list-exec-source-files
^done,files=[{file="myproc.c",fullname="/home/nickrob/myproc.c"},{file="myproc.c",fullname="/home/nickrob/myproc.c"},{file="mytest.c",fullname="/home/nickrob/mytest.c"},{file="mytest.c",fullname="/home/nickrob/mytest.c"}]

From what people have said, I guess a different compiler may give a different
result.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


  reply	other threads:[~2006-06-03  1:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1149277048.21408.ezmlm@sourceware.org>
2006-06-02 23:31 ` susan
2006-06-03  0:05   ` Jim Blandy
2006-06-03  0:46     ` Susan Macchia
2006-06-03  1:28       ` Nick Roberts [this message]
2006-06-03  9:46         ` Eli Zaretskii
2006-06-03 22:26           ` Nick Roberts
2006-06-03 22:35             ` Daniel Jacobowitz
2006-06-04  0:04               ` Nick Roberts
2006-06-04  2:50                 ` Daniel Jacobowitz
2006-06-04  3:34               ` Eli Zaretskii
2006-06-06  8:01                 ` Nick Roberts
2006-06-03  1:39       ` Bob Rossi
2006-06-02  0:30 Nick Roberts
2006-06-02 19:37 ` Jim Blandy
2006-06-02 19:38   ` Bob Rossi
2006-06-02 20:24 ` Daniel Jacobowitz

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=17536.58772.420434.491191@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb@sourceware.org \
    --cc=jimb@codesourcery.com \
    --cc=susan@smacchia.net \
    /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