]> git.pld-linux.org Git - packages/gdb.git/blame - gdb-dlopen-stap-probe-test2.patch
- typo
[packages/gdb.git] / gdb-dlopen-stap-probe-test2.patch
CommitLineData
a7de96f0
PS
1http://sourceware.org/ml/gdb-patches/2012-08/msg00500.html
2Subject: [patch] testsuite: Make solib-corrupted.exp untested for probes [Re: [RFA 0/4 take 2] Improved linker-debugger interface]
3
4On Fri, 17 Aug 2012 22:53:53 +0200, Jan Kratochvil wrote:
5> It regresses with glibc-debuginfo installed:
6>
7> info sharedlibrary^M
8> From To Syms Read Shared Object Library^M
9> 0x00007ffff7ddcb20 0x00007ffff7df63d9 Yes /lib64/ld-linux-x86-64.so.2^M
10> 0x00007ffff7ae05b0 0x00007ffff7b4ad78 Yes /lib64/libm.so.6^M
11> 0x00007ffff77431a0 0x00007ffff7883cf0 Yes /lib64/libc.so.6^M
12> (gdb) FAIL: gdb.base/solib-corrupted.exp: corrupted list
13>
14> But I guess there is no longer a way to test it with probes so it should just
15> run some 'info probes' and make this test UNTESTED if rtld probes are
16> available.
17
18I had to implement it for Fedora already anyway.
19
20
21Regards,
22Jan
23
24
25gdb/testsuite/
262012-08-18 Jan Kratochvil <jan.kratochvil@redhat.com>
27
28 * gdb.base/solib-corrupted.exp: New variable probes.
29 (info probes): New test.
30
31diff --git a/gdb/testsuite/gdb.base/solib-corrupted.exp b/gdb/testsuite/gdb.base/solib-corrupted.exp
32index 84b3b0c..c9f55d6 100644
33--- a/gdb/testsuite/gdb.base/solib-corrupted.exp
34+++ b/gdb/testsuite/gdb.base/solib-corrupted.exp
35@@ -36,6 +36,33 @@ if ![runto_main] {
36 return
37 }
38
39+# With probes interface GDB no longer scans the inferior library list so its
40+# corruption cannot be tested. There is no way to disable the probes
41+# interface.
42+
43+set probes { init_start init_complete map_start reloc_complete unmap_start
44+ unmap_complete }
45+set test "info probes"
46+gdb_test_multiple $test $test {
47+ -re "^rtld\[ \t\]+(?:rtld_)?(\[a-z_\]+)\[ \t\]" {
48+ set idx [lsearch -exact $probes $expect_out(1,string)]
49+ if { $idx >= 0 } {
50+ set probes [lreplace $probes $idx $idx]
51+ }
52+ exp_continue
53+ }
54+ -re "^\[^\r\n\]*\r\n" {
55+ exp_continue
56+ }
57+ -re "^$gdb_prompt $" {
58+ }
59+}
60+if { [llength $probes] == 0 } {
61+ xfail $test
62+ untested "GDB is using probes"
63+ return
64+}
65+
66 gdb_test "info sharedlibrary" "From * To .*" "normal list"
67
68 # GDB checks there for matching L_PREV.
69
This page took 0.060325 seconds and 4 git commands to generate.