From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Randolph Chung Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] New program_changed event, cleanup some HPUXHPPAmess Date: Wed, 26 May 2004 17:54:00 -0000 Message-id: <40B4D9D6.7040302@gnu.org> References: <20040519204003.GU566@tausq.org> <40AE4F0C.6050407@gnu.org> <20040521190242.GB7207@tausq.org> <40AE6260.2090205@gnu.org> <20040526052753.GU7207@tausq.org> <20040526132546.GB7594@nevyn.them.org> <20040526153530.GZ7207@tausq.org> X-SW-Source: 2004-05/msg00754.html +static void +hppa_hpux_observer_inferior_created (struct target_ops *objfile, int from_tty) +{ + struct gdbarch_tdep *tdep; + struct minimal_symbol *minsym; + + tdep = gdbarch_tdep (current_gdbarch); + + /* Some HP-UX related globals to clear when a new "main" + symbol file is loaded. HP-specific. */ + + /* Indicates HP-compiled code. */ + deprecated_hp_som_som_object_present = 0; + /* Must reinitialize exception stuff. */ + hp_cxx_exception_support_initialized = 0; + + minsym = lookup_minimal_symbol ("$$dyncall_external", NULL, NULL); + if (minsym) + tdep->dyncall_external = SYMBOL_VALUE_ADDRESS (minsym); + else + tdep->dyncall_external = -1; + + minsym = lookup_minimal_symbol ("_sr4export", NULL, NULL); + if (minsym) + tdep->sr4export = SYMBOL_VALUE_ADDRESS (minsym); + else + tdep->sr4export = -1; +} Unfortunatly, not really but as you've noticed, it does ``work'', sigh. At least we can now see what the code is doing. The above values are dependant on the inferior (and make change between inferior invocations) and not the architecture so their lifetime should be bound to the inferior. This patch binds them to the current ``global'' architecture :-( Can, for the immediate term, hppa_hpux_skip_trampoline_code be simplified so that it doesn't even try to cache these values? This will put a real strain on the symtab but I think its the symtab that is the place that needs the fix. Andrew