From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [RFC] Change the_dummy_target to be a global
Date: Tue, 05 Mar 2019 20:15:00 -0000 [thread overview]
Message-ID: <38644529-a5d6-1e24-97f8-b13b30bb87dd@redhat.com> (raw)
In-Reply-To: <20190304204100.27702-1-tromey@adacore.com>
On 03/04/2019 08:41 PM, Tom Tromey wrote:
> While debugging gdb, I printed the target stack and got:
>
> (top-gdb) p g_target_stack
> $10 = {
> m_top = thread_stratum,
> m_stack = {0x142b0b0, 0x13da600 <exec_ops>, 0x1c70690, 0x13d63b0 <ravenscar_ops>, 0x0, 0x0, 0x0}
> }
>
> (This is clearly from before the change to make ravenscar
> multi-target-capable.)
>
> Here, 0x142b0b0 is the singleton dummy target. It seems to me that
> since this is always a singleton, it would be a bit nicer if it were a
> global, so that it would be noted in the above.
>
> This patch implements this idea, and now I get:
>
> (top-gdb) p g_target_stack
> $2 = {
> m_top = dummy_stratum,
> m_stack = {0x1f1b040 <the_dummy_target>, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
> }
>
> I did not do the same for the debug target. It didn't seem as useful
> to me.
>
> gdb/ChangeLog
> 2019-03-04 Tom Tromey <tromey@adacore.com>
>
> * target.c (the_dummy_target): Move later. Change type to
> "dummy_target".
> (initialize_targets): Don't initialize the_dummy_target.
Yes, I think that's fine.
At some point in the multi-target branch I made a change like that,
but the current state of the branch it's back to being heap-allocated.
I'm not seeing any reason that requires that, though. I replicated
the change on top of the branch and ran the new multi-target tests,
and they all still passed.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2019-03-05 20:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 20:41 Tom Tromey
2019-03-05 20:15 ` Pedro Alves [this message]
2019-03-05 20:46 ` 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=38644529-a5d6-1e24-97f8-b13b30bb87dd@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.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