Re: [PATCH] Recognize branch instruction on MIPS in gdb.trace/entry-values.exp

Maciej W. Rozycki
2015-01-08T01:24:23Z

On Thu, 8 Jan 2015, Yao Qi wrote:

> >> If it is jalrc, set
> >> + # RETURNED_FROM_FOO to insn1, otherwise set RETURNED_FROM_FOO to
> >> + # insn2.
> >> + set call_insn {jalrc|[jb]al[sxr]*[ \t][^\r\n]+\r\n}
> >
> > OK, this should work. I have a minor nit yet: `[sxr]?' will be more
> > accurate than `[sxr]*', you want to see the letter at most once. The
> > former regexp will likely interpret faster too.
>
> We want to match JALRS, so [sxr]* is needed here.

Fair enough, the pattern matches more than necessary, but there are no
MIPS instructions it would match that it shouldn't, so let's keep your
proposal as it is for simplicity. I have no further concerns, thanks for
your work and for getting through this review.

Maciej