From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Deephanphongs To: gdb-patches@sources.redhat.com Subject: Re: [PATCH] specify arguments to debugee from commandline (second try) Date: Mon, 02 Apr 2001 22:27:00 -0000 Message-id: <20010403013600.B7630@llamedos.org> References: <20010330005457.A21793@llamedos.org> <20010330163603.A27435@llamedos.org> X-SW-Source: 2001-04/msg00030.html Right.. No comments at all on this one. So - there are three ways to pass arguments to the inferior process: 1) as an escaped string: My favorite, but no-one else seems to like it. Pro: can be treated as just another option by the wrapper functions (gdb, xxgdb, etc.) Cons: can make arguments with quotes, etc., much more difficult to write. Could require parsing inside GDB to allow for escape sequences; e.g., if we are attempting to debug grep. 2) gdb [] -run .. Pro: Simple for the user to invoke GDB from the commandline - just go back to the beginning of the line, and type "gdb -run" in front of the command. Cons: changes format of gdb. Harder for wrapper programs to adapt to it. 3) like X: when gdb encounters -- on the command line, all the following arguments are treated as arguments to the inferior process. Pro: simple to use. Doesn't change syntax as much as 2. Precedent for it already exists. Con: breaks anything that uses core files that are named "--", although that's probably not too likely. 4) like 3), but with a --args-enable option that turns it on - this preserves perfect compatability with all the existing scripts. At this point, 99.5% of the work is done towards any of these options. My personal preference is towards 1) or 4). Which way do I need to go to get a patch in? Dave -- The thing between Death's triumphant digits was a fly from the dawn of time. It was the fly in the primordial soup. It had bred on mammoth turds. It wasn't a fly that bangs on window panes, it was a fly that drills through walls. -- Death goes fishing (Terry Pratchett, Mort)