This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug remote/15643] New: Current thread support (qC) don't work with remote target
- From: "vgiraud at neotion dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 18 Jun 2013 13:17:28 +0000
- Subject: [Bug remote/15643] New: Current thread support (qC) don't work with remote target
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15643
Bug ID: 15643
Summary: Current thread support (qC) don't work with remote
target
Product: gdb
Version: 7.6
Status: NEW
Severity: normal
Priority: P2
Component: remote
Assignee: unassigned at sourceware dot org
Reporter: vgiraud at neotion dot com
Hi,
Each time I want to print the thread list in GDB I've got an error because
openOCD try to read at 0x0.
After lots of reading and observations I found that GDB always say that the
last thread is the current one (using '*').
So, using traces, I found that GDB ask to OpenOCD which one is the current
thread before knowing wich one is it because I haven't yet upload an
executable, so it send 0 as current thread (as it was initialized).
(OpenOCD part)
rtos.c:rtos_thread_packet
else if (strstr(packet, "qC")) {
if (target->rtos != NULL) {
char buffer[15];
int size;
size = snprintf(buffer, 15, "QC%08X",
(int)target->rtos->current_thread);
This send 'QC00000000X' to GDB, saying that current is 0 on 1 to X listed
threads.
If I hardcode 'QC00000002' for example, it works well (if current thread is 2
of course).
So I found that the problem is GDB asking for current thread (using qC) too
early when we are using remote target. We need to wait the loading of
executable (when OepnOCD read symbol and threads infos).
Is anyone having same problem? Or having something to try.
P.S: I use eCos.
--
You are receiving this mail because:
You are on the CC list for the bug.