Article View: gnu.gdb.bug
Article #1053gdb hijacks my argument list
From: Leslie Turriff
Date: Fri, 04 Dec 2009 22:36
Date: Fri, 04 Dec 2009 22:36
50 lines
3427 bytes
3427 bytes
Hi,
I'm writing a package that accepts arbitrary character strings from the
command line, and I'm trying to debug it with gdb.
When run without gdb the command line string is passed directly to my
program, but when I tell gdb to pass it, gdb insists on interpreting it as a
filename, and won't pass it through.
Example without gdb:
=================================================
./testtoken ' (name testtoken endchar \) < testtoken.adb | (trace) count
lines|cons '
Input string is:
....+....1....+....2....+....3....+....4....+....5....+....6
(name testtoken endchar \) < testtoken.adb | (trace) count lines|cons
Before: TokenFrom = 1
TextLeft = 71
After: TokenFrom = 1
TextLeft = 71
Token 1 is: ' (name testtoken endchar \) < testtoken.adb | (trace) count
lines|cons '
End of tokens reached.
=================================================
Example with gdb:
=================================================
gdb testtoken --args ' (name testtoken endchar \) < testtoken.adb | (trace)
count lines|cons '
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-suse-linux"...
(name testtoken endchar \) < testtoken.adb | (trace) count lines|cons : No
such file or directory.
(gdb)
=================================================
How do I make gdb pass this string through to the program under test?
Leslie
Technical Details
Message-ID:
<mailman.12227.1259971126.2239.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.news2me.com!usenet.stanford.edu!news.stanford.edu!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f0ead4270c,a90d09612538d661,start X-Google-Attributes: gidf0ead4270c,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.news2me.com!usenet.stanford.edu!news.stanford.edu!not-for-mail From: Leslie Turriff <jlturriff@centurytel.net> Newsgroups: gnu.gdb.bug Subject: gdb hijacks my argument list Date: Fri, 4 Dec 2009 16:36:50 -0600 Lines: 52 Approved: bug-gdb@gnu.org Message-ID: <mailman.12227.1259971126.2239.bug-gdb@gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.stanford.edu 1259971127 6715 199.232.76.165 (4 Dec 2009 23:58:47 GMT) X-Complaints-To: news@news.stanford.edu To: bug-gdb@gnu.org Envelope-to: bug-gdb@gnu.org X-Authenticated-User: jlturriff.centurytel.net User-Agent: KMail/1.9.9 Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gdb@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/bug-gdb> List-Post: <mailto:bug-gdb@gnu.org> List-Help: <mailto:bug-gdb-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=subscribe>