public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Bob Rossi <bob@brasko.net>
Cc: gdb@sources.redhat.com
Subject: Re: -inferior-tty-show and -inferior-tty-set
Date: Thu, 14 Jul 2005 06:36:00 -0000	[thread overview]
Message-ID: <17110.2119.321835.866353@farnswood.snap.net.nz> (raw)
In-Reply-To: <20050713233924.GB5383@white>

 > I think everywhere that does "if (argc >0)" is broke. I could be wrong
 > about this though. Here is the reason that Andrew asked me to create
 > this function,
 >     http://sourceware.org/ml/gdb-patches/2003-04/msg00030.html

It looks to me that the intention is to make:

-file-list-exec-source-file --

legitimate.  Perhaps we could use the condition"(argc > 0)" for now and worry
about such pathological cases later, when we could also improve mi_getopt to
other things like long options (as Daniel has suggested).

In fact I would like to add an argument to -file-list-exec-source-file to
find the fullname of a file i.e

(gdb)
-file-list-exec-source-file myprint.c
^done,line="16",file="myprint.c",fullname="/home/nick/myprint.c"
(gdb)

where myprog.c is not necessarily the current source file.  At the moment, I
do:

(gdb) 
list myprint.c:1
&"list myprint.c:1\n"
~"1\t/* -*- compile-command: \"cc -g3 -c myprint.c\"; -*-  */\n"
~"2\t\n"
~"3\tint i22;\n"
~"4\t\n"
~"5\tstruct values;\n"
~"6\tstruct values1;\n"
~"7\t\n"
~"8\t#define GOTCHA 9\n"
~"9\t\n"
~"10\tmyprint (int i,int j) {\n"
^done
(gdb) 
-file-list-exec-source-file
^done,line="11",file="myprint.c",fullname="/home/nick/myprint.c"
(gdb) 

to make the file that I'm interested in current first (I'm thinking of a
situation where user the adds to the search path for source files *after* the
start of the debug session).

Nick

      reply	other threads:[~2005-07-14  6:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13  2:57 Nick Roberts
2005-07-13  3:59 ` Daniel Jacobowitz
2005-07-13 22:46 ` Bob Rossi
2005-07-13 22:55   ` Nick Roberts
2005-07-13 23:39     ` Bob Rossi
2005-07-14  6:36       ` Nick Roberts [this message]

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=17110.2119.321835.866353@farnswood.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=bob@brasko.net \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).