This is the mail archive of the gdb-patches@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: RFA: top.c: new catch_errors + cleanup interface


"Nick Duffek
> 
> >I'll post a revised patch later today.
> 
> Here it is.
> 
> Nick

Nick, while cute I've strong reservations.  Think of me as the old ...
who hates anything new or radical :-)

The existing mechanism (since your recent fixes) had evolved to the
point where it had several very clear advantages: it localized all the
nasty setjmp/longjump muck; it can be be stepped through; you knew where
to go when that longjmp botch occured (ask elena about debugging async);
you could see what it was doing as it didn't involve complex multi-line
macros.

The dissadvantages I was aware of were:  the longwinded coding style (as
your follow-on patch aptly illustrates); and the limited interface (it
was ambigious about return values).

Given the above and knowing that, longer term, GDB is ment to be trying
to get away from all this long-jumping stuff (those wrappers are just an
ugly stop-gap) I've real reservations about any change that on the
surface makes using the catch_errors() easier (encouraging it), while in
the long run, in my opinion, makes the code less maintainable.

	Andrew

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