This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Recognize branch instruction on MIPS in gdb.trace/entry-values.exp
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 8 Jan 2015 01:24:15 +0000 (GMT)
- Subject: Re: [PATCH] Recognize branch instruction on MIPS in gdb.trace/entry-values.exp
- Authentication-results: sourceware.org; auth=none
- References: <1419840861-10723-1-git-send-email-yao at codesourcery dot com> <alpine dot DEB dot 1 dot 10 dot 1412292255010 dot 19155 at tp dot orcam dot me dot uk> <87zja5uxjk dot fsf at codesourcery dot com> <alpine dot DEB dot 1 dot 10 dot 1412301401280 dot 19155 at tp dot orcam dot me dot uk> <87r3vbuecf dot fsf at codesourcery dot com> <alpine dot LFD dot 2 dot 11 dot 1501072207140 dot 27020 at eddie dot linux-mips dot org> <87oaqat6uj dot fsf at codesourcery dot com>
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