Hello EMC2 developers,

I found the steps of
DebuggingRtapi<http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?DebuggingRtapi>failed
for Ubuntu 9.10.
While I started "gdb rtapi_app" and give "run" command,
I got the following error:

$ gdb rtapi_app
GNU gdb (GDB) 7.0-ubuntu
...
Reading symbols from /home/ysli/proj/emc2-dev/bin/rtapi_app...done.
(gdb) run
Starting program: /home/ysli/proj/emc2-dev/bin/rtapi_app
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
(gdb)

And, there's no way to debug rtapi_app then.

After googled and digging into this issue for several hours,
I'm happy that I found a workaround:
linking rtapi_app with
libpthread<http://sourceware.org/ml/gdb/2008-08/msg00288.html>

1. edit src/rtapi/Submakefile
2. add "-lpthread" to "$(CXX) -rdynamic $(LDFLAGS) -o $@ $^ -ldl
$(PTH_LINK)"
3. rm bin/rtapi_app
4. cd src; make
5. $ gdb rtapi_app
GNU gdb (GDB) 7.0-ubuntu
...
Reading symbols from /home/ysli/proj/emc2-dev/bin/rtapi_app...done.
(gdb) run
Starting program: /home/ysli/proj/emc2-dev/bin/rtapi_app
[Thread debugging using libthread_db enabled]
6. it works!

Yishin
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to