Bug 504067 - [registers] With user defined groups register format change becomes buggy
Summary: [registers] With user defined groups register format change becomes buggy
Status: ASSIGNED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.6.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-05 09:10 EDT by Stanislav Perepelitsa CLA
Modified: 2020-09-04 15:23 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Perepelitsa CLA 2016-10-05 09:10:38 EDT
How to reproduce:
- Start debug session for ARM with GDB connection.
- Open Register view
- Create one or two user register group and add several (say r1, r2, r3) registers
- Change individual format of r1 in one group.
- Open same register for editing in another group. 

Observed behaviour: register opened for editing suddenly change format for one in another group.

Expected behaviour: register opened for editing in same format as it was displayed.
Comment 1 Stanislav Perepelitsa CLA 2016-10-12 14:16:57 EDT
Just tried experiment with three groups and fond out that
register opens up for editing in last selected format, regardless of group where selection takes place.
This means that on opening in place editor the format identifier read from register entity, not from displaying node.

Will look for this place in the code.
Comment 2 Marc Khouzam CLA 2016-10-28 14:08:53 EDT
What I believe is happening is that the new format affects all lines showing the same register, except that we haven't refreshed them, so still show the old format.

The expected behaviour is that if you change the register in the group to show in e.g. Hex, all other instances of that register should immediately start showing in Hex.

I confirmed this by simply stepping one line which forces the view to refresh.  The you see all instances of the modified register show in the same format.
Comment 3 Stanislav Perepelitsa CLA 2016-10-31 08:49:58 EDT
Hi Mark!
The point is that changed format affects only the register under edit. Then you close an editor the format jumps to one set for given instance of register. And this is really confusing. BTW, all other instances keep their formats regardless of stepping event.
Comment 4 Stanislav Perepelitsa CLA 2016-10-31 09:06:52 EDT
(In reply to Stanislav Perepelitsa from comment #3)
>BTW, all other instances keep their formats regardless of stepping event.

I was wrong. The latter statement is not true.
So, is it an example of whole CDT design idea, where everything goes fine after step? :-)
Comment 5 Marc Khouzam CLA 2016-10-31 09:31:35 EDT
(In reply to Stanislav Perepelitsa from comment #4)
> (In reply to Stanislav Perepelitsa from comment #3)
> >BTW, all other instances keep their formats regardless of stepping event.
> 
> I was wrong. The latter statement is not true.
> So, is it an example of whole CDT design idea, where everything goes fine
> after step? :-)

After a step (or a resume that then hits a breakpoint), information on the debug program can have changed, so CDT refreshes _everything_.  That is why the registers all properly show their value.

When you change the format of a register, CDT only updates that register (for efficiency).  However, register groups, which were added later, allow for a single register to be in multiple lines, so all of these lines should be updated appropriately.

So, definitely, this is a bug.

BTW, you can manually force a view to fully refresh.  Info here:
https://wiki.eclipse.org/CDT/User/FAQ#Must_the_Debugging_views_refresh_automatically.3F