mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
44ee81740e
This finishes making gdb.dwarf2 parallel-safe. To do this, this patch introduces a new gdb_remote_download proc, that works somewhat differently in the one specific case where it matters: for a copy to "host", if no destination was given, and the host is not actually remote, then standard_output_file is used. In parallel mode this guarantees that the resulting file will end up in a parallel-safe location. Tested on x86-64 Fedora 18. * gdb.dwarf2/dw2-basic.exp: Use gdb_remote_download. * gdb.dwarf2/dw2-compressed.exp: Use gdb_remote_download. * gdb.dwarf2/dw2-intercu.exp: Use gdb_remote_download. * gdb.dwarf2/dw2-intermix.exp: Use gdb_remote_download. * gdb.dwarf2/dw2-producer.exp: Use gdb_remote_download. * gdb.dwarf2/mac-fileno.exp: Use gdb_remote_download. * lib/gdb.exp (gdb_remote_download): New proc.
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
# Copyright 2004-2013 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
load_lib dwarf.exp
|
|
|
|
# Minimal DWARF-2 unit test
|
|
|
|
# This test can only be run on targets which support DWARF-2 and use gas.
|
|
if {![dwarf2_support]} {
|
|
return 0
|
|
}
|
|
|
|
standard_testfile .S
|
|
set dwarf_srcfile "file1.txt"
|
|
|
|
if {[prepare_for_testing_full $testfile.exp \
|
|
[list $testfile debug main.c debug $srcfile nodebug]]} {
|
|
return -1
|
|
}
|
|
|
|
set remote_dwarf_srcfile [gdb_remote_download host \
|
|
${srcdir}/${subdir}/${dwarf_srcfile}]
|
|
|
|
gdb_test_no_output "set listsize 1"
|
|
gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
|
|
gdb_test "ptype func_cu1" "type = int \\(\\)"
|
|
|
|
remote_file host delete ${remote_dwarf_srcfile}
|