Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312055 - [registers][cdi] DSF mishandles empty register names in -data-list-register-names response
Summary: [registers][cdi] DSF mishandles empty register names in -data-list-register-n...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 6.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-07 09:16 EDT by John Dallaway CLA
Modified: 2010-07-28 15:26 EDT (History)
2 users (show)

See Also:


Attachments
Fix. (1.96 KB, patch)
2010-05-09 18:24 EDT, Nobody - feel free to take it CLA
nobody: iplog-
Details | Diff
Updated patch. (1.98 KB, patch)
2010-05-10 11:33 EDT, Nobody - feel free to take it CLA
nobody: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Dallaway CLA 2010-05-07 09:16:42 EDT
Build Identifier: Eclipse I20100420-0800, CDT HEAD

This is a CDI DSF parity bug.

arm-eabi-gdb 6.8.50.20080706 responds to the GDB/MI "-data-list-register-names" command as follows:

148,679 (gdb) 
152,255 36-data-list-register-names
152,257 36^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12",\
"sp","lr","pc","f0","f1","f2","f3","f4","f5","f6","f7","fps","cpsr","","","","","","","","","","",""\
,"","","","","","","","","","","","","","","","","","","","",""]
152,257 (gdb) 

The DSF debugger appears to treat the empty register names as valid registers and presents many additional rows in the CDT Registers view. For each row, the "Name" column is blank and the "Value" column contains an error string such as:

  Failed to execute MI command: -data-list-register-values d 54
  Error message from debugger back end: bad register number

The CDI JTAG debugger appears to ignore the empty register names and presents the register list correctly.

Reproducible: Always

Steps to Reproduce:
1. Launch a DSF JTAG debugging session using arm-eabi-gdb and a JTAG debugger.
2. Show the Registers view.
3. Observe bogus rows within the Registers view.
Comment 1 Nobody - feel free to take it CLA 2010-05-07 11:54:19 EDT
Marc, if you don't mind I'll take a look at this one. We have the same problem.
Comment 2 Marc Khouzam CLA 2010-05-07 20:36:36 EDT
(In reply to comment #1)
> Marc, if you don't mind I'll take a look at this one. We have the same problem.

It is not my place to mind :-)
All bugs are up for grab by anyone.  The more you can take care of the happier I am :-)
Comment 3 Nobody - feel free to take it CLA 2010-05-09 18:24:52 EDT
Created attachment 167640 [details]
Fix.
Comment 4 Marc Khouzam CLA 2010-05-10 06:28:39 EDT
(In reply to comment #3)
> Created an attachment (id=167640) [details]
> Fix.

Ok with me but please don't use String.isEmpty() since it is not available in Java 5.
Comment 5 Nobody - feel free to take it CLA 2010-05-10 11:33:31 EDT
Created attachment 167731 [details]
Updated patch.
Comment 6 Marc Khouzam CLA 2010-05-10 11:35:13 EDT
(In reply to comment #5)
> Created an attachment (id=167731) [details]
> Updated patch.

+1 
Thanks
Comment 7 Nobody - feel free to take it CLA 2010-05-10 11:41:03 EDT
Committed to HEAD.
Comment 8 CDT Genie CLA 2010-07-28 15:26:23 EDT
*** cdt cvs genie on behalf of mkhodjai ***
Bug 312055 -  [registers][cdi] DSF mishandles empty register names in -data-list-register-names response.

[*] MIRegisters.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java?root=Tools_Project&r1=1.7&r2=1.8