From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17533 invoked by alias); 14 May 2007 15:01:10 -0000 Received: (qmail 17519 invoked by uid 22791); 14 May 2007 15:01:08 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.29.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 14 May 2007 15:01:02 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.8/8.13.8) with ESMTP id l4EF0xH5355248 for ; Mon, 14 May 2007 15:00:59 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l4EF0Dp03989554 for ; Mon, 14 May 2007 17:00:14 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l4EF0Cvi027562 for ; Mon, 14 May 2007 17:00:12 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l4EF0CH3027553; Mon, 14 May 2007 17:00:12 +0200 Message-Id: <200705141500.l4EF0CH3027553@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 14 May 2007 17:00:12 +0200 Subject: Re: [rfc] Eliminate write_register from solib-sunos.c To: drow@false.org (Daniel Jacobowitz) Date: Mon, 14 May 2007 15:01:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20070513235530.GA18059@caradoc.them.org> from "Daniel Jacobowitz" at May 13, 2007 07:55:30 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00233.txt.bz2 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