From mboxrd@z Thu Jan 1 00:00:00 1970 From: Syd Polk To: tromey@cygnus.com Cc: Insight List Subject: Re: Patch: fixlet in gdbtk-cmds.c Date: Tue, 28 Nov 2000 14:47:00 -0000 Message-id: <4.2.0.58.20001128144825.01b47150@pop.cygnus.com> References: <"Tue,> <28> <2000> <12:58:50> <-0800> <4.2.0.58.20001128125809.01a7f100@pop.cygnus.com> <878zq392x7.fsf@creche.cygnus.com> X-SW-Source: 2000-q4/msg00307.html At 02:56 PM 11/28/00 -0700, Tom Tromey wrote: > >>>>> "Syd" == Syd Polk 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.