From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30175 invoked by alias); 7 Jun 2007 20:57:17 -0000 Received: (qmail 30167 invoked by uid 22791); 7 Jun 2007 20:57:16 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.29.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 07 Jun 2007 20:57:14 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.8/8.13.8) with ESMTP id l57KvB0f647854 for ; Thu, 7 Jun 2007 20:57:11 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 l57KvB6Y3997812 for ; Thu, 7 Jun 2007 22:57:11 +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 l57KvBkD019256 for ; Thu, 7 Jun 2007 22:57:11 +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 l57KvBBL019253 for ; Thu, 7 Jun 2007 22:57:11 +0200 Message-Id: <200706072057.l57KvBBL019253@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 7 Jun 2007 22:57:11 +0200 Subject: [rfc][1/13] Eliminate read_register: write_register in solib-sunos.c To: gdb-patches@sourceware.org Date: Thu, 07 Jun 2007 20:57:00 -0000 From: "Ulrich Weigand" 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-06/txt/msg00080.txt.bz2 Hello, this patch eliminates the use of write_register in solib-sunos.c. As discussed when I've originally posted the patch, the whole "if (DECR_PC_AFTER_BREAK)" block is questionable, and the correct solution might be to completely remove it. In any case, something needs to be done before the write_register routine can be eliminated ... Bye, Ulrich ChangeLog: * solib-sunos.c (sunos_solib_create_inferior_hook): Use write_pc instead of write_register (PC_REGNUM, ...). diff -urNp gdb-orig/gdb/solib-sunos.c gdb-head/gdb/solib-sunos.c --- gdb-orig/gdb/solib-sunos.c 2007-01-11 20:57:59.000000000 +0100 +++ gdb-head/gdb/solib-sunos.c 2007-05-04 22:17:49.169681035 +0200 @@ -780,7 +780,7 @@ sunos_solib_create_inferior_hook (void) if (DECR_PC_AFTER_BREAK) { stop_pc -= DECR_PC_AFTER_BREAK; - write_register (PC_REGNUM, stop_pc); + write_pc (stop_pc); } if (!disable_break ()) -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com