X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=gdb-core-open-vdso-warning.patch;h=a4213674d89371dc76d00acdd428458e7f3c6292;hb=36d511ae8586f7fba145ee714a5f14fe1ea87377;hp=d05e72bf1ca7d4455a81da511c97ccb5367506f7;hpb=ab050a480b8f4423d1cfec632d27f240a7a0955b;p=packages%2Fgdb.git diff --git a/gdb-core-open-vdso-warning.patch b/gdb-core-open-vdso-warning.patch index d05e72b..a421367 100644 --- a/gdb-core-open-vdso-warning.patch +++ b/gdb-core-open-vdso-warning.patch @@ -33,32 +33,35 @@ gdb/ [ Context backport. ] ---- a/gdb/solib-svr4.c -+++ b/gdb/solib-svr4.c -@@ -1097,8 +1097,18 @@ svr4_current_sos (void) - target_read_string (LM_NAME (new), &buffer, - SO_NAME_MAX_PATH_SIZE - 1, &errcode); - if (errcode != 0) -- warning (_("Can't read pathname for load map: %s."), -- safe_strerror (errcode)); -+ { -+ /* During the first ever DSO list reading some strings may be -+ unreadable as residing in the ld.so readonly memory not being -+ present in a dumped core file. Delay the error check after -+ the first pass of DSO list scanning when ld.so should be -+ already mapped in and all the DSO list l_name memory gets -+ readable. */ +Index: gdb-7.4.50.20111218/gdb/solib-svr4.c +=================================================================== +--- gdb-7.4.50.20111218.orig/gdb/solib-svr4.c 2011-12-19 01:14:31.000000000 +0100 ++++ gdb-7.4.50.20111218/gdb/solib-svr4.c 2011-12-19 01:31:10.106752164 +0100 +@@ -1222,8 +1222,17 @@ svr4_read_so_list (CORE_ADDR lm, struct + SO_NAME_MAX_PATH_SIZE - 1, &errcode); + if (errcode != 0) + { +- warning (_("Can't read pathname for load map: %s."), +- safe_strerror (errcode)); ++ /* During the first ever DSO list reading some strings may be ++ unreadable as residing in the ld.so readonly memory not being ++ present in a dumped core file. Delay the error check after ++ the first pass of DSO list scanning when ld.so should be ++ already mapped in and all the DSO list l_name memory gets ++ readable. */ + -+ if (master_so_list () != NULL) -+ warning (_("Can't read pathname for load map: %s."), -+ safe_strerror (errcode)); -+ } - else - { - struct build_id *build_id; ---- a/gdb/solib.c -+++ b/gdb/solib.c -@@ -538,6 +538,7 @@ update_solib_list (int from_tty, struct target_ops *target) ++ if (master_so_list () != NULL) ++ warning (_("Can't read pathname for load map: %s."), ++ safe_strerror (errcode)); ++ + do_cleanups (old_chain); + continue; + } +Index: gdb-7.4.50.20111218/gdb/solib.c +=================================================================== +--- gdb-7.4.50.20111218.orig/gdb/solib.c 2011-09-12 21:00:22.000000000 +0200 ++++ gdb-7.4.50.20111218/gdb/solib.c 2011-12-19 01:29:04.815227898 +0100 +@@ -676,6 +676,7 @@ update_solib_list (int from_tty, struct struct target_so_ops *ops = solib_ops (target_gdbarch); struct so_list *inferior = ops->current_sos(); struct so_list *gdb, **gdb_link; @@ -66,17 +69,16 @@ gdb/ /* We can reach here due to changing solib-search-path or the sysroot, before having any inferior. */ -@@ -668,6 +669,12 @@ update_solib_list (int from_tty, struct target_ops *target) +@@ -817,6 +818,12 @@ update_solib_list (int from_tty, struct observer_notify_solib_loaded (i); } - } + ++ /* If this was the very first DSO list scan and we possibly read in ld.so ++ recheck all the formerly unreadable DSO names strings. */ + -+ /* If this was the very first DSO list scan and we possibly read in ld.so -+ recheck all the formerly unreadable DSO names strings. */ ++ if (saved_so_list_head == NULL && so_list_head != NULL) ++ return update_solib_list (from_tty, target); + -+ if (saved_so_list_head == NULL && so_list_head != NULL) -+ update_solib_list (from_tty, target); - } - - - + /* If a library was not found, issue an appropriate warning + message. We have to use a single call to warning in case the + front end does something special with warnings, e.g., pop up