From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: sami wagiaalla <swagiaal@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] smart pointer support
Date: Mon, 09 Aug 2010 18:23:00 -0000 [thread overview]
Message-ID: <20100809182342.GA27392@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <4C60431F.4040705@redhat.com>
On Mon, 09 Aug 2010 20:04:15 +0200, sami wagiaalla wrote:
> +
> + /* Check to see if the operator '->' has been overloaded. If the operator
> + has been overloaded replace arg2 with the value returned by the custom
> + operator and continue evaluation. */
> + while (unop_user_defined_p (op, arg2))
> + {
> + volatile struct gdb_exception except;
> + struct value *value = NULL;
> + TRY_CATCH (except, RETURN_MASK_ERROR)
> + {
> + value = value_x_unop (arg2, op, noside);
> + }
> +
> + if (except.reason < 0)
> + break;
What if some other error kind occurs? It would get hidden. Such as:
error (_("This target does not support function calls."));
In the case you want to go with the TRY_CATCH case you should IMO specialize
the error message you want to catch to some:
throw_error (THE_GREAT_NEW_KIND_OF_ERROR, that message);
To correctly check just that specific error kind in EXCEPT (and throw it again
otherwise).
OTOH I believe instead of making a new special kind of error message the
function calling schematics could be changed to not error itself and return
some normal error return value instead.
Regards,
Jan
next prev parent reply other threads:[~2010-08-09 18:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 15:58 sami wagiaalla
2010-07-23 23:37 ` Tom Tromey
2010-08-05 18:46 ` sami wagiaalla
2010-08-05 22:57 ` Ulrich Weigand
2010-08-06 16:23 ` sami wagiaalla
2010-08-06 16:48 ` Ulrich Weigand
2010-08-06 17:29 ` Tom Tromey
2010-08-08 15:01 ` Ulrich Weigand
2010-08-06 21:33 ` sami wagiaalla
2010-08-06 22:20 ` Tom Tromey
2010-08-09 15:59 ` sami wagiaalla
2010-08-09 17:35 ` Tom Tromey
2010-08-09 18:04 ` sami wagiaalla
2010-08-09 18:23 ` Jan Kratochvil [this message]
2010-08-16 20:31 ` sami wagiaalla
2010-08-16 20:59 ` Pedro Alves
2010-08-17 16:16 ` sami wagiaalla
2010-08-17 17:15 ` Tom Tromey
2010-10-19 20:55 ` sami wagiaalla
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=20100809182342.GA27392@host1.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=swagiaal@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