Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
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	[thread overview]
Message-ID: <200805191422.49117.pedro@codesourcery.com> (raw)
In-Reply-To: <1209753019.7131.29.camel@gargoyle>

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


  parent reply	other threads:[~2008-05-19 13:23 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 [this message]
2008-05-19 15:21   ` Luis Machado
2008-05-29 15:41     ` Luis Machado
2008-06-05 20:03       ` Daniel Jacobowitz
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=200805191422.49117.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luisgpm@linux.vnet.ibm.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