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

Bug 325677

Summary: edc - disassembly - context menu item "Show Function Offsets" not working
Product: [Tools] CDT Reporter: Kirk Beitz <kirk.beitz>
Component: cdt-debug-edcAssignee: Ken Ryall <ken.ryall>
Status: RESOLVED FIXED QA Contact: Ken Ryall <ken.ryall>
Severity: normal    
Priority: P3    
Version: 7.0.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch to fill function name & offset for instructions so "Show Function Offsets" works in DisassemblyBackendDsf cdtdoug: iplog+

Description Kirk Beitz CLA 2010-09-18 09:07:31 EDT
Created attachment 179172 [details]
patch to fill function name & offset for instructions so "Show Function Offsets" works in DisassemblyBackendDsf

when the user chooses "Show Function Offsets" from the context menu for edc, nothing is displayed.  in contrast, dsf gdb displays function name + offset.

the attached patch was formerly part of a much larger patch in Bug 325284, but has been extracted due to that bug relying on Bug 325277.  it represents the simplest patch to HEAD as of 2010.09.17 w.r.t. performing this functionality.


- EDCInstructionFunctionInfo.java
  - a new container for function name & starting address that can be made to
    apply to a function or a portion thereof if so requested, including a
    single line.  the simple constructor is for when function name & start
    are known at call time.  the alternate constructor will take an IEDCModule
    and ILineEntry and construct the function & address if possible.

- EDCInstruction.java
  - modified to add setters for functionName & offset; it already had getters
    for both as part of its contract to fulfill implementation of IInstruction;
    these have been modified to return the values stored by the setters.

- Disassembly.java
  - modified to populate EDCInstructions with function & offset info prior to
    being passed returned to the caller via RM (i.e. DisassemblyBackendDsf).

- ARMDisassembly.java
- RangeAndMode.java
  - modified to demonstrate the optimization to pass Disassembly#mixSource an
    EDCInstructionFunctionInfo object so it doesn't have to be calculated per
    line.

this patch applies cleanly to head as of 2010.09.18, and has been tested with the edc windows debugger; a modified version of the attached patch has been tested together with other disassembly changes, and is planned for later merge together at the same time.
Comment 1 Kirk Beitz CLA 2010-10-06 22:45:40 EDT
resolved with 2010.oct.04 edc merge commits by ken.ryall@nokia.com