From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27052 invoked by alias); 19 May 2008 13:23:11 -0000 Received: (qmail 27041 invoked by uid 22791); 19 May 2008 13:23:10 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 19 May 2008 13:22:52 +0000 Received: (qmail 3529 invoked from network); 19 May 2008 13:22:50 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 19 May 2008 13:22:50 -0000 From: Pedro Alves To: gdb-patches@sourceware.org, luisgpm@linux.vnet.ibm.com Subject: Re: [PATCH] PPC - Stepping off breakpoints in non-stop mode Date: Mon, 19 May 2008 15:20:00 -0000 User-Agent: KMail/1.9.9 References: <1209753019.7131.29.camel@gargoyle> In-Reply-To: <1209753019.7131.29.camel@gargoyle> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805191422.49117.pedro@codesourcery.com> X-IsSubscribed: yes 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-05/txt/msg00553.txt.bz2 A Friday 02 May 2008 19:30:18, Luis Machado wrote: +void +ppc_displaced_step_fixup (struct gdbarch *gdbarch, + struct displaced_step_closure *closure, + CORE_ADDR from, CORE_ADDR to, + struct regcache *regs) +{ + /* Since we use simple_displaced_step_copy_insn, our closure is a + copy of the instruction. */ + unsigned int *insn = (unsigned int *) closure; + unsigned int opcode = (*insn & BRANCH_MASK); ... + char link_register_bit = (char) (*insn & 0x1); + unsigned long current_pc; Using unsigned int, char and unsigned long in a tdep file isn't safe. Can you switch to gdb_bytes and CORE_ADDR's? This file is used for cross-debugging. -- Pedro Alves