Module Name:    src
Committed By:   joerg
Date:           Thu Jun  8 18:24:39 UTC 2017

Modified Files:
        src/libexec/ld.elf_so: rtld.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/libexec/ld.elf_so/rtld.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/rtld.c
diff -u src/libexec/ld.elf_so/rtld.c:1.183 src/libexec/ld.elf_so/rtld.c:1.184
--- src/libexec/ld.elf_so/rtld.c:1.183	Mon Feb 27 20:25:26 2017
+++ src/libexec/ld.elf_so/rtld.c	Thu Jun  8 18:24:39 2017
@@ -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 @@ _rtld(Elf_Addr *sp, Elf_Addr relocbase)
 	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 @@ _rtld(Elf_Addr *sp, Elf_Addr relocbase)
 	 * 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;

Reply via email to