From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] MI: Error out on -var-create invalid FRAME-ADDR
Date: Mon, 10 Aug 2009 17:47:00 -0000 [thread overview]
Message-ID: <20090810170045.GA15882@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <h5pjcq$s9n$1@ger.gmane.org>
On Mon, 10 Aug 2009 18:54:52 +0200, Vladimir Prus wrote:
> Jan Kratochvil wrote:
>
> > - Â Â Â if (innermost_block && fi != NULL)
> > + Â Â Â if (innermost_block)
> > {
> > +Â Â Â Â Â Â Â Â /* User could specify explicit FRAME-ADDR which was not found but
> > +Â Â Â Â Â Â Â Â Â EXPRESSION is frame specific and we would not be able to evaluate
> > +Â Â Â Â Â Â Â Â Â it correctly next time. Â With VALID_BLOCK set we must also set
> > +Â Â Â Â Â Â Â Â Â FRAME and THREAD_ID. Â */
> > +Â Â Â Â Â Â Â Â if (fi == NULL)
> > +Â Â Â Â Â Â Â Â Â {
> > +Â Â Â Â Â Â Â Â Â Â fprintf_unfiltered (gdb_stderr, "Failed to find the specified"
> > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â " frame.\n");
> > +Â Â Â Â Â Â Â Â Â Â return NULL;
> > +Â Â Â Â Â Â Â Â Â }
>
> Why is this fprintf + NULL return, as opposed to error?
I had there error before but changed it to match the code several lines above:
/* Don't allow variables to be created for types. */
if (var->root->exp->elts[0].opcode == OP_TYPE)
{
do_cleanups (old_chain);
fprintf_unfiltered (gdb_stderr, "Attempt to use a type name"
" as an expression.\n");
return NULL;
}
+
mi_gdb_test "-var-create int * int" \
"&\"Attempt to use a type name as an expression.\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create int"
Expecting this former case cannot be changed due to MI2 compatibility but I am
free to change the new error "Failed to find the specified frame." to use
error(). Check it in with or without error()?
Thanks,
Jan
next prev parent reply other threads:[~2009-08-10 17:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 16:55 Jan Kratochvil
2009-08-10 17:00 ` Vladimir Prus
2009-08-10 17:47 ` Jan Kratochvil [this message]
2009-08-13 15:03 ` Vladimir Prus
2009-08-26 20:08 ` Jan Kratochvil
2009-08-27 5:35 ` Vladimir Prus
2009-08-27 7:37 ` Jan Kratochvil
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=20090810170045.GA15882@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=vladimir@codesourcery.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