From: "Edgar E. Iglesias" <[email protected]> When singlestepping over BEQ issuing a compare between a single register (i.e a branch always), only follow the branch path.
This catches the case for functions that end with loops and avoids us putting breakpoints at the begining of the next function (where there likely already is a bp). Signed-off-by: Edgar E. Iglesias <[email protected]> --- sysdeps/linux-gnu/mipsel/trace.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/sysdeps/linux-gnu/mipsel/trace.c b/sysdeps/linux-gnu/mipsel/trace.c index a8a680a..bbbac94 100644 --- a/sysdeps/linux-gnu/mipsel/trace.c +++ b/sysdeps/linux-gnu/mipsel/trace.c @@ -202,7 +202,14 @@ int mips_next_pcs(struct Process *proc, uint32_t pc, uint32_t *newpc) newpc[nr++] = rx + ((pc + 4) & ~0x0fffffff); break; default: - case 4: + case 4: /* BEQ */ + if (itype_rs (inst) == itype_rt (inst)) { + /* Compare the same reg for equality, always + * follow the branch. */ + newpc[nr++] = pc + 4 + + mips32_relative_offset (inst); + break; + } case 5: case 6: case 7: -- 1.7.8.6 _______________________________________________ Ltrace-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/ltrace-devel
