Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [unavailable regs/locals, 01/11] registers status upwards
Date: Thu, 17 Mar 2011 16:48:00 -0000	[thread overview]
Message-ID: <201103171621.48928.pedro@codesourcery.com> (raw)
In-Reply-To: <20110317150627.GA15201@host1.jankratochvil.net>

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


  reply	other threads:[~2011-03-17 16:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22 13:28 Pedro Alves
2011-02-28 15:53 ` Jan Kratochvil
2011-03-16  1:40   ` Pedro Alves
2011-03-17 16:31     ` Jan Kratochvil
2011-03-17 16:48       ` Pedro Alves [this message]
2011-03-17 17:25         ` Jan Kratochvil
2011-03-17 19:15           ` Pedro Alves
2011-03-28 21:17       ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201103171621.48928.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox