This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: fixlet in gdbtk-cmds.c


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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]