From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 468 invoked by alias); 14 May 2007 15:15:39 -0000 Received: (qmail 337 invoked by uid 22791); 14 May 2007 15:15:37 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 14 May 2007 15:15:32 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0) with ESMTP id l4EFFOq1017461; Mon, 14 May 2007 17:15:24 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0/Submit) id l4EFFOHF015937; Mon, 14 May 2007 17:15:24 +0200 (CEST) Date: Mon, 14 May 2007 15:15:00 -0000 Message-Id: <200705141515.l4EFFOHF015937@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: uweigand@de.ibm.com CC: drow@false.org, gdb-patches@sourceware.org In-reply-to: <200705141500.l4EF0CH3027553@d12av02.megacenter.de.ibm.com> (uweigand@de.ibm.com) Subject: Re: [rfc] Eliminate write_register from solib-sunos.c References: <200705141500.l4EF0CH3027553@d12av02.megacenter.de.ibm.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00234.txt.bz2 > Date: Mon, 14 May 2007 17:00:12 +0200 (CEST) > From: "Ulrich Weigand" > > 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. This is the shared library support for the old SunOS 4.x (aka Solaris 1.x). Solaris 2.x (aka SunOS 5.x) uses SVR4-style shared libraries. > 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 ... There are some a.out BSD targets that use solib-sunos.o. In particular OpenBSD/m68k still uses it. Interestingly enough, that target sets DECR_PC_AFTER_BREAK to 2. I'll fire up my Quadra 800 and investigate somewhere later this week. Mark