提交 ed388ff2 编写于 作者: H hhj

Sync ldso:notify the debugger when we're doing a dlopen

Otherwise lldb doesn't notice the new library and stack traces
containing it get cut off unhelpfully.
Signed-off-by: Nhhj <huanghuijin@huawei.com>
上级 daa508f7
......@@ -1966,7 +1966,7 @@ void __dls3(size_t *sp, size_t *auxv)
debug.bp = dl_debug_state;
debug.head = head;
debug.base = ldso.base;
debug.state = 0;
debug.state = RT_CONSISTENT;
_dl_debug_state();
if (replace_argv0) argv[0] = replace_argv0;
......@@ -2015,6 +2015,9 @@ void *dlopen(const char *file, int mode)
pthread_rwlock_wrlock(&lock);
__inhibit_ptc();
debug.state = RT_ADD;
_dl_debug_state();
p = 0;
if (shutting_down) {
error("Cannot dlopen while program is exiting.");
......@@ -2111,9 +2114,10 @@ void *dlopen(const char *file, int mode)
update_tls_size();
if (tls_cnt != orig_tls_cnt)
install_new_tls();
_dl_debug_state();
orig_tail = tail;
end:
debug.state = RT_CONSISTENT;
_dl_debug_state();
__release_ptc();
if (p) gencnt++;
pthread_rwlock_unlock(&lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册