]> sourceware.org Git - systemtap.git/commitdiff
listing_mode.exp: relax process.function(0xabcd) probes
authorJonathan Lebon <jlebon@redhat.com>
Wed, 11 Jun 2014 14:21:11 +0000 (10:21 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Wed, 11 Jun 2014 15:17:58 +0000 (11:17 -0400)
Using a process.function(0xabcd) may still cause prologue searching to
occur on older platforms (for GCC < 4.5) due to possibly bad debuginfo
in the prologue (see e.g. commit 277a2b9 and GDB's PR13777).

Thus, the resulting probe from a process.function(0xabcd) might not
match the exact address given if it has been adjusted by
prologue-searching. So we relax the requirement by simply checking that
the address printed in a proper hex format.

testsuite/systemtap.base/listing_mode.exp

index 0c21d3dbc8438d9c5b2c4b0eb08479515752d958..e594dcb4057dbe79a5a93331e680a7c0fa1a2ffb 100644 (file)
@@ -641,22 +641,22 @@ if {$exepath != ""} {
       testing_probe {process.function(number)}
 
       stap_list_cmd "process.function(0x$process_addr)" \
-         "process(\"$exefullpath\").function(0x$process_addr)"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.function\\\(0x\[a-f0-9\]+\\\)"
 
       testing_probe {process.function(number).call}
 
       stap_list_cmd "process.function(0x$process_addr).call" \
-         "process(\"$exefullpath\").function(0x$process_addr).call"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.function\\\(0x\[a-f0-9\]+\\\)\\\.call"
 
       testing_probe {process.function(number).exported}
 
       stap_list_cmd "process.function(0x$process_addr).exported" \
-         "process(\"$exefullpath\").function(0x$process_addr).exported"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.function\\\(0x\[a-f0-9\]+\\\)\\\.exported"
 
       testing_probe {process.function(number).return}
 
       stap_list_cmd "process.function(0x$process_addr).return" \
-         "process(\"$exefullpath\").function(0x$process_addr).return"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.function\\\(0x\[a-f0-9\]+\\\)\\\.return"
    }
 
    testing_probe {process.function(string)}
@@ -724,22 +724,22 @@ if {$exepath != ""} {
       testing_probe {process.library(string).function(number)}
 
       stap_list_cmd_lib "process.library(\"sopath\").function(0x$library_addr)" \
-         "process(\"$exefullpath\").library(\"$sofullpath\").function(0x$library_addr)"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(0x\[0-9a-f\]+\\\)"
 
       testing_probe {process.library(string).function(number).call}
 
       stap_list_cmd_lib "process.library(\"sopath\").function(0x$library_addr).call" \
-         "process(\"$exefullpath\").library(\"$sofullpath\").function(0x$library_addr).call"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(0x\[0-9a-f\]+\\\)\\\.call"
 
       testing_probe {process.library(string).function(number).exported}
 
       stap_list_cmd_lib "process.library(\"sopath\").function(0x$library_addr).exported" \
-         "process(\"$exefullpath\").library(\"$sofullpath\").function(0x$library_addr).exported"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(0x\[0-9a-f\]+\\\)\\\.exported"
 
       testing_probe {process.library(string).function(number).return}
 
       stap_list_cmd_lib "process.library(\"sopath\").function(0x$library_addr).return" \
-         "process(\"$exefullpath\").library(\"$sofullpath\").function(0x$library_addr).return"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(0x\[0-9a-f\]+\\\)\\\.return"
    }
 
    testing_probe {process.library(string).function(string)}
This page took 0.031028 seconds and 5 git commands to generate.