]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: allowed for function_range to deal with mangled functions
authorBruno Larsen <blarsen@redhat.com>
Wed, 12 Oct 2022 12:51:10 +0000 (14:51 +0200)
committerBruno Larsen <blarsen@redhat.com>
Thu, 10 Nov 2022 13:51:49 +0000 (14:51 +0100)
When calling get_func_info inside a test case, it would cause failures
if the function was printed using a C++ style mangled name. The current
patch fixes this by allowing for mangled names along with the current
rules.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/lib/dwarf.exp

index b843b1acf75032224d08e9f4ea274d601880c469..9df8e7f9bdc05d8e0dd271541379fc3d2855aa8c 100644 (file)
@@ -400,7 +400,7 @@ proc function_range { func src {options {debug}} } {
     if { $func_length != 0 } {
        set func_pattern "$func_pattern\\+$func_length"
     }
-    set test "x/2i $func+$func_length"
+    set test "with print asm-demangle on -- x/2i $func+$func_length"
     gdb_test_multiple $test $test {
        -re ".*($hex) <$func_pattern>:\[^\r\n\]+\r\n\[ \]+($hex).*\.\r\n$gdb_prompt $" {
            set start $expect_out(1,string)