diff -u -X /home/jkratoch/.diffi.list -rN gdb-6.5-orig/gdb/testsuite/gdb.threads/tls-sepdebug.c gdb-6.5/gdb/testsuite/gdb.threads/tls-sepdebug.c --- gdb-6.5-orig/gdb/testsuite/gdb.threads/tls-sepdebug.c 1970-01-01 01:00:00.000000000 +0100 +++ gdb-6.5/gdb/testsuite/gdb.threads/tls-sepdebug.c 2006-09-01 12:18:06.000000000 +0200 @@ -0,0 +1,41 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2006 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 2 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, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Please email any bugs, comments, and/or additions to this file to: + bug-gdb@prep.ai.mit.edu */ + +#include + +int x; + +void bar() +{ + x--; +} + +void foo() +{ + x++; +} + +int main() +{ + foo(); + bar(); + return 0; +} diff -u -X /home/jkratoch/.diffi.list -rN gdb-6.5-orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp gdb-6.5/gdb/testsuite/gdb.threads/tls-sepdebug.exp --- gdb-6.5-orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 1970-01-01 01:00:00.000000000 +0100 +++ gdb-6.5/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2006-09-01 12:23:29.000000000 +0200 @@ -0,0 +1,47 @@ +# Copyright 2006 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 2 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +if $tracelevel then { + strace $tracelevel +} + +set testfile tls-sepdebug +set srcfile ${testfile}.c +set binfile ${objdir}/${subdir}/${testfile} +if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 +} + +# Get things started. + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir +gdb_load ${binfile} + +# For C programs, "start" should stop in main(). + +gdb_test "start" \ + "main \\(\\) at .*tls-sepdebug.c.*" \ + "start" + +# Check for: Cannot find shared library `/usr/lib/debug/lib/libc-2.4.90.so.debug' in dynamic linker's load module list +# as happens with TLS variables and `separate_debug_objfile_backlink'. + +gdb_test "print errno" \ + "\\\$1 = \[0-9\].*" \ + "print errno"