Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Luis Machado <luisgpm@linux.vnet.ibm.com>
Cc: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] PPC - Stepping off breakpoints in non-stop mode
Date: Thu, 05 Jun 2008 20:03:00 -0000	[thread overview]
Message-ID: <20080605200249.GH25085@caradoc.them.org> (raw)
In-Reply-To: <1212020293.15367.63.camel@gargoyle>

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


  reply	other threads:[~2008-06-05 20:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02 20:26 Luis Machado
2008-05-19 15:20 ` Luis Machado
2008-05-19 15:20 ` Pedro Alves
2008-05-19 15:21   ` Luis Machado
2008-05-29 15:41     ` Luis Machado
2008-06-05 20:03       ` Daniel Jacobowitz [this message]
2008-06-06 16:00         ` Luis Machado
2008-06-24 14:59           ` Luis Machado
2008-06-24 18:08           ` Pedro Alves
2008-06-24 18:19             ` Luis Machado
2008-06-25 12:54               ` Joel Brobecker
2008-06-25 13:35                 ` Luis Machado
2008-06-25 13:51                   ` Joel Brobecker
2008-06-25 15:48                     ` Luis Machado
2008-06-25 18:49                       ` Joel Brobecker
2008-06-30 17:04                         ` Luis Machado
2008-07-08  1:39 Jonathan Larmour
2008-07-08  3:53 ` Luis Machado
2008-07-08 14:59   ` Jonathan Larmour
2008-07-08 15:13     ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080605200249.GH25085@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=luisgpm@linux.vnet.ibm.com \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox