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

Side by Side Diff: gdb/testsuite/gdb.python/py-objfile-script.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.python/py-objfile.exp ('k') | gdb/testsuite/gdb.python/py-parameter.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2011-2012 Free Software Foundation, Inc. 1 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
2 2
3 # This program is free software; you can redistribute it and/or modify 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 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 5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version. 6 # (at your option) any later version.
7 # 7 #
8 # This program is distributed in the hope that it will be useful, 8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details. 11 # GNU General Public License for more details.
12 # 12 #
13 # You should have received a copy of the GNU General Public License 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/>. 14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
16 # This file is part of the GDB testsuite. It tests automagic loading of 16 # This file is part of the GDB testsuite. It tests automagic loading of
17 # -gdb.py scripts. 17 # -gdb.py scripts.
18 18
19 if $tracelevel then { 19 standard_testfile
20 strace $tracelevel
21 }
22 20
23 set testfile "py-objfile-script" 21 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
24 set srcfile ${testfile}.c
25 set binfile ${objdir}/${subdir}/${testfile}
26 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu g}] != "" } {
27 untested "Couldn't compile ${srcfile}"
28 return -1 22 return -1
29 } 23 }
30 24
31 # Start with a fresh gdb. 25 # Start with a fresh gdb.
32 gdb_exit 26 gdb_exit
33 gdb_start 27 gdb_start
34 28
35 # Skip all tests if Python scripting is not enabled. 29 # Skip all tests if Python scripting is not enabled.
36 if { [skip_python_tests] } { continue } 30 if { [skip_python_tests] } { continue }
37 31
38 # Make the -gdb.py script available to gdb, it is automagically loaded by gdb. 32 # Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
39 # Care is taken to put it in the same directory as the binary so that 33 # Care is taken to put it in the same directory as the binary so that
40 # gdb will find it. 34 # gdb will find it.
41 set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}-gdb .py.in ${subdir}/${testfile}-gdb.py] 35 set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}-gdb .py.in ${subdir}/${testfile}-gdb.py]
42 36
43 gdb_reinitialize_dir $srcdir/$subdir 37 gdb_reinitialize_dir $srcdir/$subdir
38 gdb_test_no_output "set auto-load safe-path ${remote_python_file}" "set auto-loa d safe-path"
44 gdb_load ${binfile} 39 gdb_load ${binfile}
45 40
46 # Verify gdb loaded the script. 41 # Verify gdb loaded the script.
47 gdb_test "info auto-load-scripts" "Yes.*/${testfile}-gdb.py.*" 42 gdb_test "info auto-load python-scripts" "Yes.*/${testfile}-gdb.py.*"
48 43
49 if ![runto_main] { 44 if ![runto_main] {
50 perror "couldn't run to main" 45 perror "couldn't run to main"
51 return 46 return
52 } 47 }
53 48
54 gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \ 49 gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \
55 ".*Breakpoint.*" 50 ".*Breakpoint.*"
56 gdb_test "continue" ".*Breakpoint.*" 51 gdb_test "continue" ".*Breakpoint.*"
57 52
58 gdb_test "print ss" " = a=<1> b=<2>" 53 gdb_test "print ss" " = a=<1> b=<2>"
59 54
60 remote_file host delete ${remote_python_file} 55 remote_file host delete ${remote_python_file}
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.python/py-objfile.exp ('k') | gdb/testsuite/gdb.python/py-parameter.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698