summaryrefslogtreecommitdiff
path: root/gdb/hppa-hpux-tdep.c
diff options
context:
space:
mode:
authorRandolph Chung <tausq@debian.org>2004-06-14 20:40:40 +0000
committerRandolph Chung <tausq@debian.org>2004-06-14 20:40:40 +0000
commit90f943f11a3e71ce86df68d8c6553bc7b51175d0 (patch)
tree180dd397f216b1b069dea17459d423aaa5c43930 /gdb/hppa-hpux-tdep.c
parent092dcd755dcdcf664b25a7011fd15957f124c29f (diff)
downloadbinutils-gdb-90f943f11a3e71ce86df68d8c6553bc7b51175d0.tar.gz
2004-06-14 Randolph Chung <tausq@debian.org>
* Makefile.in (hppa-hpux-tdep.o): Update dependency. * hppa-hpux-tdep.c (hp_cxx_exception_support_initialized): Make static. (hppa_hpux_inferior_created): New function. (hppa_hpux_init_abi): Register observer. * symfile.c (hp_cxx_exception_support_initialized) (RESET_HP_UX_GLOBALS): Remove HPUXHPPA specific hacks. (symbol_file_add_main_1, symbol_file_clear): Likewise.
Diffstat (limited to 'gdb/hppa-hpux-tdep.c')
-rw-r--r--gdb/hppa-hpux-tdep.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 615f45de69f..8e8765a4ac1 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "objfiles.h"
#include "inferior.h"
#include "infcall.h"
+#include "observer.h"
#include "hppa-tdep.h"
#include <dl.h>
@@ -533,7 +534,7 @@ __eh_notification;
/* Is exception-handling support available with this executable? */
static int hp_cxx_exception_support = 0;
/* Has the initialize function been run? */
-int hp_cxx_exception_support_initialized = 0;
+static int hp_cxx_exception_support_initialized = 0;
/* Address of __eh_notify_hook */
static CORE_ADDR eh_notify_hook_addr = 0;
/* Address of __d_eh_notify_callback */
@@ -1204,6 +1205,15 @@ hppa_hpux_sigtramp_unwind_sniffer (struct frame_info *next_frame)
}
static void
+hppa_hpux_inferior_created (struct target_ops *objfile, int from_tty)
+{
+ /* Some HP-UX related globals to clear when a new "main"
+ symbol file is loaded. HP-specific. */
+ deprecated_hp_som_som_object_present = 0;
+ hp_cxx_exception_support_initialized = 0;
+}
+
+static void
hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -1220,6 +1230,8 @@ hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_skip_trampoline_code (gdbarch, hppa_hpux_skip_trampoline_code);
frame_unwind_append_sniffer (gdbarch, hppa_hpux_sigtramp_unwind_sniffer);
+
+ observer_attach_inferior_created (hppa_hpux_inferior_created);
}
static void