linux vdso.so.1在哪,Could not load shared library symbols for linux-vdso.so.1. while debugging

问题

Not loading VDSO.so is one of the famous bugs you encounter while using gdb and glibc >2.2.

I found that was planned to get repaired in gdb 7.5.1, but it wasn't.

Okay I found a work-around here Here, but I didn't understand it so how to apply it.

OS: Arch Linux

IDE : QT creator 3.0.82

Compiler : GCC 4.8.2

NB: I am not sure if I am breaking the rules including the link above

回答1:

Not loading VDSO.so is one of the famous bugs you encounter while using gdb and glibc >2.2.

No, it's not. The problem here is simply a useless warning, which you can safely ignore.

I found a work-around here Here, but I didn't understand it so how to apply it.

You didn't find a "workaround". You found a patch to GDB, which disables the warning.

To apply it, use the patch command, and then build your own GDB. But it is much simpler to just ignore the warning in the first place.

回答2:

For anyone who (like me) just wants gdb to shut up about missing symbols, try adding this to your ~/.gdbinit (but see caveats below):

set logging redirect on

set logging file /dev/null

python

def on_new_objfile(e):

gdb.execute("set logging off")

#print "new objfile:",e.new_objfile.filename

if e.new_objfile.filename[:19] == "system-supplied DSO":

gdb.execute("set logging on") # hide inevitable error message

gdb.events.new_objfile.connect(on_new_objfile)

end

Caveats:

Monopolizes the set logging interface; if you want to use logging you'll need to change it to save the previous logging settings.

Hard-codes "system-supplied DSO"; might be brittle wrt new kernel or gdb versions.

It assumes at least one objfile will be loaded after vdso to reenable output; I'd be very interested if anyone with better gdb internals knowledge could point out the actual after-symbol-load-has-failed hook, since for now it risks leaving output disabled when the program starts if vdso is the last objfile loaded.

来源:https://stackoverflow.com/questions/22822425/could-not-load-shared-library-symbols-for-linux-vdso-so-1-while-debugging

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值