This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] Test case for entry values.
- From: Vidya Praveen <vidyapraveen at arm dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 10 Sep 2013 16:30:19 +0100
- Subject: Re: [PATCH 1/2] Test case for entry values.
- Authentication-results: sourceware.org; auth=none
- References: <1376379586-24150-1-git-send-email-yao at codesourcery dot com> <1376379586-24150-2-git-send-email-yao at codesourcery dot com> <5220B1B6 dot 2000304 at arm dot com> <20130830152927 dot GC9666 at e103625-lin dot cambridge dot arm dot com> <52213712 dot 1030700 at codesourcery dot com>
On Sat, Aug 31, 2013 at 01:21:38AM +0100, Yao Qi wrote:
> On 08/30/2013 11:29 PM, Vidya Praveen wrote:
> > +if [string equal $bar_call_foo ""] {
> > + fail "Find the call or branch instruction offset in bar"
> > + # The following test makes no sense if the offset is unknown. We need
> > + # to update the pattern above to match call or branch instruction for
> > + # the target architecture.
> > + return -1
> > +}
> >
> > This test fails for ARM targets as they generate 'bl'.
>
> As the comment said, the pattern can be updated to match instruction
> 'bl'. I don't know branch instructions of all architectures, but
> people familiar with one arch probably can add its branch instruction
> into the pattern without much effort.
OK. But isn't it better to have the condition (!gdb_target_supports_trace)
that checks if the target supports tracing, in the beginning of the test
rather than much later?
I can modify to use an appropriate regular expression based on the
architecture. But I am trying to see the point when the test eventually
ends as UNSUPPORTED.
Regards
VP
>
> --
> Yao (??????)
>