This is the mail archive of the gdb-patches@sourceware.org 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: [rfc] Eliminate write_register from solib-sunos.c


Daniel Jacobowitz wrote:
> On Sat, May 12, 2007 at 02:31:13AM +0200, Ulrich Weigand wrote:
> > Hello,
> > 
> > solib-sunos.c has a place where it adjusts the PC by DECR_PC_AFTER_BREAK.
> > Unlike all other places to do so, it uses write_register (PC_REGNUM ...).
> > 
> > As I'm trying to eliminate write_register, I'd like to get rid of this.
> > The following patch replaces the write_register call by write_pc.
> > 
> > Is this OK?
> 
> I noticed this call last week.  I'm not sure if any platform using
> solib-sunos.c even triggers it... but if they do, I think it's
> decrementing the PC twice.  Didn't infrun take care of it?

Hmm, good point.  I think infrun *should* take care of it; solib-sunos.c
calls wait_for_inferior, which calls handle_inferior_event, which calls
adjust_pc_after_break.

Interestingly enough, it would appear that none of the Solaris targets
are actually using solib-sunos.o.  The only references I can find are
in various bsd *native* target's .mh files.

In fact, this is very weird as those same bsd targets have solib-svr4.o
in their .mt files.  Which one is getting used in that case?  I'll try
to find out what's going on here ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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