This is the mail archive of the gdb-cvs@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]

[binutils-gdb] Remove stale inline function handling from selftest_setup


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1d39de443a38448226ffc408290c17c54c598c39

commit 1d39de443a38448226ffc408290c17c54c598c39
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Jun 14 11:40:23 2018 +0100

    Remove stale inline function handling from selftest_setup
    
    Before commit 70ee000084aa ("[gdb] Allow function arguments in bp
    print match in selftest_setup"), this pattern in selftest_setup:
    
    	-re "Starting program.*Breakpoint \[0-9\]+,.* at .*main.c:.*$function.*$gdb_prompt $" {
    	    # $function may be inlined, so the program stops at the line
    	    # calling $function.
    	    pass "$description"
    	}
    
    happened to match if captured_main_1 was inlined and captured_main was
    not, because captured_main calls captured_main_1 first thing, which
    coincidentally matches "$function.*":
    
     Breakpoint 1, captured_main (data=<optimized out>) at src/gdb/main.c:1147
     1147      captured_main_1 (context);
    
    That would probably be better "$function .*", with a space, but I
    think that even better is to remove the "may be inlined" case too now,
    because since ddfe970e6bec ("Don't elide all inlined frames") GDB
    presents the stop at the inline function instead of at the caller.
    
    gdb/testsuite/ChangeLog:
    2018-06-14  Pedro Alves  <palves@redhat.com>
    
    	* lib/selftest-support.exp (selftest_setup): Remove inlined
    	function handling.

Diff:
---
 gdb/testsuite/ChangeLog                | 5 +++++
 gdb/testsuite/lib/selftest-support.exp | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 723fa29..fd6b8fc 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-14  Pedro Alves  <palves@redhat.com>
+
+	* lib/selftest-support.exp (selftest_setup): Remove inlined
+	function handling.
+
 2018-06-14  Tom de Vries  <tdevries@suse.de>
 
 	* lib/selftest-support.exp (selftest_setup): Allow function arguments in
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index 0542861..887ea20 100644
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -94,11 +94,6 @@ proc selftest_setup { executable function } {
         -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(.*\\).*$gdb_prompt $" {
             xfail "$description (line numbers scrambled?)"
         }
-	-re "Starting program.*Breakpoint \[0-9\]+,.* at .*main.c:.*$function.*$gdb_prompt $" {
-	    # $function may be inlined, so the program stops at the line
-	    # calling $function.
-	    pass "$description"
-	}
         -re "vfork: No more processes.*$gdb_prompt $" {
             fail "$description (out of virtual memory)"
             set timeout $oldtimeout


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