gpt4 book ai didi

debugging - gdb:找不到新线程:一般错误

转载 作者:太空宇宙 更新时间:2023-11-03 16:41:15 24 4
gpt4 key购买 nike

当我针对加载链接到 pthreads 的 .so 的程序运行 GDB 时,GDB 报告错误“找不到新线程:一般错误”。

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

有什么线索吗?

$ gdb --args lua -lluarocks.requireGNU gdb (GDB) 7.0-ubuntuCopyright (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) runStarting program: /usr/bin/lua -lluarocks.requireLua 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) qA debugging session is active.    Inferior 1 [process 4986] will be killed.Quit anyway? (y or n) y

此函数在 require 'ev' 上被调用:

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

关于我的系统的附加信息:

$ uname -aLinux localhost 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux
$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription:    Ubuntu 9.10Release:    9.10Codename:   karmic

最佳答案

这也有效:

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

关于debugging - gdb:找不到新线程:一般错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2702628/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com