diff options
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r-- | gdb/solib-svr4.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index a497c6c..ddbbd94 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1310,6 +1310,7 @@ static int svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, struct so_list ***link_ptr_ptr, int ignore_first) { + struct so_list *first = NULL; CORE_ADDR next_lm; for (; lm != 0; prev_lm = lm, lm = next_lm) @@ -1349,6 +1350,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, { struct svr4_info *info = get_svr4_info (); + first = new; info->main_lm_addr = new->lm_info->lm_addr; do_cleanups (old_chain); continue; @@ -1359,8 +1361,14 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, SO_NAME_MAX_PATH_SIZE - 1, &errcode); if (errcode != 0) { - warning (_("Can't read pathname for load map: %s."), - safe_strerror (errcode)); + /* If this entry's l_name address matches that of the + inferior executable, then this is not a normal shared + object, but (most likely) a vDSO. In this case, silently + skip it; otherwise emit a warning. */ + if (first == NULL + || new->lm_info->l_name != first->lm_info->l_name) + warning (_("Can't read pathname for load map: %s."), + safe_strerror (errcode)); do_cleanups (old_chain); continue; } |