Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: gdb/testsuite/gdb.base/jit-simple.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/jit-simple.c ('k') | gdb/testsuite/gdb.base/jit-so.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2012 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 if {[skip_shlib_tests]} {
17 untested jit-simple.exp
18 return -1
19 }
20
21 if {[get_compiler_info]} {
22 warning "Could not get compiler info"
23 untested jit-simple.exp
24 return 1
25 }
26
27 #
28 # test running programs
29 #
30
31 set testfile jit-simple
32 set srcfile ${testfile}.c
33 set binfile ${objdir}/${subdir}/${testfile}
34 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb ug}] != "" } {
35 untested jit-simple.exp
36 return -1
37 }
38
39 # A helper for jit_test_reread that invokes gdb_run_cmd.
40 proc jit_run {msg} {
41 global decimal gdb_prompt
42
43 gdb_run_cmd
44 gdb_expect {
45 -re "Inferior .* exited.*$gdb_prompt $" {
46 pass $msg
47 }
48 -re ".*$gdb_prompt $" {
49 fail $msg
50 }
51 }
52 }
53
54 # Test re-running an inferior with a JIT descriptor, where the JIT
55 # descriptor changes address between runs.
56 # http://sourceware.org/bugzilla/show_bug.cgi?id=13431
57 proc jit_test_reread {} {
58 global testfile binfile subdir srcfile srcdir
59
60 clean_restart $testfile
61
62 # jit_run "initial run"
63 runto_main
64
65 gdb_test "print &__jit_debug_descriptor" "= .*" "blah 1"
66
67 gdb_rename_execfile $binfile ${binfile}x
68
69 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DSPACER}] != "" } {
70 fail "recompile $srcfile"
71 } else {
72 pass "recompile $srcfile"
73
74 # jit_run "second run"
75
76 runto_main
77 gdb_test "print &__jit_debug_descriptor" "= .*" "blah 1"
78 }
79 }
80
81 jit_test_reread
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.base/jit-simple.c ('k') | gdb/testsuite/gdb.base/jit-so.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698