* [Qemu-devel] [PATCH] target/xtensa: drop num_[core_]regs from dc232b/dc233c configs
@ 2018-10-31 21:35 Max Filippov
2018-10-31 23:00 ` Richard Henderson
0 siblings, 1 reply; 4+ messages in thread
From: Max Filippov @ 2018-10-31 21:35 UTC (permalink / raw)
To: qemu-devel; +Cc: Max Filippov, qemu-stable
gdb_regmap::num_core_regs field is initialized incorrectly in the dc232b
and dc233c configurations. As a result the following message is
displayed when attaching to an xtensa linux-user process:
"Register 105 is not available",
and gdb is unable to control the inferior.
Now that xtensa_count_regs does the right thing, remove manual
initialization of these fields from the affected configurations and let
xtensa_finalize_config initialize them.
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
target/xtensa/core-dc232b.c | 2 --
target/xtensa/core-dc233c.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/target/xtensa/core-dc232b.c b/target/xtensa/core-dc232b.c
index 71313378409e..7851bcb63687 100644
--- a/target/xtensa/core-dc232b.c
+++ b/target/xtensa/core-dc232b.c
@@ -40,8 +40,6 @@
static XtensaConfig dc232b __attribute__((unused)) = {
.name = "dc232b",
.gdb_regmap = {
- .num_regs = 120,
- .num_core_regs = 52,
.reg = {
#include "core-dc232b/gdb-config.inc.c"
}
diff --git a/target/xtensa/core-dc233c.c b/target/xtensa/core-dc233c.c
index d701e3f5de07..8853bfd4d08f 100644
--- a/target/xtensa/core-dc233c.c
+++ b/target/xtensa/core-dc233c.c
@@ -40,8 +40,6 @@
static XtensaConfig dc233c __attribute__((unused)) = {
.name = "dc233c",
.gdb_regmap = {
- .num_regs = 121,
- .num_core_regs = 52,
.reg = {
#include "core-dc233c/gdb-config.inc.c"
}
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] target/xtensa: drop num_[core_]regs from dc232b/dc233c configs
2018-10-31 21:35 [Qemu-devel] [PATCH] target/xtensa: drop num_[core_]regs from dc232b/dc233c configs Max Filippov
@ 2018-10-31 23:00 ` Richard Henderson
2018-11-11 23:52 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2018-10-31 23:00 UTC (permalink / raw)
To: Max Filippov, qemu-devel; +Cc: qemu-stable
On 10/31/18 9:35 PM, Max Filippov wrote:
> gdb_regmap::num_core_regs field is initialized incorrectly in the dc232b
> and dc233c configurations. As a result the following message is
> displayed when attaching to an xtensa linux-user process:
>
> "Register 105 is not available",
>
> and gdb is unable to control the inferior.
>
> Now that xtensa_count_regs does the right thing, remove manual
> initialization of these fields from the affected configurations and let
> xtensa_finalize_config initialize them.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
> target/xtensa/core-dc232b.c | 2 --
> target/xtensa/core-dc233c.c | 2 --
> 2 files changed, 4 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] target/xtensa: drop num_[core_]regs from dc232b/dc233c configs
2018-10-31 23:00 ` Richard Henderson
@ 2018-11-11 23:52 ` Philippe Mathieu-Daudé
2018-11-12 2:17 ` Max Filippov
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-11 23:52 UTC (permalink / raw)
To: Richard Henderson
Cc: Max Filippov, qemu-devel@nongnu.org Developers, qemu-stable
Hi Max,
On Thu, Nov 1, 2018 at 12:02 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 10/31/18 9:35 PM, Max Filippov wrote:
> > gdb_regmap::num_core_regs field is initialized incorrectly in the dc232b
> > and dc233c configurations. As a result the following message is
> > displayed when attaching to an xtensa linux-user process:
> >
> > "Register 105 is not available",
> >
> > and gdb is unable to control the inferior.
> >
> > Now that xtensa_count_regs does the right thing, remove manual
> > initialization of these fields from the affected configurations and let
> > xtensa_finalize_config initialize them.
> >
> > Cc: qemu-stable@nongnu.org
> > Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> > ---
> > target/xtensa/core-dc232b.c | 2 --
> > target/xtensa/core-dc233c.c | 2 --
> > 2 files changed, 4 deletions(-)
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Can we include this patch for the 3.2 release?
Thanks,
Phil.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] target/xtensa: drop num_[core_]regs from dc232b/dc233c configs
2018-11-11 23:52 ` Philippe Mathieu-Daudé
@ 2018-11-12 2:17 ` Max Filippov
0 siblings, 0 replies; 4+ messages in thread
From: Max Filippov @ 2018-11-12 2:17 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: Richard Henderson, qemu-devel, qemu-stable
On Sun, Nov 11, 2018 at 3:53 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Hi Max,
>
> On Thu, Nov 1, 2018 at 12:02 AM Richard Henderson
> <richard.henderson@linaro.org> wrote:
> >
> > On 10/31/18 9:35 PM, Max Filippov wrote:
> > > gdb_regmap::num_core_regs field is initialized incorrectly in the dc232b
> > > and dc233c configurations. As a result the following message is
> > > displayed when attaching to an xtensa linux-user process:
> > >
> > > "Register 105 is not available",
> > >
> > > and gdb is unable to control the inferior.
> > >
> > > Now that xtensa_count_regs does the right thing, remove manual
> > > initialization of these fields from the affected configurations and let
> > > xtensa_finalize_config initialize them.
> > >
> > > Cc: qemu-stable@nongnu.org
> > > Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> > > ---
> > > target/xtensa/core-dc232b.c | 2 --
> > > target/xtensa/core-dc233c.c | 2 --
> > > 2 files changed, 4 deletions(-)
> >
> > Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
> Can we include this patch for the 3.2 release?
I've found that this version is wrong (register lists are not
terminated for these
two cores), so I sent v2. After that I've found that it's still wrong,
i.e. the register
105 is still not available with v2. I dug a bit deeper and it looks
like register
handling should probably be the same for both system and linux-user cases.
I'll post v3 after some more testing in a few days.
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-12 2:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-31 21:35 [Qemu-devel] [PATCH] target/xtensa: drop num_[core_]regs from dc232b/dc233c configs Max Filippov
2018-10-31 23:00 ` Richard Henderson
2018-11-11 23:52 ` Philippe Mathieu-Daudé
2018-11-12 2:17 ` Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).