gdb:找不到新线程:一般错误 [英] gdb: Cannot find new threads: generic error

查看:20
本文介绍了gdb:找不到新线程:一般错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我对加载链接到 pthread 的 .so 的程序运行 GDB 时,GDB 报告错误找不到新线程:通用错误".

请注意,我运行的可执行文件未与 pthread 链接.

有什么线索吗?

<上一页>$ gdb --args lua -lluarocks.requireGNU gdb (GDB) 7.0-ubuntu版权所有 (C) 2009 Free Software Foundation, Inc.许可 GPLv3+:GNU GPL 版本 3 或更高版本这是免费软件:您可以自由更改和重新分发它.在法律允许的范围内,不提供任何保证.输入显示复制"和显示保修"了解详情.此 GDB 配置为x86_64-linux-gnu".有关错误报告说明,请参阅:<http://www.gnu.org/software/gdb/bugs/>...从/usr/bin/lua 读取符号...(未找到调试符号)...完成.(gdb) 运行启动程序:/usr/bin/lua -lluarocks.requireLua 5.1.4 版权所有 (C) 1994-2008 Lua.org, PUC-Rio> 需要'ev'[启用使用 libthread_db 进行线程调试]找不到新线程:一般错误(gdb) q调试会话处于活动状态.下级 1 [进程 4986] 将被杀死.还是放弃吧?(是或否)是

这个函数在 require 'ev' 上被调用:

http://github.com/brimworks/lua-ev/blob/master/lua_ev.c#L25-65

关于我的系统的其他信息:

<上一页>$ unname -aLinux localhost 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux

<上一页>$ lsb_release -a没有可用的 LSB 模块.经销商编号:Ubuntu说明:Ubuntu 9.10发布:9.10代号:业力

解决方案

这也有效:

LD_PRELOAD=/lib/libpthread.so.0 gdb --args ./app

When I run GDB against a program which loads a .so which is linked to pthreads, GDB reports error "Cannot find new threads: generic error".

Note that executable that I run is not linked with pthreads.

Any clues?

$ gdb --args lua -lluarocks.require
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/lua...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/lua -lluarocks.require
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require 'ev'
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
(gdb) q
A debugging session is active.

    Inferior 1 [process 4986] will be killed.

Quit anyway? (y or n) y

This function gets called on require 'ev':

http://github.com/brimworks/lua-ev/blob/master/lua_ev.c#L25-65

Additional information about my system:

$ uname -a
Linux localhost 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 9.10
Release:    9.10
Codename:   karmic

解决方案

This also works:

LD_PRELOAD=/lib/libpthread.so.0 gdb --args ./app

这篇关于gdb:找不到新线程:一般错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆