使用std thread创建线程,运行出错。gdb提示Cannot find user-level thread for LWP:
gdb Test
GNU gdb (GDB) 7.5
Copyright © 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
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 “arm-linux-gnueabi”.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/…
Reading symbols from /aoaTest…done.
(gdb) r
Starting program: /aoaTest
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/libthread_db.so.1”.
[New Thread 0xb6d30450 (LWP 10902)]
[Thread 0xb6ffa000 (LWP 10867) exited]
Cannot find user-level thread for LWP 10902: generic error
(gdb)
后来在编译选项中加入 -static后正常。