target/xtensa: drop num_[core_]regs from dc232b/dc233c configs
PATCH 1/1 target/xtensa: drop num_[core_]regs from dc232b/dc233c configs
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.
--- target/xtensa/core-dc232b.c | 2 -- target/xtensa/core-dc233c.c | 2 -- 2 files changed, 4 deletions(-)
target/xtensa/core-dc232b.c +0 -2
@@ -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" }
target/xtensa/core-dc233c.c +0 -2
@@ -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" }
Signature · 1 line
2.11.0
Quoted 12 lines · Max Filippov
gdb_regmap::num_core_regsfield 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_regsdoes the right thing, remove manual initialization of these fields from the affected configurations and letxtensa_finalize_configinitialize them.
Quoted 6 lines
Signed-off-by Max Filippov <[email protected]>--- target/xtensa/core-dc232b.c | 2 -- target/xtensa/core-dc233c.c | 2 -- 2 files changed, 4 deletions(-)
r~
Hi Max,
Quoted 14 lines · Richard Henderson
Quoted 12 lines · Max Filippov
gdb_regmap::num_core_regsfield 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_regsdoes the right thing, remove manual initialization of these fields from the affected configurations and letxtensa_finalize_configinitialize them.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Max Filippov <[email protected]>--- target/xtensa/core-dc232b.c | 2 -- target/xtensa/core-dc233c.c | 2 -- 2 files changed, 4 deletions(-)Reviewed-by Richard Henderson <[email protected]>
Can we include this patch for the 3.2 release?
Thanks,
Phil.
Quoted 26 lines · Philippe Mathieu-Daudé
Hi Max,
Quoted 21 lines · Richard Henderson
Quoted 18 lines · Max Filippov
gdb_regmap::num_core_regsfield 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_regsdoes the right thing, remove manual initialization of these fields from the affected configurations and letxtensa_finalize_configinitialize them.Signed-off-by Max Filippov <[email protected]>--- target/xtensa/core-dc232b.c | 2 -- target/xtensa/core-dc233c.c | 2 -- 2 files changed, 4 deletions(-)
Quoted 3 lines
Quoted 1 line
Reviewed-by Richard Henderson <[email protected]>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.
Signature · 2 lines
Thanks. -- Max