开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜