Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so Call _rtld_debug_state before running the ...



details:   https://anonhg.NetBSD.org/src/rev/94ecf0e02252
branches:  trunk
changeset: 824550:94ecf0e02252
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Jun 08 18:24:39 2017 +0000

description:
Call _rtld_debug_state before running the global initialisers, so give
gdb a chance to set break points etc.

diffstat:

 libexec/ld.elf_so/rtld.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 7009ac38c8e1 -r 94ecf0e02252 libexec/ld.elf_so/rtld.c
--- a/libexec/ld.elf_so/rtld.c  Thu Jun 08 17:24:31 2017 +0000
+++ b/libexec/ld.elf_so/rtld.c  Thu Jun 08 18:24:39 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.c,v 1.183 2017/02/27 20:25:26 chs Exp $    */
+/*     $NetBSD: rtld.c,v 1.184 2017/06/08 18:24:39 joerg Exp $  */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.183 2017/02/27 20:25:26 chs Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.184 2017/06/08 18:24:39 joerg Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -733,6 +733,8 @@
        if (real___mainprog_obj)
                *real___mainprog_obj = _rtld_objmain;
 
+       _rtld_debug_state();    /* say hello to gdb! */
+
        _rtld_exclusive_enter(&mask);
 
        dbg(("calling _init functions"));
@@ -748,8 +750,6 @@
         * of stack.
         */
 
-       _rtld_debug_state();    /* say hello to gdb! */
-
        ((void **) osp)[0] = _rtld_exit;
        ((void **) osp)[1] = _rtld_objmain;
        return (Elf_Addr) _rtld_objmain->entry;



Home | Main Index | Thread Index | Old Index