Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317247 - [variables][preferences] Unused number format preference is confusing.
Summary: [variables][preferences] Unused number format preference is confusing.
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
: 418503 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-17 17:54 EDT by g_giacomello CLA
Modified: 2020-09-04 15:21 EDT (History)
6 users (show)

See Also:


Attachments
Screenshot of hexadecimal visualization problem (187.85 KB, image/png)
2010-06-17 18:04 EDT, g_giacomello CLA
no flags Details
Packets installed under Eclipse (100.26 KB, image/png)
2010-06-17 18:19 EDT, g_giacomello CLA
no flags Details
Screenshot of number format sub-menu. (29.35 KB, image/png)
2010-07-09 17:56 EDT, Pawel Piech CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description g_giacomello CLA 2010-06-17 17:54:59 EDT
Build Identifier: I20100603-1500

I want to change registers and expressions from decimal to hex so I go to "window\preference\c-c++\debug" and change all to hexadecimal, but are always displayed in decimal. I restarted eclipse, but noting changed. I'm using CodeSourcery for ARM as toolchain, GDB as debugger with SEGGER J-Link interface.

Reproducible: Always

Steps to Reproduce:
1. Compile a basic "Hello World" application with CodeSourcery for ARM
2. Configure a "GDB Hardware Debugging"
3. Run Debug
Comment 1 g_giacomello CLA 2010-06-17 18:04:01 EDT
Created attachment 172167 [details]
Screenshot of hexadecimal visualization problem
Comment 2 g_giacomello CLA 2010-06-17 18:19:30 EDT
Created attachment 172168 [details]
Packets installed under Eclipse
Comment 3 g_giacomello CLA 2010-06-17 18:25:20 EDT
I have also find thath is possible to change rapresentation inside every single frame (registers frame) and here I can change from decimal to hex. 
Inside "window\preference\c-c++\debug" every change do noting.
Comment 4 Pawel Piech CLA 2010-07-09 17:56:03 EDT
Created attachment 173927 [details]
Screenshot of number format sub-menu.

Unfortunately, the given preference is ignored by DSF-based debuggers.  You can set the default number format in each view by selecting the view menu

We need to unify or link these preferences to avoid such confusion.
Comment 5 John Moule CLA 2014-07-22 10:20:59 EDT
I think the following is a duplicate of this:
Bug 418503 - Setting the default number format for the expression/variable/register views does not work.
Comment 6 Marc Khouzam CLA 2014-07-22 10:26:57 EDT
*** Bug 418503 has been marked as a duplicate of this bug. ***
Comment 7 John Moule CLA 2014-07-22 11:36:14 EDT
It would be great if it were possible to programmatically set the default number format used by the Variables, Expressions and Registers view.

I tried to do this using the export preferences method* and setting these values in the preference customization file (plugin_customization.ini) pointed to by ext point="org.eclipse.core.runtime.products" however I couldn't get this to work.

These are the values I used. I tried with and without the /instance/ prefix:

/instance/org.eclipse.debug.ui/pref_state_memento.org.eclipse.debug.ui.ExpressionView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.ExpressionView">\r\n<STRING IMemento.internal.id\="CurrentNumericStyle" STRING\="HEX.Format"/>\r\n<INTEGER IMemento.internal.id\="initialChildCountLimitForCollections" INTEGER\="100"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>

/instance/org.eclipse.debug.ui/pref_state_memento.org.eclipse.debug.ui.VariableView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="493" org.eclipse.debug.ui.SASH_VIEW_PART\="506">\r\n<COLUMN_SIZES IMemento.internal.id\="org.eclipse.cdt.dsf.ui.COLUMN_ID__TYPE" SIZE\="209"/>\r\n<COLUMN_SIZES IMemento.internal.id\="org.eclipse.cdt.dsf.ui.COLUMN_ID__VALUE" SIZE\="346"/>\r\n<COLUMN_SIZES IMemento.internal.id\="org.eclipse.cdt.dsf.ui.COLUMN_ID__NAME" SIZE\="346"/>\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.VariableView">\r\n<STRING IMemento.internal.id\="CurrentNumericStyle" STRING\="HEX.Format"/>\r\n<INTEGER IMemento.internal.id\="initialChildCountLimitForCollections" INTEGER\="100"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>

/instance/org.eclipse.debug.ui/pref_state_memento.org.eclipse.debug.ui.RegisterView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.RegisterView">\r\n<STRING IMemento.internal.id\="CurrentNumericStyle" STRING\="HEX.Format"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>


Anyone know if this is possible please?

cheers john


*: export preferences method
During a debug session I manually changed the number format (as describe in https://bugs.eclipse.org/bugs/show_bug.cgi?id=317247#c4) and then exported the Eclipse preferences (File > Export > Gneneral > Preferences). I compared the exported file with one I had previously saved so the differences were obvious.
Comment 8 John Moule CLA 2014-07-22 12:04:52 EDT
Scratch that and reverse it. I *could* get it to work! I had to use a clean configuration area and workspace. And I used the values without the /instance/ prefix: ie

org.eclipse.debug.ui/pref_state_memento.org.eclipse.debug.ui.ExpressionView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.ExpressionView">\r\n<STRING IMemento.internal.id\="CurrentNumericStyle" STRING\="HEX.Format"/>\r\n<INTEGER IMemento.internal.id\="initialChildCountLimitForCollections" INTEGER\="100"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>

org.eclipse.debug.ui/pref_state_memento.org.eclipse.debug.ui.VariableView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="493" org.eclipse.debug.ui.SASH_VIEW_PART\="506">\r\n<COLUMN_SIZES IMemento.internal.id\="org.eclipse.cdt.dsf.ui.COLUMN_ID__TYPE" SIZE\="209"/>\r\n<COLUMN_SIZES IMemento.internal.id\="org.eclipse.cdt.dsf.ui.COLUMN_ID__VALUE" SIZE\="346"/>\r\n<COLUMN_SIZES IMemento.internal.id\="org.eclipse.cdt.dsf.ui.COLUMN_ID__NAME" SIZE\="346"/>\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.VariableView">\r\n<STRING IMemento.internal.id\="CurrentNumericStyle" STRING\="HEX.Format"/>\r\n<INTEGER IMemento.internal.id\="initialChildCountLimitForCollections" INTEGER\="100"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>

org.eclipse.debug.ui/pref_state_memento.org.eclipse.debug.ui.RegisterView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.RegisterView">\r\n<STRING IMemento.internal.id\="CurrentNumericStyle" STRING\="HEX.Format"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>


Now the Variables, Expressions and Registers views display values in hex by default.