From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,eec8c4de47be074 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!kanaga.switch.ch!switch.ch!newsfeed2.funet.fi!newsfeeds.funet.fi!fi.sn.net!newsfeed1.tdcnet.fi!news.song.fi!not-for-mail Date: Tue, 05 Jan 2010 19:34:12 +0200 From: Niklas Holsti Organization: Tidorum Ltd User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: gdb hijacks my argument list References: <4b43251a$0$6270$4f793bc4@news.tdc.fi> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4b437848$0$26368$4f793bc4@news.tdc.fi> NNTP-Posting-Host: 81.17.205.61 X-Trace: 1262712904 news.tdc.fi 26368 81.17.205.61:42526 X-Complaints-To: abuse@tdcnet.fi Xref: g2news1.google.com comp.lang.ada:8616 Date: 2010-01-05T19:34:12+02:00 List-Id: Leslie wrote: > Niklas Holsti wrote: > >> gdb --args testtoken ' (name testtoken endchar \) < >>> testtoken.adb | (trace) count lines|cons ' > > I get exactly the same result as before: > ================================== > gdb --args testtoken ' (name testtoken endchar \) < > testtoken.adb | (trace) count lines|cons ' ... > This GDB was configured as "i586-suse-linux"... > testtoken: No such file or directory. Well, perhaps GDB is right and there is no such file? Looking more carefully at your original question, at the attached terminal session, it seems that your program is really named "testcmdline", not "testtoken": > 15:49:35 turriff@pinto > ~/Documents/SourceCode$ > ./testcmdline 'with an arbitrary command string' > with an arbitrary command string Perhaps you should use gdb --args testcmdline ' (name testtoken endchar \) < testtoken.adb | (trace) count lines|cons ' The GDB command "set args" as suggested by John Matthews is also a good method, and the one I have used until now. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .