Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324836

Summary: [pretty printers] Disable cast-to-type action for expression with a dynamic ancestor
Product: [Tools] CDT Reporter: Jens Elmenthaler <jens.elmenthaler>
Component: cdt-debug-dsf-gdbAssignee: Project Inbox <cdt-debug-dsf-gdb-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: pawel.1.piech
Version: 8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 302121    
Bug Blocks:    

Description Jens Elmenthaler CLA 2010-09-09 06:44:02 EDT
Build Identifier: CDT HEAD

This feature requires the ability on gdb side to evaluate the full
expression for the associated varobj. The gdb can't do that for varobjs that have a dynamic ancestor. Thus we should (ideally) disable it for such expressions.

(Note that it still works for a dynamic varobj that doesn't have a
dynamic ancestor).

Background:
The action is handled in org.eclipse.cdt.debug.internal.ui.actions.CastToTypeActionHandler, and I don't
see a way to control its enabled state.

Another approach could be ti check for
CastedExpressionDMC in MIExpressions and add special handling, like no
children, the values like "N/A (child of pretty-printed object)" as value, etc.


Reproducible: Always