]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Forward-port addition of _google_dl_debug_state_hook
authorStan Shebs <stanshebs@google.com>
Tue, 13 Mar 2018 18:53:48 +0000 (11:53 -0700)
committerStan Shebs <stanshebs@google.com>
Tue, 13 Mar 2018 18:53:48 +0000 (11:53 -0700)
elf/Versions
elf/dl-debug.c

index 3b09901f6c31e3d41c926c0b35246cb7db3c4f10..80cf1c47aae25aa256d868ea8459e293a2d93ccd 100644 (file)
@@ -78,5 +78,7 @@ ld {
 
     # Set value of a tunable.
     __tunable_get_val;
+
+    _google_dl_debug_state_hook;
   }
 }
index 14d1125fe6e33265d720c54c8922f71402cf37c8..390ef994dd1c8ecdda1f5af175dc26a16083adfe 100644 (file)
@@ -64,6 +64,8 @@ _dl_debug_initialize (ElfW(Addr) ldbase, Lmid_t ns)
 }
 
 
+void (*_google_dl_debug_state_hook)(const struct r_debug *);
+
 /* This function exists solely to have a breakpoint set on it by the
    debugger.  The debugger is supposed to find this function's address by
    examining the r_brk member of struct r_debug, but GDB 4.15 in fact looks
@@ -71,5 +73,7 @@ _dl_debug_initialize (ElfW(Addr) ldbase, Lmid_t ns)
 void
 _dl_debug_state (void)
 {
+  if (_google_dl_debug_state_hook)
+    _google_dl_debug_state_hook(&_r_debug);
 }
 rtld_hidden_def (_dl_debug_state)