This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: Patch: fixlet in gdbtk-cmds.c
- To: tromey at cygnus dot com
- Subject: Re: Patch: fixlet in gdbtk-cmds.c
- From: Syd Polk <spolk at redhat dot com>
- Date: Tue, 28 Nov 2000 14:49:59 -0800
- Cc: Insight List <insight at sourceware dot cygnus dot com>
- References: <Syd Polk's message of "Tue, 28 Nov 2000 12:58:50 -0800"><4.2.0.58.20001128125809.01a7f100@pop.cygnus.com>
At 02:56 PM 11/28/00 -0700, Tom Tromey wrote:
> >>>>> "Syd" == Syd Polk <spolk@redhat.com> writes:
>
>Syd> Approved, although I would have preferred using Tcl_WrongNumArgs.
>
>I wasn't even aware of that function. It must have been added since I
>last used Tcl.
>
>gdbtk-cmds.c uses the "broken" method everywhere. Bummer. Also,
>gdb_get_breakpoint_list() uses error(), which seems wrong.
>
>
>I looked in gdb/testsuite/gdb.gdbtk and I didn't see anything that
>mentions `gdb_clear_file'. So I could check in the patch you prefer,
>if you want.
>
>Is there somewhere else I should look for tests?
>
>Tom
No, that is where they would be.
Basically, there are templates for how to parse command arguments in the
Tcl code itself. The best bet is probably something like Tcl_FileCmd in
tclCmdAH.c. IRIC, it shows a good example of the canonical way to parse
arguments and return errors.
I know it is in 8.1 and later; I don't remember if it is in 8.0.
Syd Polk spolk@redhat.com
Engineering Manager +1 415 777 9810 x 241
Red Hat, Inc.