Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347047 - [tracepoints] Trace visualization does not show proper frames with GDB >= 7.3
Summary: [tracepoints] Trace visualization does not show proper frames with GDB >= 7.3
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0.1   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-24 14:44 EDT by Marc Khouzam CLA
Modified: 2011-06-28 14:58 EDT (History)
2 users (show)

See Also:


Attachments
Cleanup of MIStack (8.49 KB, patch)
2011-06-09 15:32 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
Git patch to cleanup MIStack (9.08 KB, patch)
2011-06-28 14:32 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-05-24 14:44:14 EDT
When trying CDT with the GDB 7.3 branch or GDB HEAD, to visualize trace data, I'm seeing two identical stack frames and the selection jumps from one to the other because they are the same.

This version of GDB returns more than one stack frame but in MIStack, I had made the assumption that GDB would only return one frame during trace visualization.

This must be handled more generically to work for different versions of GDB.
Comment 1 Marc Khouzam CLA 2011-06-09 12:04:13 EDT
Here are some traces I get when trying to show trace data that was collected when two stack frames were active:

294,751 [MI]  28-trace-find frame-number 1
294,754 [MI]  28^done,found="1",tracepoint="2",traceframe="1",frame={level="0",addr="0x08048978",fun\
c="fool",args=[{name="i",value="<unavailable>"},{name="j",value="<unavailable>"}],file="../src/DSFTe\
stApp.cpp",fullname="/home/lmckhou/runtime-TestDSF/DSFTestApp/src/DSFTestApp.cpp",line="1086"}

294,788 [MI]  31-stack-info-depth --thread 1 11
294,789 [MI]  31^done,depth="2"
294,789 [MI]  (gdb) 

294,825 [MI]  34-list-thread-groups
294,825 [MI]  34^done,groups=[{id="i1",type="process",pid="1",executable="/home/lmckhou/runtime-Test\
DSF/DSFTestApp/Debug/DSFTestApp"}]
294,826 [MI]  (gdb) 
294,827 [MI]  35-thread-info 1
294,828 [MI]  35^done,threads=[{id="1",target-id="process 1",frame={level="0",addr="0x08048978",func\
="fool",args=[{name="i",value="<unavailable>"},{name="j",value="<unavailable>"}],file="../src/DSFTes\
tApp.cpp",fullname="/home/lmckhou/runtime-TestDSF/DSFTestApp/src/DSFTestApp.cpp",line="1086"},state=\
"stopped"}]
Comment 2 Marc Khouzam CLA 2011-06-09 15:32:14 EDT
Created attachment 197726 [details]
Cleanup of MIStack

When I first added support for tracepoint visualization to the MIStack service, I was dealing with an early release of GDB and I had to assume we only got a single stack frame.  Trying it again with the official GDB 7.2 and with a pre-release of 7.3, I no longer need that assumption, which was wrong for 7.3.

The attached patch let's MIStack properly ask GDB for the number of stack frames and their content.  It also prepares for a stack frame with an "<unavailable>" address, which happens with 7.3.
Comment 3 Marc Khouzam CLA 2011-06-28 14:32:00 EDT
Created attachment 198765 [details]
Git patch to cleanup MIStack

This is the git patch that cleans up MIStack for tracepoint visualization.  I committed it to master and 8_0
Comment 4 Marc Khouzam CLA 2011-06-28 14:58:34 EDT
Fixed