Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » DSF-GDB (CDT8.0) in remote-debug, non-stop mode: control of suspend thread not possible
DSF-GDB (CDT8.0) in remote-debug, non-stop mode: control of suspend thread not possible [message #699370] Thu, 21 July 2011 12:58 Go to next message
Daniel Mising name is currently offline Daniel Mising nameFriend
Messages: 2
Registered: July 2011
Junior Member
Hello,

try to find something on bugzilla eclipse, forum and inet but maybe my keywords are not detailed enough.

I'm using DSF-GDB for Cross Debug in non-stop mode of a multi-thread application. At breakpoint hit for a thread only continue is possible all other debug controls (stepi, next, ...) results in a continue also.

The GUI show that all is right, my breakpoint is hit, function names are resolved, thread is supsend and all other are running, the registers are resolved, variables are resolved.

But disassambly tab shows for each address:
 Failed to execute MI command:
-data-disassemble -s 1074563528 -e 1074563604 -- 1
Error message from debugger back end:
Cannot access memory at address 0x400c89c8


The reason seems to be that the thread will not switched from the running to the supsend one when reaching the breakpoint or has already switched back to a running thread. This was verified by checking in gdb console with info threads.
Example: thread 1 .. thread 20, breakpoint hit in thread 10(shows a suspend in GUI and gdb), thread 20 shows as selected(active) by gdb command.

After activation of the button "Refresh" (Refresh Debug Views) the thread is switched to the suspend one(checked again) but the behaviour stays the same like described above.

Workaround:
You have to stop also the last created thread , then all(steping, disasambly) is working.
Example:
- thread 1 ... thread 20
- breakpoint hit in thread 15
- suspend also thread 20 and now you can debug thread 15

Actual i activated non-stop mode, force thread list update on suspend, and Debug View Refresh and using GDB(DSF) Automatic Remote Debugging Launcher. Is there any option that i missed to activate?

Versions:
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-1136jfs-linux-gnueabi".
For bug reporting instructions, please see:


GNU gdbserver (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
gdbserver is free software, covered by the GNU General Public License.
This gdbserver was configured as "arm-1136jfs-linux-gnueabi"

Eclipse IDE for C/C++ Developers
Version: Indigo Release
Build id: 20110615-0604
C/C++ DSF GDB Debugger Integration 4.0.0.201106081058 org.eclipse.cdt.gnu.dsf.feature.group Eclipse CDT
C/C++ Development Platform 8.0.0.201106081058 org.eclipse.cdt.platform.feature.group Eclipse CDT


Take in mind, english is not my native language.

Best regards !
Daniel

[Updated on: Thu, 21 July 2011 13:04]

Report message to a moderator

Re: DSF-GDB (CDT8.0) in remote-debug, non-stop mode: control of suspend thread not possible [message #699388 is a reply to message #699370] Thu, 21 July 2011 13:33 Go to previous message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
I just tried it and I see the problem too. I have a program with 5 threads and only thread 1 is stopped; when trying to show the Disassembly, we send the command:

476,132 [MI] 746-data-disassemble --thread-group i1 -s 134516506 -e 134516670 -- 0
476,133 [MI] 746^error,msg="Cannot access memory at address 0x8048f1a"
476,134 [MI] =thread-selected,id="5"

We specify --thread-group i1 for the process, but it seems that GDB then automatically selects thread 5. Since that thread is running, it cannot access the disassembly data. My first guess is that we should specify the thread for which we are requesting the disassembly.

I have opened a bug on Bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=352748

Thanks for reporting it.

Marc
Previous Topic:Override indicators in the Outline View?
Next Topic:issues with migrating from Visual Studio
Goto Forum:
  


Current Time: Fri Apr 26 14:39:43 GMT 2024

Powered by FUDForum. Page generated in 0.03245 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top