This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/rfc] New program_changed event, cleanup some HPUXHPPA mess


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]