From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: Randolph Chung Cc: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] New program_changed event, cleanup some HPUXHPPA mess Date: Wed, 26 May 2004 13:25:00 -0000 Message-id: <20040526132546.GB7594@nevyn.them.org> References: <20040519204003.GU566@tausq.org> <40AE4F0C.6050407@gnu.org> <20040521190242.GB7207@tausq.org> <40AE6260.2090205@gnu.org> <20040526052753.GU7207@tausq.org> X-SW-Source: 2004-05/msg00742.html On Tue, May 25, 2004 at 10:27:53PM -0700, Randolph Chung wrote: > > >assuming the attach case also works, this should be ok for what i need. > > > > That code was added for a similar problem so it looks hopeful. > > seems to be ok. here's the new version, using the inferior_created > event you checked in. still passes all the tests that used to pass > before :) > > ok to checkin? Almost, just one thing I'd like you to fix. > +static void > +hppa_observer_inferior_created (struct target_ops *objfile, int from_tty) > +{ > + struct gdbarch_tdep *tdep; > + struct minimal_symbol *minsym; > + > + tdep = gdbarch_tdep (current_gdbarch); > + > + minsym = lookup_minimal_symbol ("$$dyncall", NULL, NULL); > + if (minsym) > + tdep->dyncall = SYMBOL_VALUE_ADDRESS (minsym); > + else > + tdep->dyncall = -1; > + > + /* These are HPUX only. */ If this comment is right, why not move these to the hppa-hpux specific observer? If the comment is wrong, just remove it, but it looks right. > + 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; > +} -- Daniel Jacobowitz