From: Tom Tromey <tromey@redhat.com>
To: pmuldoon@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] [python] mi/12531
Date: Mon, 18 Apr 2011 20:58:00 -0000 [thread overview]
Message-ID: <m3sjtf5lay.fsf@fleche.redhat.com> (raw)
In-Reply-To: <m3mxjuns7d.fsf@redhat.com> (Phil Muldoon's message of "Wed, 13 Apr 2011 15:25:58 +0100")
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> This patch fixes a case where an MI user could install a visualizer on a
Phil> synthetic varobj. If we detect that the object is a CPLUS_FAKE_CHILD,
Phil> we do not install a visualizer. I thought about raising an error, but
Phil> other MI behavior with fake children is just to move on if possible. I
Phil> did the same.
Thanks for doing this.
I have some comments, but they are all minor things.
Phil> 2011-04-13 Phil Muldoon <pmuldoon@redhat.com>
Phil> * varobj.c (install_default_visualizer): Do not install a
Phil> visualizer if the varobj is CPLUS_FAKE_CHILD.
Phil> (construct_visualizer): Likewise.
I thought there was a PR open for this. If so, it should be mentioned
in the ChangeLog. (If it is just in Red Hat bugzilla then it is
optional; but if you choose to use it, put the whole URL in.)
Phil> +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ additional_flags=-DMI}] != "" } {
This should be split somewhere.
Phil> + untested "Couldn't compile ${srcfile} in c++ mode"
Phil> + return -1
Wrong indentation, I think.
Phil> + }
Definitely wrong indentation :)
Phil> +mi_continue_to_line [gdb_get_line_number {break to inspect struct and union} ${testfile}.c] \
Split this line somewhere.
Phil> #ifdef __cplusplus
Phil> +#include <string>
It is best not to rely on libstdc++ in the test suite.
I think just an ordinary struct ought to exhibit the behavior you need,
as long as the file is compiled by the C++ compiler. So, you probably
don't need any additional classes. But, if you do, you have to write
them yourself :)
Phil> static void
Phil> install_default_visualizer (struct varobj *var)
Phil> {
Phil> +
Phil> + /* Do not install a visualizer on a CPLUS_FAKE_CHILD. */
Phil> + if (CPLUS_FAKE_CHILD (var))
Phil> + return;
Spurious blank line after the "{".
Tom
next prev parent reply other threads:[~2011-04-18 20:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 14:26 Phil Muldoon
2011-04-18 20:58 ` Tom Tromey [this message]
2011-04-19 10:47 ` Phil Muldoon
2011-04-19 13:07 ` Tom Tromey
2011-04-29 12:52 ` Phil Muldoon
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=m3sjtf5lay.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pmuldoon@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