From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31950 invoked by alias); 14 Jul 2005 06:36:52 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31937 invoked by uid 22791); 14 Jul 2005 06:36:48 -0000 Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 14 Jul 2005 06:36:48 +0000 Received: from farnswood.snap.net.nz (p112-tnt1.snap.net.nz [202.124.110.112]) by viper.snap.net.nz (Postfix) with ESMTP id 5EBF35E15CA; Thu, 14 Jul 2005 18:36:45 +1200 (NZST) Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 34F5262A99; Thu, 14 Jul 2005 07:37:59 +0100 (BST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17110.2119.321835.866353@farnswood.snap.net.nz> Date: Thu, 14 Jul 2005 06:36:00 -0000 To: Bob Rossi Cc: gdb@sources.redhat.com Subject: Re: -inferior-tty-show and -inferior-tty-set In-Reply-To: <20050713233924.GB5383@white> References: <17108.33601.794016.525239@farnswood.snap.net.nz> <20050713224555.GA5383@white> <17109.40009.659224.609729@farnswood.snap.net.nz> <20050713233924.GB5383@white> X-SW-Source: 2005-07/txt/msg00162.txt.bz2 > 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