This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug server/10809] New: GDBServer does not post "new thread"
- From: "a dot kattwinkel at precitec-optronik dot de" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 19 Oct 2009 10:32:56 -0000
- Subject: [Bug server/10809] New: GDBServer does not post "new thread"
- Reply-to: sourceware-bugzilla at sourceware dot org
When locally debugging an application that creates a pthread, gdb will post a
"new thread" message when I step over the pthread_create function. However, this
does happen when I debug the identical executable using gdbserver (even
locally). The problem about this arises when I use eclipse/cdt/dsf for debugging
because normally (in the local case) this post appears to trigger an update to
the stack view so that I can control new threads from there. This does not take
place with gdbserver.
System / Version
================
axel@Axel3:~$ uname -a
Linux Axel3 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686
GNU/Linux
gcc which was used to build both gdb-7 and the target executable
================================================================
axel@Axel3:~$ gcc -v
Es werden eingebaute Spezifikationen verwendet.
Ziel: i486-linux-gnu
Konfiguriert mit: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread-Modell: posix
gcc-Version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
The Target Source
=================
axel@Axel3:~/workspace2/GDBTest/src$ cat Test.cpp
#include <iostream>
#include <pthread.h>
using namespace std;
void * ThreadProc(void * _pIn)
{
static int a = 0;
while (1)
{
cout << "Thread: " << a++;
usleep(500000);
}
}
int main()
{
pthread_t hThread = 0;
pthread_create(&hThread, NULL, ThreadProc, NULL);
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
return 0;
}
Building the target
===================
g++ -ggdb -lpthread -o Test Test.cpp
--
Summary: GDBServer does not post "new thread"
Product: gdb
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: server
AssignedTo: unassigned at sourceware dot org
ReportedBy: a dot kattwinkel at precitec-optronik dot de
CC: gdb-prs at sourceware dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=10809
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.