* [commit] Fix Xtensa-specific bug in MI command
@ 2011-03-09 3:46 Maxim Grigoriev
2011-03-09 4:26 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Maxim Grigoriev @ 2011-03-09 3:46 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 70 bytes --]
Fix Xtensa-specific bug in MI command -data-list-changed-registers.
[-- Attachment #2: MIregs.diff --]
[-- Type: text/plain, Size: 1550 bytes --]
2011-03-08 Maxim Grigoriev <maxim2405@gmail.com>
* xtensa-tdep.c (xtensa_register_reggroup_p): Count in all registers
while executing MI command -data-list-changed-registers.
Index: gdb/xtensa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xtensa-tdep.c,v
retrieving revision 1.49
diff -u -r1.49 xtensa-tdep.c
--- gdb/xtensa-tdep.c 9 Mar 2011 02:25:12 -0000 1.49
+++ gdb/xtensa-tdep.c 9 Mar 2011 02:51:35 -0000
@@ -813,6 +813,11 @@
xtensa_register_group_t rg = reg->group;
int cp_number;
+ if (group == save_reggroup)
+ /* Every single register should be included into the list of registers
+ to be watched for changes while using -data-list-changed-registers. */
+ return 1;
+
/* First, skip registers that are not visible to this target
(unknown and unmapped registers when not using ISS). */
@@ -828,13 +833,11 @@
return rg & xtRegisterGroupFloat;
if (group == general_reggroup)
return rg & xtRegisterGroupGeneral;
- if (group == float_reggroup)
- return rg & xtRegisterGroupFloat;
if (group == system_reggroup)
return rg & xtRegisterGroupState;
if (group == vector_reggroup || group == xtensa_vectra_reggroup)
return rg & xtRegisterGroupVectra;
- if (group == save_reggroup || group == restore_reggroup)
+ if (group == restore_reggroup)
return (regnum < gdbarch_num_regs (gdbarch)
&& (reg->flags & SAVE_REST_FLAGS) == SAVE_REST_VALID);
if ((cp_number = xtensa_coprocessor_register_group (group)) >= 0)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [commit] Fix Xtensa-specific bug in MI command
2011-03-09 3:46 [commit] Fix Xtensa-specific bug in MI command Maxim Grigoriev
@ 2011-03-09 4:26 ` Joel Brobecker
2011-03-09 18:38 ` Maxim Grigoriev
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2011-03-09 4:26 UTC (permalink / raw)
To: Maxim Grigoriev; +Cc: gdb-patches
> Fix Xtensa-specific bug in MI command -data-list-changed-registers.
A small request: If you could give more details with your patches
about what you are fixing. For the previous ones, there wasn't
much to add, just extending support for new features. But for this
one, it would have been helpful to know what type of bug it was.
For instance, a transcript showing the issue can be useful to
other people hitting the problem, and doing an internet search.
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [commit] Fix Xtensa-specific bug in MI command
2011-03-09 4:26 ` Joel Brobecker
@ 2011-03-09 18:38 ` Maxim Grigoriev
0 siblings, 0 replies; 3+ messages in thread
From: Maxim Grigoriev @ 2011-03-09 18:38 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On 03/08/2011 07:51 PM, Joel Brobecker wrote:
>> Fix Xtensa-specific bug in MI command -data-list-changed-registers.
>>
> A small request: If you could give more details with your patches
> about what you are fixing. For the previous ones, there wasn't
> much to add, just extending support for new features. But for this
> one, it would have been helpful to know what type of bug it was.
> For instance, a transcript showing the issue can be useful to
> other people hitting the problem, and doing an internet search.
>
>
Eclipse CDT uses this MI command to get a list of changed
registers compared to the previous register file state saved before.
It happens, when Eclipse user opens a register display window.
After each new event in the debugging session, such as "step",
"next" ( which lead to executing some instruction(s) on the target ),
updated registers are high-lighted in that display window.
MI command -data-list-changed-registers uses generic hook
gdbarch_register_reggroup_p ()
to analyse updates to the register file.
Registers from standard GDB group "save_reggroup" have
to be always a part of this analysis.
It's been missing on Xtensa. That's why changed registers
did not always display properly in the Eclipse register
display window.
Thanks for your notes and suggestions,
-- Maxim Grigoriev
Tensilica, Inc.
Santa Clara, CA
408-566-1770
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-09 18:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-09 3:46 [commit] Fix Xtensa-specific bug in MI command Maxim Grigoriev
2011-03-09 4:26 ` Joel Brobecker
2011-03-09 18:38 ` Maxim Grigoriev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox