From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2796 invoked by alias); 5 Jun 2008 20:03:12 -0000 Received: (qmail 2780 invoked by uid 22791); 5 Jun 2008 20:03:11 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 05 Jun 2008 20:02:51 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 1B4D698371; Thu, 5 Jun 2008 20:02:50 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 059489809F; Thu, 5 Jun 2008 20:02:50 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1K4Lfd-0000bc-Ei; Thu, 05 Jun 2008 16:02:49 -0400 Date: Thu, 05 Jun 2008 20:03:00 -0000 From: Daniel Jacobowitz To: Luis Machado Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH] PPC - Stepping off breakpoints in non-stop mode Message-ID: <20080605200249.GH25085@caradoc.them.org> Mail-Followup-To: Luis Machado , Pedro Alves , gdb-patches@sourceware.org References: <1209753019.7131.29.camel@gargoyle> <200805191422.49117.pedro@codesourcery.com> <1211203623.6232.2.camel@gargoyle> <1212020293.15367.63.camel@gargoyle> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1212020293.15367.63.camel@gargoyle> User-Agent: Mutt/1.5.17 (2008-05-11) 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-06/txt/msg00066.txt.bz2 On Wed, May 28, 2008 at 09:18:12PM -0300, Luis Machado wrote: > > > 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. > > > > Yes, that's true. I'll get this fixed. Thanks! > > Attached the updated patch with the types fixed and some additional > comments. Sorry, the problem Pedro spotted is still there :-( > + /* Since we use simple_displaced_step_copy_insn, our closure is a > + copy of the instruction. */ > + ULONGEST *insn = (ULONGEST *) closure; For instance, what's at closure is four bytes in target byte order. It may not be the size of a ULONGEST. The >> 32 is also a hint; you can see that won't work well on a 32-bit host. About the rest I'll just have to trust you; I don't know enough about PowerPC to be sure you got everything. > + /* Check for breakpoints in the inferior. If we've found one, place the PC > + right at the breakpoint instruction. */ > + else if ((*insn & BP_MASK) == BP_INSN) > + regcache_cooked_write_unsigned (regs, gdbarch_pc_regnum (gdbarch), from); I'm not sure this is the sensible thing to do in a GDB context but it's what we do for i386 so it seems fine. -- Daniel Jacobowitz CodeSourcery