This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


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

Re: command error handling


> I'll argue that delete should behave like enable and disable, that a
> message be output and execution should continue.

Sounds good to me.

> The problem with error(), IMHO, is that it's very heavy handed.  While
> it allows us to avoid the fun of propagating errors up from the lowest
> levels of GDB, it also makes it impossible for user defined functions
> to detect the failure of a command

Well, sometimes the command will fail in its entirety.  Or to put it
another way, some errors you can't continue from, for example, in
"delete display foo 4 3 5 2" we might be willing to guess that 4, 3,
5, and 2 are display numbers but in a different case the syntax of the
first part has to be right for the last part to make any sense.  One
can presumably find non-syntactic examples too.

I haven't taken a close look at the error() machinery recently and how
it would relate to scripting languages, but there should be some way
to trap the error() and return it back to the script.

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