开发者

How can I run a program with additional flags in gdb?

开发者 https://www.devze.com 2023-03-09 17:04 出处:网络
I\'m trying to test out this answer: _dl_runtime_resolve -- When do the sh开发者_StackOverflow社区ared objects get loaded in to memory?

I'm trying to test out this answer:

_dl_runtime_resolve -- When do the sh开发者_StackOverflow社区ared objects get loaded in to memory?

But when I try various ways to run essentially the same as gdb "LD_BIND_NOW=y binary",it fails.

How can I run my app with this flag on inside gdb?


Two choices. First:

env LD_BIND_NOW=y gdb binary

Or, run gdb binary and then inside gdb:

set env LD_BIND_NOW=y
run

The former will affect the gdb binary itself, which may or may not matter. The latter might not actually work :-)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号