Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357440 - [disassembly] Add opcode ruler column to the disassembly view
Summary: [disassembly] Add opcode ruler column to the disassembly view
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 8.1.0   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 357270
  Show dependency tree
 
Reported: 2011-09-13 00:50 EDT by Scott Tepavich CLA
Modified: 2014-01-29 22:56 EST (History)
6 users (show)

See Also:


Attachments
Small patch to enable opcode ruler display and register tool-tips from backends. (40.31 KB, patch)
2011-09-13 14:08 EDT, Scott Tepavich CLA
cdtdoug: iplog+
Details | Diff
Focused opcode ruler patch (32.27 KB, patch)
2011-09-15 11:18 EDT, Scott Tepavich CLA
cdtdoug: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Tepavich CLA 2011-09-13 00:50:51 EDT
Build Identifier: I20110613-1736

A preference to turn on/off the display of opcode values and the ability to display the value of registers via tool-tips are missing.

Reproducible: Always
Comment 1 Anton Leherbauer CLA 2011-09-13 03:46:03 EDT
> A preference to turn on/off the display of opcode values

By coincidence this has been requested recently in bug 357270.
  
> and the ability to
> display the value of registers via tool-tips are missing.

This should already be possible by implementing IDisassemblyBackend.evaluateExpression(String() such that it can detect whether an expression denotes a register or simply by trying register evaluation as a fallback. 

/**
 * Evaluate an expression for text hover
 * 
 * @param expression
 *            the expression to be evaluated
 * @return the result, or "" if it doesn't resolve, for whatever reason
 */
String evaluateExpression(String expression);
Comment 2 Patrick Chuong CLA 2011-09-13 11:35:12 EDT
(In reply to comment #1)
> This should already be possible by implementing
> IDisassemblyBackend.evaluateExpression(String() such that it can detect whether
> an expression denotes a register or simply by trying register evaluation as a
> fallback. 
> /**
>  * Evaluate an expression for text hover
>  * 
>  * @param expression
>  *            the expression to be evaluated
>  * @return the result, or "" if it doesn't resolve, for whatever reason
>  */
> String evaluateExpression(String expression);

It would be nice if the disassembly view passed the selected text if there is any.

Since this bug is requesting for tooltip support, is it possible to have tooltip support for instruction documentation? Our customers have been requesting to show a short discription when hovering the mouse over the instruction in the disassembly view.
Comment 3 Scott Tepavich CLA 2011-09-13 14:08:05 EDT
Created attachment 203272 [details]
Small patch to enable opcode ruler display and register tool-tips from backends.
Comment 4 Anton Leherbauer CLA 2011-09-14 07:03:51 EDT
I have split this bug into
- the opcode ruler part (this bug) and
- the register tooltip enhancement - bug 357612.
Could you create patches for each feature separately? This should make it
easier to review and discuss. Thanks!
Comment 5 Scott Tepavich CLA 2011-09-15 11:18:56 EDT
Created attachment 203420 [details]
Focused opcode ruler patch
Comment 6 Anton Leherbauer CLA 2011-09-16 06:04:27 EDT
Thanks, it's committed and pushed to master with a few changes:
- fixed an NPE if a backend does not provide opcodes
- moved the preference options for the opcode ruler
- opcodes were not stored for disassembly lines with source info

Currently the radix prefix is always displayed for opcodes.  Maybe it would make sense to connect this to the existing "Force radix prefixes" preference.
Comment 7 CDT Genie CLA 2011-09-16 06:23:02 EDT
*** cdt git genie on behalf of Scott Tepavich ***

    Bug 357440 - [disassembly] Add opcode ruler column to the disassembly view

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=6f21f0999c51ae247aef0f0979c9fd2a522946dc