From a4c8bb27fa123560dc3229ac6548f9d048e0dfc0 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 15 Dec 2011 18:39:34 +0000 Subject: [PATCH] Pull in the MPIR_Breakpoint symbol via a dummy function in debuggers_base_fns.c: orte_debugger_base_pull_mpir_breakpoint(). This commit was SVN r25660. --- orte/mca/debugger/base/base.h | 2 ++ orte/mca/debugger/base/debugger_base_fns.c | 9 +++++++++ orte/tools/orterun/orterun.c | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/orte/mca/debugger/base/base.h b/orte/mca/debugger/base/base.h index 17b17da799..629ccda866 100644 --- a/orte/mca/debugger/base/base.h +++ b/orte/mca/debugger/base/base.h @@ -74,6 +74,8 @@ typedef void (*orte_debugger_breakpoint_fn_t)(void); ORTE_DECLSPEC void MPIR_Breakpoint(void); +ORTE_DECLSPEC void orte_debugger_base_pull_mpir_breakpoint(void); + /* --- end MPICH/TotalView std debugger interface definitions */ END_C_DECLS diff --git a/orte/mca/debugger/base/debugger_base_fns.c b/orte/mca/debugger/base/debugger_base_fns.c index 16b35f3426..ca3d5a2c3d 100644 --- a/orte/mca/debugger/base/debugger_base_fns.c +++ b/orte/mca/debugger/base/debugger_base_fns.c @@ -183,6 +183,15 @@ void orte_debugger_base_init_after_spawn(orte_job_t *jdata) #endif +/* + * Dummy function so that the linker can pull in all the symbols from + * this file. + */ +void orte_debugger_base_pull_mpir_breakpoint(void) +{ + return; +} + /* * Breakpoint function for parallel debuggers */ diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index 169147aa8e..fa1ac9212a 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -587,6 +587,10 @@ int orterun(int argc, char *argv[]) } MPIR_force_to_main = 0; memset(MPIR_attach_fifo, 0, MPIR_MAX_PATH_LENGTH); + /* This function call simply ensures that all the symbols -- + including MPIR_Breakpoint -- are pulled in via the linker from + orte/mca/debugger/base/debugger_base_fns.c. */ + orte_debugger_base_pull_mpir_breakpoint(); /* Check for some "global" command line params */ parse_globals(argc, argv, &cmd_line);