diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-11-09 01:23:30 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-11-09 01:23:30 +0000 |
commit | 11cf87416416e13eff634a70b4954fe6a3912720 (patch) | |
tree | a6dc7a21bb3d45b89c3f95e4b5862ec9d2fab83b /gdb/hpux-thread.c | |
parent | 98007ce7b0dea06f0c04d833d39b5a9c9773a07a (diff) | |
download | gdb-11cf87416416e13eff634a70b4954fe6a3912720.zip gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.gz gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.bz2 |
import gdb-1999-11-08 snapshot
Diffstat (limited to 'gdb/hpux-thread.c')
-rw-r--r-- | gdb/hpux-thread.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c index 8d70bd8..28a8d2d 100644 --- a/gdb/hpux-thread.c +++ b/gdb/hpux-thread.c @@ -520,6 +520,13 @@ hpux_thread_create_inferior (exec_file, allargs, env) those variables don't show up until the library gets mapped and the symbol table is read in. */ +/* This new_objfile event is now managed by a chained function pointer. + * It is the callee's responsability to call the next client on the chain. + */ + +/* Saved pointer to previous owner of the new_objfile event. */ +static void (*target_new_objfile_chain) PARAMS ((struct objfile *)); + void hpux_thread_new_objfile (objfile) struct objfile *objfile; @@ -529,25 +536,28 @@ hpux_thread_new_objfile (objfile) if (!objfile) { hpux_thread_active = 0; - - return; + goto quit; } ms = lookup_minimal_symbol ("cma__g_known_threads", NULL, objfile); if (!ms) - return; + goto quit; P_cma__g_known_threads = SYMBOL_VALUE_ADDRESS (ms); ms = lookup_minimal_symbol ("cma__g_current_thread", NULL, objfile); if (!ms) - return; + goto quit; P_cma__g_current_thread = SYMBOL_VALUE_ADDRESS (ms); hpux_thread_active = 1; +quit: + /* Call predecessor on chain, if any. */ + if (target_new_objfile_chain) + target_new_objfile_chain (objfile); } /* Clean up after the inferior dies. */ @@ -638,4 +648,7 @@ _initialize_hpux_thread () add_target (&hpux_thread_ops); child_suppress_run = 1; + /* Hook into new_objfile notification. */ + target_new_objfile_chain = target_new_objfile_hook; + target_new_objfile_hook = hpux_thread_new_objfile; } |