Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314338 - Request a specific format when opening a memory monitor on variables
Summary: Request a specific format when opening a memory monitor on variables
Status: RESOLVED INVALID
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf (show other bugs)
Version: 7.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Pawel Piech CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 15:21 EDT by Ken Ryall CLA
Modified: 2010-05-26 13:01 EDT (History)
1 user (show)

See Also:


Attachments
specifically request expression value for view memory (3.96 KB, patch)
2010-05-25 15:21 EDT, Ken Ryall CLA
ken.ryall: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Ryall CLA 2010-05-25 15:21:53 EDT
Created attachment 169885 [details]
specifically request expression value for view memory

Currently when you attempt to view memory on a variable DsfMemoryBlockRetrieval.resolveMemoryAddress asks for an expression's value as IFormattedValues.HEX_FORMAT and then turns this into an address value to use for the memory monitor. This works OK in simple cases but sometimes when viewing memory on some types people expect to inspect an address that isn't the one you would put into the Variables or Expressions view. Also if the Expressions service is employing a custom formatter to on the expression it may return a value that can't be readily turned into an address.

This patch contains a low impact solution for this, which is to add a new format IFormattedValues.ADDRESS_FORMAT that lets the Expression service know the request is specifically for viewing memory on that expression.

Alternately a new API could be added to IExpressions2 to replace the use of getFormattedValueContext.

The attached patch also fixes a problem where no error is reported when viewing memory on a variable fails.
Comment 1 Ken Ryall CLA 2010-05-26 13:01:14 EDT
Never mind, this was a dumb idea. We may still need a better way of getting the "view memory" address of a variable, but our immediate problem is resolved with the fix for bug 309193.