This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/m68k] Fix length of lea insn.


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]