Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/m68k] Fix length of lea insn.
Date: Fri, 23 May 2008 05:00:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0805222038260.20457@scrub.home> (raw)

Hi,

This patch is needed to correctly set a breakpoint in a library, otherwise 
gdb will put the breakpoint in the middle of the instruction and cause a
segfault.

bye, Roman

2008-05-22  Roman Zippel <zippel@linux-m68k.org>

	* m68k-tdep.c (m68k_analyze_prologue): Fix length of lea insn.

Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.136
diff -u -r1.136 m68k-tdep.c
--- m68k-tdep.c	16 May 2008 00:27:23 -0000	1.136
+++ m68k-tdep.c	22 May 2008 18:26:53 -0000
@@ -804,7 +804,7 @@
   if (op == P_LEA_PC_A5)
     {
       /* lea (%pc,N),%a5 */
-      return pc + 6;
+      return pc + 8;
     }
 
   return pc;


             reply	other threads:[~2008-05-22 18:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23  5:00 Roman Zippel [this message]
2008-05-29 10:07 ` Daniel Jacobowitz
     [not found]   ` <Pine.LNX.4.64.0805310429160.5372@localhost.localdomain>
2008-06-02 16:08     ` Joel Brobecker

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=Pine.LNX.4.64.0805222038260.20457@scrub.home \
    --to=zippel@linux-m68k.org \
    --cc=gdb-patches@sourceware.org \
    /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