Community
Participate
Working Groups
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.
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"}]
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.
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
Fixed