From: Bob Rossi <bob_rossi@cox.net>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Adding -file-list-exec-source-file command to GDB/MI
Date: Mon, 31 Mar 2003 18:46:00 -0000 [thread overview]
Message-ID: <20030331184616.GE10233@white> (raw)
In-Reply-To: <3E87D445.70609@redhat.com>
On Mon, Mar 31, 2003 at 12:38:13AM -0500, Andrew Cagney wrote:
> >This change essentially adds the command -file-list-exec-source-file to
> >the mi commands.
> >
> >* mi-cmd-file.c: Added file to implement mi file commands.
> >* mi-cmds.c: Added -file-list-exec-source-file command.
> >* mi-cmds.h: Added -file-list-exec-source-file to proto list.
> >* doc/gdb.texinfo: Document -file-list-exec-source-file.
>
>
> >* mi-file.exp: Added testcase to test -file-list-exec-source-file.
>
> I've attached a slightly tweaked version. It was checking for the path
> to the executable instead of the source file (separate build / config
> directories is the norm) (I'm also not sure what would happen if the
> configure contained a relative path but worry about that when someone
> notices :-)
I am noticing this now. The variable
set abs_srcfile [string_to_regexp ${srcdir}/${subdir}/${srcfile}]
has the value ("\./gdb\.mi/basics\.c") when I run the testcase.
This is why I made it check for the path to the executable in the first
place.
What do you think we should do here? I have no idea.
> Rather than file=..., should the field be called something like
> fullname=...., realpath= or fullpath=? That way, the same term can be
> used consistently through out MI.
I like fullname because it is used already in symtab.h
/* Full name of file as found by searching the source path.
NULL if not yet known. */
char *fullname;
>
> >enum mi_cmd_result
> >mi_cmd_file_list_exec_source_file(char *command, char **argv, int argc)
> >{
> > struct symtab_and_line st;
>
> See:
> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=783
>
> Even though there are no arguments it will want to discard any "--". A
> mi_getopt() call to strip off any leading "--". I think you'll want to
> tweak that function so that calling it is easier - allow NULL OPT and
> OPTARG?
>
> > /* Print to the user the line and absolute file name */
> > ui_out_field_int (uiout, "line", st.line);
> > ui_out_field_string (uiout, "file", st.symtab->fullname);
>
> Following on from above, should it print both "file" and "fullname"?
Yes, defiantly.
next prev parent reply other threads:[~2003-03-31 18:46 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-29 0:41 Bob Rossi
2003-03-31 5:38 ` Andrew Cagney
2003-03-31 18:46 ` Bob Rossi [this message]
2003-03-31 18:56 ` Andrew Cagney
2003-04-02 16:15 ` Bob Rossi
2003-04-02 16:27 ` Andrew Cagney
-- strict thread matches above, loose matches on Subject: below --
2003-04-02 20:24 Bob Rossi
2003-04-02 20:24 Bob Rossi
2003-04-02 21:59 ` Andrew Cagney
2003-04-03 2:54 ` Eli Zaretskii
2003-03-20 22:44 Bob Rossi
2003-03-21 4:34 ` Eli Zaretskii
2003-03-21 9:53 ` Jason Molenda
2003-03-21 13:16 ` Bob Rossi
2003-03-28 15:26 ` Andrew Cagney
2003-03-30 4:06 ` Bob Rossi
2003-03-31 4:22 ` Andrew Cagney
2003-03-31 8:13 ` Jason Molenda
2003-03-31 14:31 ` Andrew Cagney
2003-03-31 17:16 ` Jason Molenda
2003-03-31 18:52 ` Andrew Cagney
2003-03-31 19:20 ` Jason Molenda
2003-03-31 20:12 ` Andrew Cagney
2003-03-26 22:48 ` Andrew Cagney
2003-03-28 14:35 ` Bob Rossi
2003-03-28 15:30 ` Andrew Cagney
2003-03-28 16:05 ` Bob Rossi
2003-03-28 16:10 ` Daniel Jacobowitz
2003-03-10 0:31 Bob Rossi
2003-03-10 4:28 ` Eli Zaretskii
2003-03-18 2:10 ` Bob Rossi
2003-03-18 5:46 ` Eli Zaretskii
2003-02-10 22:28 Michael Elizabeth Chastain
2003-02-10 22:15 Bob Rossi
2003-02-11 6:39 ` Eli Zaretskii
2003-02-13 3:00 ` 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=20030331184616.GE10233@white \
--to=bob_rossi@cox.net \
--cc=ac131313@redhat.com \
--cc=gdb-patches@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