This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] single-stepping over unconditional branches with zero offset
- From: jose dot marchesi at oracle dot com (Jose E. Marchesi)
- To: gdb-patches at sourceware dot org
- Date: Fri, 18 Oct 2013 15:25:22 +0200
- Subject: [PATCH] single-stepping over unconditional branches with zero offset
- Authentication-results: sourceware.org; auth=none
Hi.
The patch below removes an assertion from sparc_analyze_control_transfer
that prevents single-stepping over unconditional branch instruction with
PC-relative offsets of zero:
b (%xcc|%icc), 0
nop
or
b,a (%xcc|%icc), 0
This was making a test in gdb.base/random-signal.exp to fail.
Tested on sparc64-unknown-linux-gnu. Now random-signal.exp passes. No
visible regressions running the testsuite.
2013-10-18 Jose E. Marchesi <jose.marchesi@oracle.com>
* sparc-tdep.c (sparc_analyze_control_transfer): Assertion
removed to allow analyzing unconditional branch instructions
with PC-relative offsets of zero.
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.233
diff -u -r1.233 sparc-tdep.c
--- sparc-tdep.c 24 Jun 2013 22:18:32 -0000 1.233
+++ sparc-tdep.c 18 Oct 2013 13:09:14 -0000
@@ -1538,7 +1538,6 @@
if (X_A (insn))
*npc = 0;
- gdb_assert (offset != 0);
return pc + offset;
}
}