This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Test case for entry values.


On Fri, Aug 30, 2013 at 03:52:38PM +0100, Vidya Praveen wrote:
> Hi Yao Qi,
> 
> On 08/13/13 08:39, Yao Qi wrote:
> [...]
> > +set bar_length ""
> > +set bar_call_foo ""
> > +
> > +# Calculate the offset of the last instruction from the beginning.
> > +set test "disassemble bar"
> > +gdb_test_multiple $test $test {
> > +    -re ".*$hex <\\+$decimal>:\[ \t\]+call\[^\r\n\]+\r\n\[ \]+$hex <\\+($decimal)>:" {
> 
> If I understand it right, this expects a 'call' instruction. Isn't this target
> specific?

Sorry I missed this comment:

+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'.

Regards                                                                                                                     
VP

        


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]