From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 01/22] [GDBserver] Multi-process + multi-arch: core + GNU/Linux x86*
Date: Mon, 03 Jun 2013 08:47:00 -0000 [thread overview]
Message-ID: <51AC582E.5050702@codesourcery.com> (raw)
In-Reply-To: <20130530121343.15047.2067.stgit@brno.lan>
On 05/30/2013 08:13 PM, Pedro Alves wrote:
> diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c
> index 6953d0e..39eb52e 100644
> --- a/gdb/gdbserver/inferiors.c
> +++ b/gdb/gdbserver/inferiors.c
> @@ -102,7 +102,6 @@ add_thread (ptid_t thread_id, void *target_data)
> current_inferior = new_thread;
>
> new_thread->target_data = target_data;
> - set_inferior_regcache_data (new_thread, new_register_cache ());
After read your introduction of this patch, it looks right to me.
However, we may need some comments on creating regcache lazily in the
code. One paragraph in the mail is pretty good,
> The threads' regcaches are now created lazilly. The old scheme where
> we created each of them when we added a new thread doesn't work
> anymore, because we add the main thread/lwp before we see it stop for
> the first time, and it is only when we see the thread stop for the
> first time that we have a chance of determining the inferior's
> architecture (through the_low_target.arch_setup). Therefore when we
> add the main thread we don't know which architecture/tdesc its
> regcache should have.
I'd like to put this paragraph somewhere in the code, which will be helpful.
> diff --git a/gdb/gdbserver/regcache.h b/gdb/gdbserver/regcache.h
> index ce86322..700a2fe 100644
> --- a/gdb/gdbserver/regcache.h
> +++ b/gdb/gdbserver/regcache.h
> @@ -21,6 +21,7 @@
>
> struct inferior_list_entry;
> struct thread_info;
> +struct target_desc;
>
> /* The register exists, it has a value, but we don't know what it is.
> Used when inspecting traceframes. */
> @@ -35,6 +36,9 @@ struct thread_info;
>
> struct regcache
> {
> + /* The regcache's description. */
"The regcache's target description" ?
--
Yao (é½å°§)
next prev parent reply other threads:[~2013-06-03 8:47 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 12:13 [PATCH 00/22 v3] [GDBserver] Multi-process + multi-arch Pedro Alves
2013-05-30 12:13 ` [PATCH 01/22] [GDBserver] Multi-process + multi-arch: core + GNU/Linux x86* Pedro Alves
2013-06-03 8:47 ` Yao Qi [this message]
2013-06-03 15:24 ` Pedro Alves
2013-05-30 12:14 ` [PATCH 08/22] [GDBserver] Multi-process + multi-arch: GNU/Linux m68k Pedro Alves
2013-05-30 12:14 ` [PATCH 06/22] [GDBserver] Multi-process + multi-arch: GNU/Linux MIPS Pedro Alves
2013-05-30 12:14 ` [PATCH 02/22] [GDBserver] Multi-process + multi-arch: GNU/Linux IA64 Pedro Alves
2013-05-30 12:14 ` [PATCH 11/22] [GDBserver] Multi-process + multi-arch: GNU/Linux CRIS Pedro Alves
2013-05-30 12:14 ` [PATCH 07/22] [GDBserver] Multi-process + multi-arch: GNU/Linux ARM Pedro Alves
2013-05-30 12:14 ` [PATCH 03/22] [GDBserver] Multi-process + multi-arch: GNU/Linux SPARC Pedro Alves
2013-05-30 12:14 ` [PATCH 10/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Blackfin Pedro Alves
2013-05-30 12:14 ` [PATCH 09/22] [GDBserver] Multi-process + multi-arch: GNU/Linux SH Pedro Alves
2013-05-30 12:14 ` [PATCH 05/22] [GDBserver] Multi-process + multi-arch: GNU/Linux S/390 Pedro Alves
2013-05-30 12:14 ` [PATCH 04/22] [GDBserver] Multi-process + multi-arch: GNU/Linux PowerPC Pedro Alves
2013-05-30 12:15 ` [PATCH 18/22] [GDBserver] Multi-process + multi-arch: GNU/Linux TILE-Gx Pedro Alves
2013-05-30 12:15 ` [PATCH 17/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Aarch64 Pedro Alves
2013-05-30 12:15 ` [PATCH 13/22] [GDBserver] Multi-process + multi-arch: GNU/Linux M32R Pedro Alves
2013-05-30 12:15 ` [PATCH 15/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Xtensa Pedro Alves
2013-05-30 12:15 ` [PATCH 19/22] [GDBserver] Multi-process + multi-arch: SPU Pedro Alves
2013-05-30 12:15 ` [PATCH 14/22] [GDBserver] Multi-process + multi-arch: GNU/Linux TI C6x Pedro Alves
2013-06-03 9:15 ` Yao Qi
2013-06-03 15:25 ` Pedro Alves
2013-05-30 12:15 ` [PATCH 12/22] [GDBserver] Multi-process + multi-arch: GNU/Linux CRISv32 Pedro Alves
2013-05-30 12:15 ` [PATCH 16/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Nios 2 Pedro Alves
2013-05-30 12:16 ` [PATCH 22/22] [GDBserver] Multi-process + multi-arch: QNX NTO Pedro Alves
2013-05-30 12:16 ` [PATCH 20/22] [GDBserver] Multi-process + multi-arch: Windows Pedro Alves
2013-05-30 12:16 ` [PATCH 21/22] [GDBserver] Multi-process + multi-arch: LynxOS Pedro Alves
2013-06-07 10:51 ` [COMMIT PATCH][GDBserver] Multi-process + multi-arch Pedro Alves
2013-06-07 10:57 ` Pedro Alves
2013-06-08 1:56 ` gdbserver regression [Re: [COMMIT PATCH][GDBserver] Multi-process + multi-arch] Jan Kratochvil
2013-06-10 10:24 ` Pedro Alves
2013-06-11 13:57 ` Pedro Alves
2013-06-11 15:44 ` Jan Kratochvil
2013-06-11 15:51 ` Pedro Alves
2013-06-11 18:07 ` Pedro Alves
2013-06-12 14:53 ` gdbserver regression #2 " Jan Kratochvil
2013-06-12 15:09 ` Pedro Alves
2013-06-12 16:47 ` Pedro Alves
-- strict thread matches above, loose matches on Subject: below --
2013-05-29 16:24 [PATCH 00/22] [GDBserver] Multi-process + multi-arch Pedro Alves
2013-05-29 16:25 ` [PATCH 01/22] [GDBserver] Multi-process + multi-arch: core + GNU/Linux x86* Pedro Alves
2013-05-29 19:03 ` Tom Tromey
2013-05-30 12:01 ` Pedro Alves
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=51AC582E.5050702@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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