[gdb/testsuite] Fix calls in gdb.arch/thumb2-it.exp

Message ID 58a6af50-7bd9-f6c7-dbed-98c473e5e07d@foss.arm.com
State New, archived
Headers

Commit Message

Thomas Preud'homme Sept. 6, 2017, 3:26 p.m. UTC
  Hi,

Tests in gdb.arch/thumb2-it.exp call functions defined in assembly
without type debugging information. Since
7022349d5c86bae74b49225515f42d2e221bd368 this triggers an error which
leads to many tests to FAIL. This patch cast the call to indicate the
return type of the functions when calling them.

ChangeLog entry is as follows:

*** gdb/testsuite/ChangeLog ***

2017-09-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* gdb.arch/thumb2-it.exp: Cast call to assembly defined function.

All tests in that exp file PASS after that change.

Is this ok for master?

Best regards,

Thomas
  

Comments

Pedro Alves Sept. 6, 2017, 3:31 p.m. UTC | #1
On 09/06/2017 04:26 PM, Thomas Preudhomme wrote:
> Hi,
> 
> Tests in gdb.arch/thumb2-it.exp call functions defined in assembly
> without type debugging information. Since
> 7022349d5c86bae74b49225515f42d2e221bd368 

I find Linux's style to refer to past commits helpful when
reading commit logs.  I.e., also mention the commit subject, like:

... Since 7022349d5c86 ("Stop assuming no-debug-info functions
return int"), this triggers ...

This gives a clue to humans what the commit is about.

> this triggers an error which
> leads to many tests to FAIL. This patch cast the call to indicate the
> return type of the functions when calling them.

> 
> Is this ok for master?

OK.

Thanks,
Pedro Alves
  
Thomas Preud'homme Sept. 6, 2017, 4:56 p.m. UTC | #2
On 06/09/17 16:31, Pedro Alves wrote:
> On 09/06/2017 04:26 PM, Thomas Preudhomme wrote:
>> Hi,
>>
>> Tests in gdb.arch/thumb2-it.exp call functions defined in assembly
>> without type debugging information. Since
>> 7022349d5c86bae74b49225515f42d2e221bd368
> 
> I find Linux's style to refer to past commits helpful when
> reading commit logs.  I.e., also mention the commit subject, like:
> 
> ... Since 7022349d5c86 ("Stop assuming no-debug-info functions
> return int"), this triggers ...
> 
> This gives a clue to humans what the commit is about.

Indeed, thanks for the suggestion.

> 
>> this triggers an error which
>> leads to many tests to FAIL. This patch cast the call to indicate the
>> return type of the functions when calling them.
> 
>>
>> Is this ok for master?
> 
> OK.

Pushed.

Best regards,

Thomas
  

Patch

diff --git a/gdb/testsuite/gdb.arch/thumb2-it.exp b/gdb/testsuite/gdb.arch/thumb2-it.exp
index ab0dae38e302cdfef0232780612ea9a2f36d7f54..e100d068b3a92f24fb1bd0f8ffaedcc58d7512a8 100644
--- a/gdb/testsuite/gdb.arch/thumb2-it.exp
+++ b/gdb/testsuite/gdb.arch/thumb2-it.exp
@@ -58,7 +58,7 @@  proc test_it_block { func } {
 	return
     }
 
-    gdb_test "call ${func}()" "Breakpoint.*@ Setup.*" "$func, call"
+    gdb_test "call (int) ${func}()" "Breakpoint.*@ Setup.*" "$func, call"
 
     set expected 0
     set reached 0
@@ -155,7 +155,7 @@  for { set i 1 } { $i <= 8 } { incr i } {
 }
 
 gdb_breakpoint "*it_breakpoints"
-gdb_test "call it_breakpoints()" "Breakpoint.*"
+gdb_test "call (int) it_breakpoints()" "Breakpoint.*"
 for { set i 1 } { $i <= 7 } { incr i } {
     test_it_break ${i}
 }