Martin Koller
2004-11-03 11:26:34 UTC
Hi,
(using Linux 2.4.22, glibc-2.3.2, gcc-3.2.3)
I wanted to compile an application with the linuxthread_db library because I
need to ptrace() (debug programmatically) a threaded application.
When I do gcc -o father father.c -lthread_db I get
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_pdwrite'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_pglobal_lookup'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_lsetfpregs'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_getpid'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_lsetregs'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_pdread'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_lgetfpregs'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_lgetregs'
collect2: ld returned 1 exit status
Doing a lot of searches in glibc, etc. sources, it seems that those
functions are only implemented inside gdb itself.
Also, there is no Linux documentation for the linuxthread_db calls (I found
similar ones on a Sun page ...)
Anybody knows what these functions are good for and how to implement these,
and/or also hints on how to use the libthread_db functions at all ?
Thanks
Martin
(using Linux 2.4.22, glibc-2.3.2, gcc-3.2.3)
I wanted to compile an application with the linuxthread_db library because I
need to ptrace() (debug programmatically) a threaded application.
When I do gcc -o father father.c -lthread_db I get
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_pdwrite'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_pglobal_lookup'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_lsetfpregs'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_getpid'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_lsetregs'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_pdread'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_lgetfpregs'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../libthread_db.so:
undefined reference to `ps_lgetregs'
collect2: ld returned 1 exit status
Doing a lot of searches in glibc, etc. sources, it seems that those
functions are only implemented inside gdb itself.
Also, there is no Linux documentation for the linuxthread_db calls (I found
similar ones on a Sun page ...)
Anybody knows what these functions are good for and how to implement these,
and/or also hints on how to use the libthread_db functions at all ?
Thanks
Martin