This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [unavailable regs/locals, 01/11] registers status upwards


On Thursday 17 March 2011 15:06:28, Jan Kratochvil wrote:
> Yes, for callers who want to deal with it there should be some way to report
> it without the GDB exceptions magic.

The key point is that the interface/prototype of the current functions has been
designed from the start to return a status indication instead of throwing.
The non-valid status of registers is _not_ new.  A nicer throwing variant
interface would return the register's value, instead of void.  That
interface/prototype would make it obvious to the reader that since there's
no way to return an error indication by return value, then it must throw.

> I wanted to express general disagreement with this style expecting preciseness
> and no mistakes by the developers, which is not considered to be a "safe
> enterprise development style".

Another key point, is that not putting a TRY_CATCH were it would matter
is fragile as well.  The whole operation is cancelled.  It makes the whole
user experience _worse_.  Seing 0s is worse than <unavailable> at places,
but it's much better than not seeing _anything_ at all.  E.g, the MI
command I showed upthread.

How about proceeding as is, and I'll revisit later if necessary?
This is just _one_ detail in the whole story afterall.

-- 
Pedro Alves


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