From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1840 invoked by alias); 8 Jul 2008 01:39:25 -0000 Received: (qmail 1832 invoked by uid 22791); 8 Jul 2008 01:39:25 -0000 X-Spam-Check-By: sourceware.org Received: from snape.ecoscentric.com (HELO snape.ecoscentric.com) (212.13.207.199) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Jul 2008 01:38:58 +0000 Received: from localhost (snape.ecoscentric.com [127.0.0.1]) by snape.ecoscentric.com (Postfix) with ESMTP id EFF09DC8DD5; Tue, 8 Jul 2008 02:38:55 +0100 (BST) Received: from snape.ecoscentric.com ([127.0.0.1]) by localhost (snape.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id duyeHmq0dT+L; Tue, 8 Jul 2008 02:38:53 +0100 (BST) Message-ID: <4872C52C.1020701@eCosCentric.com> Date: Tue, 08 Jul 2008 01:39:00 -0000 From: Jonathan Larmour User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Luis Machado CC: gdb-patches@sourceware.org Subject: Re: [PATCH] PPC - Stepping off breakpoints in non-stop mode OpenPGP: id=A5FB74E6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 2008-07/txt/msg00105.txt.bz2 Luis Machado wrote: > [...] > Checked in the following. > [...] > 2008-06-30 Luis Machado > > * rs6000-tdep.c (ppc_displaced_step_fixup): New function. > (deal_with_atomic_sequence): Update BC masks. > (rs6000_gdbarch_init): Init displaced stepping infra-structure. > Define BRANCH_MASK, B_INSN, BC_INSN, BXL_INSN, BP_MASK and BP_INSN. Unfortunately this fails to build due to this warning (in combination with -Werror): .../rs6000-tdep.c: In function ‘ppc_displaced_step_fixup’: .../rs6000-tdep.c:885: warning: passing argument 3 of ‘regcache_cooked_read_unsigned’ from incompatible pointer type make[2]: *** [rs6000-tdep.o] Error 1 This is because in the following line, current_pc is CORE_ADDR, but regcache_cooked_read_unsigned's last arg is meant to be a ULONGEST *. + regcache_cooked_read_unsigned (regs, gdbarch_pc_regnum (gdbarch), + ¤t_pc); I was thinking of just casting it, but in fact would it be better to be calling regcache_read_pc() here as well as regcache_write_pc() in the rest of the patch when operating on the pc? From earlier in this thread, there was a little discussion about address sizes, so I thought I'd best ask before submitting a patch, as there could be portability implications and it might have been done this way for a reason. Jifl -- eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ------["Si fractum non sit, noli id reficere"]------ Opinions==mine