]> git.pld-linux.org Git - packages/gdb.git/blame - gdb-6.3-test-movedir-20050125.patch
- updated (performance fixes).
[packages/gdb.git] / gdb-6.3-test-movedir-20050125.patch
CommitLineData
3a58abaf
AM
12005-01-25 Elena Zannoni <ezannoni@redhat.com>
2
3 * gdb.base/move-dir.exp: New test.
4 * gdb.base/move-dir.c: Ditto.
5 * gdb.base/move-dir.h: Ditto.
6
7Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c
8===================================================================
9--- /dev/null 1970-01-01 00:00:00.000000000 +0000
10+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c 2008-12-07 23:57:41.000000000 +0100
11@@ -0,0 +1,10 @@
12+#include <stdio.h>
13+#include <stdlib.h>
14+#include "move-dir.h"
15+
16+int main() {
17+ const char* hw = "hello world.";
18+ printf ("%s\n", hw);;
19+ other();
20+}
21+
22Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp
23===================================================================
24--- /dev/null 1970-01-01 00:00:00.000000000 +0000
25+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp 2008-12-07 10:13:01.000000000 +0100
51a5ef0f 26@@ -0,0 +1,57 @@
3a58abaf
AM
27+# Copyright 2005
28+# Free Software Foundation, Inc.
29+
30+# This program is free software; you can redistribute it and/or modify
31+# it under the terms of the GNU General Public License as published by
32+# the Free Software Foundation; either version 2 of the License, or
33+# (at your option) any later version.
34+#
35+# This program is distributed in the hope that it will be useful,
36+# but WITHOUT ANY WARRANTY; without even the implied warranty of
37+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38+# GNU General Public License for more details.
39+#
40+# You should have received a copy of the GNU General Public License
41+# along with this program; if not, write to the Free Software
42+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
43+
3a58abaf
AM
44+set testfile "move-dir"
45+set srcfile ${testfile}.c
46+set incfile ${testfile}.h
47+set binfile ${objdir}/${subdir}/${testfile}
48+
49+set testdir "${objdir}/${subdir}/incdir"
50+
51+remote_exec build "mkdir $testdir"
52+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}"
53+remote_exec build "cp ${srcdir}/${subdir}/${incfile} ${testdir}"
54+
55+set additional_flags "additional_flags=-I${subdir}/incdir"
56+
57+if { [gdb_compile "${objdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
58+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
59+}
60+
61+# Create and source the file that provides information about the compiler
62+# used to compile the test case.
63+
64+if [get_compiler_info ${binfile}] {
65+ return -1;
66+}
67+
68+
69+set oldtimeout $timeout
70+set timeout [expr "$timeout + 60"]
71+
72+# Start with a fresh gdb.
73+
74+gdb_exit
75+gdb_start
76+gdb_test "cd ../.." "" ""
77+gdb_load ${binfile}
78+gdb_test "list main" ".*hw.*other.*" "found main"
79+gdb_test "list other" ".*ostring.*" "found include file"
80+
81+
82+set timeout $oldtimeout
83+return 0
84Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h
85===================================================================
86--- /dev/null 1970-01-01 00:00:00.000000000 +0000
87+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h 2008-12-07 10:13:01.000000000 +0100
88@@ -0,0 +1,7 @@
89+#include <stdlib.h>
90+
91+void other() {
92+ const char* ostring = "other";
93+ printf ("%s\n", ostring);;
94+}
95+
This page took 0.047926 seconds and 4 git commands to generate.