[Ltrace-devel] [PATCH 1/2] mipsel: Improve singlestepping over branch always
Petr Machata
pmachata at redhat.com
Mon Oct 1 08:29:53 UTC 2012
edgar.iglesias at gmail.com writes:
> --- 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:
If the fall-through is intentional, then it should be denoted with a
comment such as /* Fall through. */
(There are also spaces before parens in function calls. I guess it's
better to leave them as they are, now that I missed it the first time
around.)
Otherwise both patches look fine, I'll apply when the above nit is
corrected.
Thank you,
PM
More information about the Ltrace-devel
mailing list