From 14f607d3a993cec5b4926abd21971648bb3542a4 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 28 Oct 2009 18:59:09 +0100 Subject: debug/gdb: remove old versions diff --git a/config/debug/gdb.in b/config/debug/gdb.in index 1941408..4914e90 100644 --- a/config/debug/gdb.in +++ b/config/debug/gdb.in @@ -103,20 +103,6 @@ config GDB_V_6_8 bool prompt "6.8" -config GDB_V_6_7_1 - bool - prompt "6.7.1 (EXPERIMENTAL)" - depends on EXPERIMENTAL - -config GDB_V_6_7 - bool - prompt "6.7 (EXPERIMENTAL)" - depends on EXPERIMENTAL - -config GDB_V_6_6 - bool - prompt "6.6" - config GDB_V_snapshot bool prompt "snapshot (EXPERIMENTAL)" @@ -130,9 +116,6 @@ config GDB_VERSION # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW default "6.8" if GDB_V_6_8 - default "6.7.1" if GDB_V_6_7_1 - default "6.7" if GDB_V_6_7 - default "6.6" if GDB_V_6_6 default "snapshot" if GDB_V_snapshot if GDB_NATIVE diff --git a/patches/gdb/6.6/100-uclibc-conf.patch b/patches/gdb/6.6/100-uclibc-conf.patch deleted file mode 100644 index a790b6f..0000000 --- a/patches/gdb/6.6/100-uclibc-conf.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -rNdup gdb-6.6.orig/bfd/configure gdb-6.6/bfd/configure ---- gdb-6.6.orig/bfd/configure 2006-10-25 08:49:20.000000000 +0200 -+++ gdb-6.6/bfd/configure 2007-05-14 10:35:50.000000000 +0200 -@@ -3579,6 +3579,11 @@ linux-gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -rNdup gdb-6.6.orig/libtool.m4 gdb-6.6/libtool.m4 ---- gdb-6.6.orig/libtool.m4 2005-12-27 17:37:57.000000000 +0100 -+++ gdb-6.6/libtool.m4 2007-05-14 10:35:50.000000000 +0200 -@@ -751,6 +751,11 @@ netbsd* | knetbsd*-gnu) - fi - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - newsos6) - [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'] - lt_cv_file_magic_cmd=/usr/bin/file -diff -rNdup gdb-6.6.orig/ltconfig gdb-6.6/ltconfig ---- gdb-6.6.orig/ltconfig 2006-07-04 22:31:03.000000000 +0200 -+++ gdb-6.6/ltconfig 2007-05-14 10:35:50.000000000 +0200 -@@ -602,7 +602,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1270,6 +1270,24 @@ linux-gnu*) - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ # Note: copied from linux-gnu, and may not be appropriate. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no -diff -rNdup gdb-6.6.orig/opcodes/configure gdb-6.6/opcodes/configure ---- gdb-6.6.orig/opcodes/configure 2006-10-25 08:49:20.000000000 +0200 -+++ gdb-6.6/opcodes/configure 2007-05-14 10:35:50.000000000 +0200 -@@ -3590,6 +3590,11 @@ netbsd* | knetbsd*-gnu) - fi - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - newsos6) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file diff --git a/patches/gdb/6.6/110-fix-compile-flag-mismatch.patch b/patches/gdb/6.6/110-fix-compile-flag-mismatch.patch deleted file mode 100644 index 60f0ace..0000000 --- a/patches/gdb/6.6/110-fix-compile-flag-mismatch.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -rduNp gdb-6.6-100/Makefile.in gdb-6.6/Makefile.in ---- gdb-6.6-100/Makefile.in 2006-12-18 08:21:19.000000000 +0100 -+++ gdb-6.6/Makefile.in 2007-05-14 10:54:29.000000000 +0200 -@@ -331,7 +331,7 @@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_ - # CFLAGS will be just -g. We want to ensure that TARGET libraries - # (which we know are built with gcc) are built with optimizations so - # prepend -O2 when setting CFLAGS_FOR_TARGET. --CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)) - SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ - CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) - LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) -diff -rduNp gdb-6.6-100/Makefile.tpl gdb-6.6/Makefile.tpl ---- gdb-6.6-100/Makefile.tpl 2006-11-15 00:26:39.000000000 +0100 -+++ gdb-6.6/Makefile.tpl 2007-05-14 10:54:29.000000000 +0200 -@@ -334,7 +334,7 @@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_ - # CFLAGS will be just -g. We want to ensure that TARGET libraries - # (which we know are built with gcc) are built with optimizations so - # prepend -O2 when setting CFLAGS_FOR_TARGET. --CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)) - SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ - CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) - LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) -diff -rduNp gdb-6.6-100/gdb/configure gdb-6.6/gdb/configure ---- gdb-6.6-100/gdb/configure 2006-12-17 16:38:59.000000000 +0100 -+++ gdb-6.6/gdb/configure 2007-05-14 10:55:41.000000000 +0200 -@@ -272,7 +272,7 @@ PACKAGE_STRING= - PACKAGE_BUGREPORT= - - ac_unique_file="main.c" --ac_subdirs_all="$ac_subdirs_all doc testsuite" -+ac_subdirs_all="$ac_subdirs_all doc" - # Factoring default headers for most tests. - ac_includes_default="\ - #include -@@ -3055,7 +3055,7 @@ _ACEOF - - - --subdirs="$subdirs doc testsuite" -+subdirs="$subdirs doc" - - - # Provide defaults for some variables set by the per-host and per-target -diff -rduNp gdb-6.6-100/gdb/gdbserver/configure gdb-6.6/gdb/gdbserver/configure ---- gdb-6.6-100/gdb/gdbserver/configure 2006-11-22 01:10:19.000000000 +0100 -+++ gdb-6.6/gdb/gdbserver/configure 2007-05-14 10:54:29.000000000 +0200 -@@ -1239,7 +1239,7 @@ echo "$as_me: error: \`$ac_var' was not - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo $ac_old_val`" != "`echo $ac_new_val`"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -diff -rduNp gdb-6.6-100/gdb/testsuite/configure gdb-6.6/gdb/testsuite/configure ---- gdb-6.6-100/gdb/testsuite/configure 2006-06-21 15:57:21.000000000 +0200 -+++ gdb-6.6/gdb/testsuite/configure 2007-05-14 10:54:29.000000000 +0200 -@@ -1248,7 +1248,7 @@ echo "$as_me: error: \`$ac_var' was not - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo $ac_old_val" != "`echo $ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 diff --git a/patches/gdb/6.7.1/100-security-errata-20050610.patch b/patches/gdb/6.7.1/100-security-errata-20050610.patch deleted file mode 100644 index 30c7f26..0000000 --- a/patches/gdb/6.7.1/100-security-errata-20050610.patch +++ /dev/null @@ -1,205 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/35_all_gdb-6.3-security-errata-20050610.patch --= BEGIN original header =- -2005-06-09 Jeff Johnston - - * gdb.base/gdbinit.exp: New testcase. - * gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp. - -2005-06-08 Daniel Jacobowitz - Jeff Johnston - - * Makefile.in (cli-cmds.o): Update. - * configure.in: Add check for getuid. - * configure: Regenerated. - * config.in: Ditto. - * main.c (captured_main): Pass -1 to source_command when loading - gdbinit files. - * cli/cli-cmds.c: Include "gdb_stat.h" and . - (source_command): Update documentation. Check permissions if - FROM_TTY is -1. - --= END original header =- -diff -durN gdb-6.7.1.orig/gdb/cli/cli-cmds.c gdb-6.7.1/gdb/cli/cli-cmds.c ---- gdb-6.7.1.orig/gdb/cli/cli-cmds.c 2007-08-23 20:08:47.000000000 +0200 -+++ gdb-6.7.1/gdb/cli/cli-cmds.c 2008-06-17 23:27:44.000000000 +0200 -@@ -36,6 +36,7 @@ - #include "objfiles.h" - #include "source.h" - #include "disasm.h" -+#include "gdb_stat.h" - - #include "ui-out.h" - -@@ -459,12 +460,31 @@ - - if (fd == -1) - { -- if (from_tty) -+ if (from_tty > 0) - perror_with_name (file); - else - return; - } - -+#ifdef HAVE_GETUID -+ if (from_tty == -1) -+ { -+ struct stat statbuf; -+ if (fstat (fd, &statbuf) < 0) -+ { -+ perror_with_name (file); -+ close (fd); -+ return; -+ } -+ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH)) -+ { -+ warning (_("not using untrusted file \"%s\""), file); -+ close (fd); -+ return; -+ } -+ } -+#endif -+ - stream = fdopen (fd, FOPEN_RT); - script_from_file (stream, file); - -diff -durN gdb-6.7.1.orig/gdb/main.c gdb-6.7.1/gdb/main.c ---- gdb-6.7.1.orig/gdb/main.c 2007-08-23 20:08:36.000000000 +0200 -+++ gdb-6.7.1/gdb/main.c 2008-06-17 23:27:44.000000000 +0200 -@@ -688,7 +688,7 @@ - - if (!inhibit_gdbinit) - { -- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL); -+ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL); - } - - /* Do stats; no need to do them elsewhere since we'll only -@@ -766,7 +766,7 @@ - || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) - if (!inhibit_gdbinit) - { -- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL); -+ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL); - } - - for (i = 0; i < ncmd; i++) -diff -durN gdb-6.7.1.orig/gdb/Makefile.in gdb-6.7.1/gdb/Makefile.in ---- gdb-6.7.1.orig/gdb/Makefile.in 2008-06-17 23:27:44.000000000 +0200 -+++ gdb-6.7.1/gdb/Makefile.in 2008-06-17 23:27:44.000000000 +0200 -@@ -2885,7 +2885,7 @@ - $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ - $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ - $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ -- $(tui_h) -+ $(tui_h) $(gdb_stat_h) - $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c - cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ - $(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \ -diff -durN gdb-6.7.1.orig/gdb/testsuite/gdb.base/gdbinit.exp gdb-6.7.1/gdb/testsuite/gdb.base/gdbinit.exp ---- gdb-6.7.1.orig/gdb/testsuite/gdb.base/gdbinit.exp 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.7.1/gdb/testsuite/gdb.base/gdbinit.exp 2008-06-17 23:27:44.000000000 +0200 -@@ -0,0 +1,98 @@ -+# Copyright 2005 -+# 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 -+ -+# This file was written by Jeff Johnston . -+ -+if $tracelevel then { -+ strace $tracelevel -+} -+ -+set prms_id 0 -+set bug_id 0 -+ -+# are we on a target board -+if [is_remote target] { -+ return -+} -+ -+ -+global verbose -+global GDB -+global GDBFLAGS -+global gdb_prompt -+global timeout -+global gdb_spawn_id; -+ -+gdb_stop_suppressing_tests; -+ -+verbose "Spawning $GDB -nw" -+ -+if [info exists gdb_spawn_id] { -+ return 0; -+} -+ -+if ![is_remote host] { -+ if { [which $GDB] == 0 } then { -+ perror "$GDB does not exist." -+ exit 1 -+ } -+} -+ -+set env(HOME) [pwd] -+remote_exec build "rm .gdbinit" -+remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit" -+remote_exec build "chmod 646 .gdbinit" -+ -+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; -+if { $res < 0 || $res == "" } { -+ perror "Spawning $GDB failed." -+ return 1; -+} -+gdb_expect 360 { -+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { -+ pass "untrusted .gdbinit caught." -+ } -+ -re "$gdb_prompt $" { -+ fail "untrusted .gdbinit caught." -+ } -+ timeout { -+ fail "(timeout) untrusted .gdbinit caught." -+ } -+} -+ -+remote_exec build "chmod 644 .gdbinit" -+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; -+if { $res < 0 || $res == "" } { -+ perror "Spawning $GDB failed." -+ return 1; -+} -+gdb_expect 360 { -+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { -+ fail "trusted .gdbinit allowed." -+ } -+ -re "in gdbinit.*$gdb_prompt $" { -+ pass "trusted .gdbinit allowed." -+ } -+ timeout { -+ fail "(timeout) trusted .gdbinit allowed." -+ } -+} -+ -+remote_exec build "rm .gdbinit" -diff -durN gdb-6.7.1.orig/gdb/testsuite/gdb.base/gdbinit.sample gdb-6.7.1/gdb/testsuite/gdb.base/gdbinit.sample ---- gdb-6.7.1.orig/gdb/testsuite/gdb.base/gdbinit.sample 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.7.1/gdb/testsuite/gdb.base/gdbinit.sample 2008-06-17 23:27:44.000000000 +0200 -@@ -0,0 +1 @@ -+echo "\nin gdbinit" diff --git a/patches/gdb/6.7.1/110-hppa-offsets.patch b/patches/gdb/6.7.1/110-hppa-offsets.patch deleted file mode 100644 index 06e1e74..0000000 --- a/patches/gdb/6.7.1/110-hppa-offsets.patch +++ /dev/null @@ -1,272 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/45_all_gdb-hppa-offsets.patch --= BEGIN original header =- -sanitized headers dont include asm/offsets.h, so cache a local copy - -http://bugs.gentoo.org/180476 -http://lists.parisc-linux.org/pipermail/parisc-linux/2007-February/031162.html - --= END original header =- -diff -durN gdb-6.7.1.orig/gdb/hppa-linux-nat.c gdb-6.7.1/gdb/hppa-linux-nat.c ---- gdb-6.7.1.orig/gdb/hppa-linux-nat.c 2007-08-23 20:08:33.000000000 +0200 -+++ gdb-6.7.1/gdb/hppa-linux-nat.c 2008-06-17 23:27:45.000000000 +0200 -@@ -32,7 +32,7 @@ - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,43) - #include - #else --#include -+#include - #endif - - #include "hppa-tdep.h" -diff -durN gdb-6.7.1.orig/gdb/hppa-offsets.h gdb-6.7.1/gdb/hppa-offsets.h ---- gdb-6.7.1.orig/gdb/hppa-offsets.h 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.7.1/gdb/hppa-offsets.h 2008-06-17 23:27:45.000000000 +0200 -@@ -0,0 +1,248 @@ -+#ifndef __ASM_OFFSETS_H__ -+#define __ASM_OFFSETS_H__ -+/* -+ * DO NOT MODIFY. -+ * -+ * This file was generated by arch/parisc/Makefile -+ * -+ */ -+ -+#define TASK_THREAD_INFO 4 /* offsetof(struct task_struct, thread_info) */ -+#define TASK_STATE 0 /* offsetof(struct task_struct, state) */ -+#define TASK_FLAGS 12 /* offsetof(struct task_struct, flags) */ -+#define TASK_SIGPENDING 1188 /* offsetof(struct task_struct, pending) */ -+#define TASK_PTRACE 16 /* offsetof(struct task_struct, ptrace) */ -+#define TASK_MM 108 /* offsetof(struct task_struct, mm) */ -+#define TASK_PERSONALITY 132 /* offsetof(struct task_struct, personality) */ -+#define TASK_PID 140 /* offsetof(struct task_struct, pid) */ -+ -+#define TASK_REGS 664 /* offsetof(struct task_struct, thread.regs) */ -+#define TASK_PT_PSW 664 /* offsetof(struct task_struct, thread.regs.gr[ 0]) */ -+#define TASK_PT_GR1 668 /* offsetof(struct task_struct, thread.regs.gr[ 1]) */ -+#define TASK_PT_GR2 672 /* offsetof(struct task_struct, thread.regs.gr[ 2]) */ -+#define TASK_PT_GR3 676 /* offsetof(struct task_struct, thread.regs.gr[ 3]) */ -+#define TASK_PT_GR4 680 /* offsetof(struct task_struct, thread.regs.gr[ 4]) */ -+#define TASK_PT_GR5 684 /* offsetof(struct task_struct, thread.regs.gr[ 5]) */ -+#define TASK_PT_GR6 688 /* offsetof(struct task_struct, thread.regs.gr[ 6]) */ -+#define TASK_PT_GR7 692 /* offsetof(struct task_struct, thread.regs.gr[ 7]) */ -+#define TASK_PT_GR8 696 /* offsetof(struct task_struct, thread.regs.gr[ 8]) */ -+#define TASK_PT_GR9 700 /* offsetof(struct task_struct, thread.regs.gr[ 9]) */ -+#define TASK_PT_GR10 704 /* offsetof(struct task_struct, thread.regs.gr[10]) */ -+#define TASK_PT_GR11 708 /* offsetof(struct task_struct, thread.regs.gr[11]) */ -+#define TASK_PT_GR12 712 /* offsetof(struct task_struct, thread.regs.gr[12]) */ -+#define TASK_PT_GR13 716 /* offsetof(struct task_struct, thread.regs.gr[13]) */ -+#define TASK_PT_GR14 720 /* offsetof(struct task_struct, thread.regs.gr[14]) */ -+#define TASK_PT_GR15 724 /* offsetof(struct task_struct, thread.regs.gr[15]) */ -+#define TASK_PT_GR16 728 /* offsetof(struct task_struct, thread.regs.gr[16]) */ -+#define TASK_PT_GR17 732 /* offsetof(struct task_struct, thread.regs.gr[17]) */ -+#define TASK_PT_GR18 736 /* offsetof(struct task_struct, thread.regs.gr[18]) */ -+#define TASK_PT_GR19 740 /* offsetof(struct task_struct, thread.regs.gr[19]) */ -+#define TASK_PT_GR20 744 /* offsetof(struct task_struct, thread.regs.gr[20]) */ -+#define TASK_PT_GR21 748 /* offsetof(struct task_struct, thread.regs.gr[21]) */ -+#define TASK_PT_GR22 752 /* offsetof(struct task_struct, thread.regs.gr[22]) */ -+#define TASK_PT_GR23 756 /* offsetof(struct task_struct, thread.regs.gr[23]) */ -+#define TASK_PT_GR24 760 /* offsetof(struct task_struct, thread.regs.gr[24]) */ -+#define TASK_PT_GR25 764 /* offsetof(struct task_struct, thread.regs.gr[25]) */ -+#define TASK_PT_GR26 768 /* offsetof(struct task_struct, thread.regs.gr[26]) */ -+#define TASK_PT_GR27 772 /* offsetof(struct task_struct, thread.regs.gr[27]) */ -+#define TASK_PT_GR28 776 /* offsetof(struct task_struct, thread.regs.gr[28]) */ -+#define TASK_PT_GR29 780 /* offsetof(struct task_struct, thread.regs.gr[29]) */ -+#define TASK_PT_GR30 784 /* offsetof(struct task_struct, thread.regs.gr[30]) */ -+#define TASK_PT_GR31 788 /* offsetof(struct task_struct, thread.regs.gr[31]) */ -+#define TASK_PT_FR0 792 /* offsetof(struct task_struct, thread.regs.fr[ 0]) */ -+#define TASK_PT_FR1 800 /* offsetof(struct task_struct, thread.regs.fr[ 1]) */ -+#define TASK_PT_FR2 808 /* offsetof(struct task_struct, thread.regs.fr[ 2]) */ -+#define TASK_PT_FR3 816 /* offsetof(struct task_struct, thread.regs.fr[ 3]) */ -+#define TASK_PT_FR4 824 /* offsetof(struct task_struct, thread.regs.fr[ 4]) */ -+#define TASK_PT_FR5 832 /* offsetof(struct task_struct, thread.regs.fr[ 5]) */ -+#define TASK_PT_FR6 840 /* offsetof(struct task_struct, thread.regs.fr[ 6]) */ -+#define TASK_PT_FR7 848 /* offsetof(struct task_struct, thread.regs.fr[ 7]) */ -+#define TASK_PT_FR8 856 /* offsetof(struct task_struct, thread.regs.fr[ 8]) */ -+#define TASK_PT_FR9 864 /* offsetof(struct task_struct, thread.regs.fr[ 9]) */ -+#define TASK_PT_FR10 872 /* offsetof(struct task_struct, thread.regs.fr[10]) */ -+#define TASK_PT_FR11 880 /* offsetof(struct task_struct, thread.regs.fr[11]) */ -+#define TASK_PT_FR12 888 /* offsetof(struct task_struct, thread.regs.fr[12]) */ -+#define TASK_PT_FR13 896 /* offsetof(struct task_struct, thread.regs.fr[13]) */ -+#define TASK_PT_FR14 904 /* offsetof(struct task_struct, thread.regs.fr[14]) */ -+#define TASK_PT_FR15 912 /* offsetof(struct task_struct, thread.regs.fr[15]) */ -+#define TASK_PT_FR16 920 /* offsetof(struct task_struct, thread.regs.fr[16]) */ -+#define TASK_PT_FR17 928 /* offsetof(struct task_struct, thread.regs.fr[17]) */ -+#define TASK_PT_FR18 936 /* offsetof(struct task_struct, thread.regs.fr[18]) */ -+#define TASK_PT_FR19 944 /* offsetof(struct task_struct, thread.regs.fr[19]) */ -+#define TASK_PT_FR20 952 /* offsetof(struct task_struct, thread.regs.fr[20]) */ -+#define TASK_PT_FR21 960 /* offsetof(struct task_struct, thread.regs.fr[21]) */ -+#define TASK_PT_FR22 968 /* offsetof(struct task_struct, thread.regs.fr[22]) */ -+#define TASK_PT_FR23 976 /* offsetof(struct task_struct, thread.regs.fr[23]) */ -+#define TASK_PT_FR24 984 /* offsetof(struct task_struct, thread.regs.fr[24]) */ -+#define TASK_PT_FR25 992 /* offsetof(struct task_struct, thread.regs.fr[25]) */ -+#define TASK_PT_FR26 1000 /* offsetof(struct task_struct, thread.regs.fr[26]) */ -+#define TASK_PT_FR27 1008 /* offsetof(struct task_struct, thread.regs.fr[27]) */ -+#define TASK_PT_FR28 1016 /* offsetof(struct task_struct, thread.regs.fr[28]) */ -+#define TASK_PT_FR29 1024 /* offsetof(struct task_struct, thread.regs.fr[29]) */ -+#define TASK_PT_FR30 1032 /* offsetof(struct task_struct, thread.regs.fr[30]) */ -+#define TASK_PT_FR31 1040 /* offsetof(struct task_struct, thread.regs.fr[31]) */ -+#define TASK_PT_SR0 1048 /* offsetof(struct task_struct, thread.regs.sr[ 0]) */ -+#define TASK_PT_SR1 1052 /* offsetof(struct task_struct, thread.regs.sr[ 1]) */ -+#define TASK_PT_SR2 1056 /* offsetof(struct task_struct, thread.regs.sr[ 2]) */ -+#define TASK_PT_SR3 1060 /* offsetof(struct task_struct, thread.regs.sr[ 3]) */ -+#define TASK_PT_SR4 1064 /* offsetof(struct task_struct, thread.regs.sr[ 4]) */ -+#define TASK_PT_SR5 1068 /* offsetof(struct task_struct, thread.regs.sr[ 5]) */ -+#define TASK_PT_SR6 1072 /* offsetof(struct task_struct, thread.regs.sr[ 6]) */ -+#define TASK_PT_SR7 1076 /* offsetof(struct task_struct, thread.regs.sr[ 7]) */ -+#define TASK_PT_IASQ0 1080 /* offsetof(struct task_struct, thread.regs.iasq[0]) */ -+#define TASK_PT_IASQ1 1084 /* offsetof(struct task_struct, thread.regs.iasq[1]) */ -+#define TASK_PT_IAOQ0 1088 /* offsetof(struct task_struct, thread.regs.iaoq[0]) */ -+#define TASK_PT_IAOQ1 1092 /* offsetof(struct task_struct, thread.regs.iaoq[1]) */ -+#define TASK_PT_CR27 1096 /* offsetof(struct task_struct, thread.regs.cr27) */ -+#define TASK_PT_ORIG_R28 1104 /* offsetof(struct task_struct, thread.regs.orig_r28) */ -+#define TASK_PT_KSP 1108 /* offsetof(struct task_struct, thread.regs.ksp) */ -+#define TASK_PT_KPC 1112 /* offsetof(struct task_struct, thread.regs.kpc) */ -+#define TASK_PT_SAR 1116 /* offsetof(struct task_struct, thread.regs.sar) */ -+#define TASK_PT_IIR 1120 /* offsetof(struct task_struct, thread.regs.iir) */ -+#define TASK_PT_ISR 1124 /* offsetof(struct task_struct, thread.regs.isr) */ -+#define TASK_PT_IOR 1128 /* offsetof(struct task_struct, thread.regs.ior) */ -+ -+#define TASK_SZ 1272 /* sizeof(struct task_struct) */ -+#define TASK_SZ_ALGN 1344 /* align(sizeof(struct task_struct), 64) */ -+ -+#define PT_PSW 0 /* offsetof(struct pt_regs, gr[ 0]) */ -+#define PT_GR1 4 /* offsetof(struct pt_regs, gr[ 1]) */ -+#define PT_GR2 8 /* offsetof(struct pt_regs, gr[ 2]) */ -+#define PT_GR3 12 /* offsetof(struct pt_regs, gr[ 3]) */ -+#define PT_GR4 16 /* offsetof(struct pt_regs, gr[ 4]) */ -+#define PT_GR5 20 /* offsetof(struct pt_regs, gr[ 5]) */ -+#define PT_GR6 24 /* offsetof(struct pt_regs, gr[ 6]) */ -+#define PT_GR7 28 /* offsetof(struct pt_regs, gr[ 7]) */ -+#define PT_GR8 32 /* offsetof(struct pt_regs, gr[ 8]) */ -+#define PT_GR9 36 /* offsetof(struct pt_regs, gr[ 9]) */ -+#define PT_GR10 40 /* offsetof(struct pt_regs, gr[10]) */ -+#define PT_GR11 44 /* offsetof(struct pt_regs, gr[11]) */ -+#define PT_GR12 48 /* offsetof(struct pt_regs, gr[12]) */ -+#define PT_GR13 52 /* offsetof(struct pt_regs, gr[13]) */ -+#define PT_GR14 56 /* offsetof(struct pt_regs, gr[14]) */ -+#define PT_GR15 60 /* offsetof(struct pt_regs, gr[15]) */ -+#define PT_GR16 64 /* offsetof(struct pt_regs, gr[16]) */ -+#define PT_GR17 68 /* offsetof(struct pt_regs, gr[17]) */ -+#define PT_GR18 72 /* offsetof(struct pt_regs, gr[18]) */ -+#define PT_GR19 76 /* offsetof(struct pt_regs, gr[19]) */ -+#define PT_GR20 80 /* offsetof(struct pt_regs, gr[20]) */ -+#define PT_GR21 84 /* offsetof(struct pt_regs, gr[21]) */ -+#define PT_GR22 88 /* offsetof(struct pt_regs, gr[22]) */ -+#define PT_GR23 92 /* offsetof(struct pt_regs, gr[23]) */ -+#define PT_GR24 96 /* offsetof(struct pt_regs, gr[24]) */ -+#define PT_GR25 100 /* offsetof(struct pt_regs, gr[25]) */ -+#define PT_GR26 104 /* offsetof(struct pt_regs, gr[26]) */ -+#define PT_GR27 108 /* offsetof(struct pt_regs, gr[27]) */ -+#define PT_GR28 112 /* offsetof(struct pt_regs, gr[28]) */ -+#define PT_GR29 116 /* offsetof(struct pt_regs, gr[29]) */ -+#define PT_GR30 120 /* offsetof(struct pt_regs, gr[30]) */ -+#define PT_GR31 124 /* offsetof(struct pt_regs, gr[31]) */ -+#define PT_FR0 128 /* offsetof(struct pt_regs, fr[ 0]) */ -+#define PT_FR1 136 /* offsetof(struct pt_regs, fr[ 1]) */ -+#define PT_FR2 144 /* offsetof(struct pt_regs, fr[ 2]) */ -+#define PT_FR3 152 /* offsetof(struct pt_regs, fr[ 3]) */ -+#define PT_FR4 160 /* offsetof(struct pt_regs, fr[ 4]) */ -+#define PT_FR5 168 /* offsetof(struct pt_regs, fr[ 5]) */ -+#define PT_FR6 176 /* offsetof(struct pt_regs, fr[ 6]) */ -+#define PT_FR7 184 /* offsetof(struct pt_regs, fr[ 7]) */ -+#define PT_FR8 192 /* offsetof(struct pt_regs, fr[ 8]) */ -+#define PT_FR9 200 /* offsetof(struct pt_regs, fr[ 9]) */ -+#define PT_FR10 208 /* offsetof(struct pt_regs, fr[10]) */ -+#define PT_FR11 216 /* offsetof(struct pt_regs, fr[11]) */ -+#define PT_FR12 224 /* offsetof(struct pt_regs, fr[12]) */ -+#define PT_FR13 232 /* offsetof(struct pt_regs, fr[13]) */ -+#define PT_FR14 240 /* offsetof(struct pt_regs, fr[14]) */ -+#define PT_FR15 248 /* offsetof(struct pt_regs, fr[15]) */ -+#define PT_FR16 256 /* offsetof(struct pt_regs, fr[16]) */ -+#define PT_FR17 264 /* offsetof(struct pt_regs, fr[17]) */ -+#define PT_FR18 272 /* offsetof(struct pt_regs, fr[18]) */ -+#define PT_FR19 280 /* offsetof(struct pt_regs, fr[19]) */ -+#define PT_FR20 288 /* offsetof(struct pt_regs, fr[20]) */ -+#define PT_FR21 296 /* offsetof(struct pt_regs, fr[21]) */ -+#define PT_FR22 304 /* offsetof(struct pt_regs, fr[22]) */ -+#define PT_FR23 312 /* offsetof(struct pt_regs, fr[23]) */ -+#define PT_FR24 320 /* offsetof(struct pt_regs, fr[24]) */ -+#define PT_FR25 328 /* offsetof(struct pt_regs, fr[25]) */ -+#define PT_FR26 336 /* offsetof(struct pt_regs, fr[26]) */ -+#define PT_FR27 344 /* offsetof(struct pt_regs, fr[27]) */ -+#define PT_FR28 352 /* offsetof(struct pt_regs, fr[28]) */ -+#define PT_FR29 360 /* offsetof(struct pt_regs, fr[29]) */ -+#define PT_FR30 368 /* offsetof(struct pt_regs, fr[30]) */ -+#define PT_FR31 376 /* offsetof(struct pt_regs, fr[31]) */ -+#define PT_SR0 384 /* offsetof(struct pt_regs, sr[ 0]) */ -+#define PT_SR1 388 /* offsetof(struct pt_regs, sr[ 1]) */ -+#define PT_SR2 392 /* offsetof(struct pt_regs, sr[ 2]) */ -+#define PT_SR3 396 /* offsetof(struct pt_regs, sr[ 3]) */ -+#define PT_SR4 400 /* offsetof(struct pt_regs, sr[ 4]) */ -+#define PT_SR5 404 /* offsetof(struct pt_regs, sr[ 5]) */ -+#define PT_SR6 408 /* offsetof(struct pt_regs, sr[ 6]) */ -+#define PT_SR7 412 /* offsetof(struct pt_regs, sr[ 7]) */ -+#define PT_IASQ0 416 /* offsetof(struct pt_regs, iasq[0]) */ -+#define PT_IASQ1 420 /* offsetof(struct pt_regs, iasq[1]) */ -+#define PT_IAOQ0 424 /* offsetof(struct pt_regs, iaoq[0]) */ -+#define PT_IAOQ1 428 /* offsetof(struct pt_regs, iaoq[1]) */ -+#define PT_CR27 432 /* offsetof(struct pt_regs, cr27) */ -+#define PT_ORIG_R28 440 /* offsetof(struct pt_regs, orig_r28) */ -+#define PT_KSP 444 /* offsetof(struct pt_regs, ksp) */ -+#define PT_KPC 448 /* offsetof(struct pt_regs, kpc) */ -+#define PT_SAR 452 /* offsetof(struct pt_regs, sar) */ -+#define PT_IIR 456 /* offsetof(struct pt_regs, iir) */ -+#define PT_ISR 460 /* offsetof(struct pt_regs, isr) */ -+#define PT_IOR 464 /* offsetof(struct pt_regs, ior) */ -+#define PT_SIZE 472 /* sizeof(struct pt_regs) */ -+#define PT_SZ_ALGN 576 /* align(sizeof(struct pt_regs), 64) */ -+ -+#define TI_TASK 0 /* offsetof(struct thread_info, task) */ -+#define TI_EXEC_DOMAIN 4 /* offsetof(struct thread_info, exec_domain) */ -+#define TI_FLAGS 8 /* offsetof(struct thread_info, flags) */ -+#define TI_CPU 16 /* offsetof(struct thread_info, cpu) */ -+#define TI_SEGMENT 12 /* offsetof(struct thread_info, addr_limit) */ -+#define TI_PRE_COUNT 20 /* offsetof(struct thread_info, preempt_count) */ -+#define THREAD_SZ 44 /* sizeof(struct thread_info) */ -+#define THREAD_SZ_ALGN 128 /* align(sizeof(struct thread_info), 64) */ -+ -+#define IRQSTAT_SIRQ_PEND 0 /* offsetof(irq_cpustat_t, __softirq_pending) */ -+#define IRQSTAT_SZ 64 /* sizeof(irq_cpustat_t) */ -+ -+#define ICACHE_BASE 8 /* offsetof(struct pdc_cache_info, ic_base) */ -+#define ICACHE_STRIDE 12 /* offsetof(struct pdc_cache_info, ic_stride) */ -+#define ICACHE_COUNT 16 /* offsetof(struct pdc_cache_info, ic_count) */ -+#define ICACHE_LOOP 20 /* offsetof(struct pdc_cache_info, ic_loop) */ -+#define DCACHE_BASE 32 /* offsetof(struct pdc_cache_info, dc_base) */ -+#define DCACHE_STRIDE 36 /* offsetof(struct pdc_cache_info, dc_stride) */ -+#define DCACHE_COUNT 40 /* offsetof(struct pdc_cache_info, dc_count) */ -+#define DCACHE_LOOP 44 /* offsetof(struct pdc_cache_info, dc_loop) */ -+#define ITLB_SID_BASE 56 /* offsetof(struct pdc_cache_info, it_sp_base) */ -+#define ITLB_SID_STRIDE 60 /* offsetof(struct pdc_cache_info, it_sp_stride) */ -+#define ITLB_SID_COUNT 64 /* offsetof(struct pdc_cache_info, it_sp_count) */ -+#define ITLB_OFF_BASE 68 /* offsetof(struct pdc_cache_info, it_off_base) */ -+#define ITLB_OFF_STRIDE 72 /* offsetof(struct pdc_cache_info, it_off_stride) */ -+#define ITLB_OFF_COUNT 76 /* offsetof(struct pdc_cache_info, it_off_count) */ -+#define ITLB_LOOP 80 /* offsetof(struct pdc_cache_info, it_loop) */ -+#define DTLB_SID_BASE 92 /* offsetof(struct pdc_cache_info, dt_sp_base) */ -+#define DTLB_SID_STRIDE 96 /* offsetof(struct pdc_cache_info, dt_sp_stride) */ -+#define DTLB_SID_COUNT 100 /* offsetof(struct pdc_cache_info, dt_sp_count) */ -+#define DTLB_OFF_BASE 104 /* offsetof(struct pdc_cache_info, dt_off_base) */ -+#define DTLB_OFF_STRIDE 108 /* offsetof(struct pdc_cache_info, dt_off_stride) */ -+#define DTLB_OFF_COUNT 112 /* offsetof(struct pdc_cache_info, dt_off_count) */ -+#define DTLB_LOOP 116 /* offsetof(struct pdc_cache_info, dt_loop) */ -+ -+#define PA_BLOCKSTEP_BIT 1 /* 31-PT_BLOCKSTEP_BIT */ -+#define PA_SINGLESTEP_BIT 0 /* 31-PT_SINGLESTEP_BIT */ -+ -+#define ASM_PMD_SHIFT 21 /* PMD_SHIFT */ -+#define ASM_PGDIR_SHIFT 21 /* PGDIR_SHIFT */ -+#define ASM_BITS_PER_PGD 11 /* BITS_PER_PGD */ -+#define ASM_BITS_PER_PMD 0 /* BITS_PER_PMD */ -+#define ASM_BITS_PER_PTE 9 /* BITS_PER_PTE */ -+#define ASM_PGD_PMD_OFFSET -8192 /* -(PAGE_SIZE << PGD_ORDER) */ -+#define ASM_PMD_ENTRY 128 /* ((PAGE_OFFSET & PMD_MASK) >> PMD_SHIFT) */ -+#define ASM_PGD_ENTRY 128 /* PAGE_OFFSET >> PGDIR_SHIFT */ -+#define ASM_PGD_ENTRY_SIZE 4 /* PGD_ENTRY_SIZE */ -+#define ASM_PMD_ENTRY_SIZE 4 /* PMD_ENTRY_SIZE */ -+#define ASM_PTE_ENTRY_SIZE 8 /* PTE_ENTRY_SIZE */ -+#define ASM_PT_INITIAL 4 /* PT_INITIAL */ -+#define ASM_PAGE_SIZE 4096 /* PAGE_SIZE */ -+ -+ -+#endif diff --git a/patches/gdb/6.7.1/120-deleted-children.patch b/patches/gdb/6.7.1/120-deleted-children.patch deleted file mode 100644 index 08bbba9..0000000 --- a/patches/gdb/6.7.1/120-deleted-children.patch +++ /dev/null @@ -1,26 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/50_all_gdb-deleted-children.patch --= BEGIN original header =- -http://bugs.gentoo.org/210636 -http://sourceware.org/ml/gdb-patches/2007-11/msg00136.html - -2007-11-07 Vladimir Prus - - Fix crash when a variable object being deleted - has any of its children deleted previously. - - * varobj.c (delete_variable_1): Don't recurse - into deleted children. - --= END original header =- -diff -durN gdb-6.7.1.orig/gdb/varobj.c gdb-6.7.1/gdb/varobj.c ---- gdb-6.7.1.orig/gdb/varobj.c 2007-08-31 21:01:17.000000000 +0200 -+++ gdb-6.7.1/gdb/varobj.c 2008-06-17 23:27:45.000000000 +0200 -@@ -1295,6 +1295,8 @@ - for (i = 0; i < VEC_length (varobj_p, var->children); ++i) - { - varobj_p child = VEC_index (varobj_p, var->children, i); -+ if (!child) -+ continue; - if (!remove_from_parent_p) - child->parent = NULL; - delete_variable_1 (resultp, delcountp, child, 0, only_children_p); diff --git a/patches/gdb/6.7.1/130-dwarf-stack-overflow.patch b/patches/gdb/6.7.1/130-dwarf-stack-overflow.patch deleted file mode 100644 index 764ec65..0000000 --- a/patches/gdb/6.7.1/130-dwarf-stack-overflow.patch +++ /dev/null @@ -1,52 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/80_all_gdb-6.5-dwarf-stack-overflow.patch --= BEGIN original header =- -http://bugs.gentoo.org/144833 - -for gdb/ChangeLog: -2006-08-22 Will Drewry - Tavis Ormandy - - * dwarf2read.c (decode_locdesc): Enforce location description stack - boundaries. - * dwarfread.c (locval): Likewise. - --= END original header =- -diff -durN gdb-6.7.1.orig/gdb/dwarf2read.c gdb-6.7.1/gdb/dwarf2read.c ---- gdb-6.7.1.orig/gdb/dwarf2read.c 2007-09-05 02:51:48.000000000 +0200 -+++ gdb-6.7.1/gdb/dwarf2read.c 2008-06-17 23:27:46.000000000 +0200 -@@ -9061,8 +9061,7 @@ - callers will only want a very basic result and this can become a - complaint. - -- Note that stack[0] is unused except as a default error return. -- Note that stack overflow is not yet handled. */ -+ Note that stack[0] is unused except as a default error return. */ - - static CORE_ADDR - decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) -@@ -9079,7 +9078,7 @@ - - i = 0; - stacki = 0; -- stack[stacki] = 0; -+ stack[++stacki] = 0; - - while (i < size) - { -@@ -9261,6 +9260,16 @@ - dwarf_stack_op_name (op)); - return (stack[stacki]); - } -+ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing -+ outside of the allocated space. Also enforce minimum > 0. -+ -- wad@google.com 14 Aug 2006 */ -+ if (stacki >= sizeof (stack) / sizeof (*stack) - 1) -+ internal_error (__FILE__, __LINE__, -+ _("location description stack too deep: %d"), -+ stacki); -+ if (stacki <= 0) -+ internal_error (__FILE__, __LINE__, -+ _("location description stack too shallow")); - } - return (stack[stacki]); - } diff --git a/patches/gdb/6.7/100-security-errata-20050610.patch b/patches/gdb/6.7/100-security-errata-20050610.patch deleted file mode 100644 index a0307ad..0000000 --- a/patches/gdb/6.7/100-security-errata-20050610.patch +++ /dev/null @@ -1,205 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.7/35_all_gdb-6.3-security-errata-20050610.patch --= BEGIN original header =- -2005-06-09 Jeff Johnston - - * gdb.base/gdbinit.exp: New testcase. - * gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp. - -2005-06-08 Daniel Jacobowitz - Jeff Johnston - - * Makefile.in (cli-cmds.o): Update. - * configure.in: Add check for getuid. - * configure: Regenerated. - * config.in: Ditto. - * main.c (captured_main): Pass -1 to source_command when loading - gdbinit files. - * cli/cli-cmds.c: Include "gdb_stat.h" and . - (source_command): Update documentation. Check permissions if - FROM_TTY is -1. - --= END original header =- -diff -durN gdb-6.7.orig/gdb/cli/cli-cmds.c gdb-6.7/gdb/cli/cli-cmds.c ---- gdb-6.7.orig/gdb/cli/cli-cmds.c 2007-08-23 20:08:47.000000000 +0200 -+++ gdb-6.7/gdb/cli/cli-cmds.c 2008-06-17 23:25:23.000000000 +0200 -@@ -36,6 +36,7 @@ - #include "objfiles.h" - #include "source.h" - #include "disasm.h" -+#include "gdb_stat.h" - - #include "ui-out.h" - -@@ -459,12 +460,31 @@ - - if (fd == -1) - { -- if (from_tty) -+ if (from_tty > 0) - perror_with_name (file); - else - return; - } - -+#ifdef HAVE_GETUID -+ if (from_tty == -1) -+ { -+ struct stat statbuf; -+ if (fstat (fd, &statbuf) < 0) -+ { -+ perror_with_name (file); -+ close (fd); -+ return; -+ } -+ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH)) -+ { -+ warning (_("not using untrusted file \"%s\""), file); -+ close (fd); -+ return; -+ } -+ } -+#endif -+ - stream = fdopen (fd, FOPEN_RT); - script_from_file (stream, file); - -diff -durN gdb-6.7.orig/gdb/main.c gdb-6.7/gdb/main.c ---- gdb-6.7.orig/gdb/main.c 2007-08-23 20:08:36.000000000 +0200 -+++ gdb-6.7/gdb/main.c 2008-06-17 23:25:23.000000000 +0200 -@@ -688,7 +688,7 @@ - - if (!inhibit_gdbinit) - { -- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL); -+ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL); - } - - /* Do stats; no need to do them elsewhere since we'll only -@@ -766,7 +766,7 @@ - || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) - if (!inhibit_gdbinit) - { -- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL); -+ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL); - } - - for (i = 0; i < ncmd; i++) -diff -durN gdb-6.7.orig/gdb/Makefile.in gdb-6.7/gdb/Makefile.in ---- gdb-6.7.orig/gdb/Makefile.in 2007-09-05 02:14:02.000000000 +0200 -+++ gdb-6.7/gdb/Makefile.in 2008-06-17 23:25:23.000000000 +0200 -@@ -2882,7 +2882,7 @@ - $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ - $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ - $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ -- $(tui_h) -+ $(tui_h) $(gdb_stat_h) - $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c - cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ - $(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \ -diff -durN gdb-6.7.orig/gdb/testsuite/gdb.base/gdbinit.exp gdb-6.7/gdb/testsuite/gdb.base/gdbinit.exp ---- gdb-6.7.orig/gdb/testsuite/gdb.base/gdbinit.exp 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.7/gdb/testsuite/gdb.base/gdbinit.exp 2008-06-17 23:25:23.000000000 +0200 -@@ -0,0 +1,98 @@ -+# Copyright 2005 -+# 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 -+ -+# This file was written by Jeff Johnston . -+ -+if $tracelevel then { -+ strace $tracelevel -+} -+ -+set prms_id 0 -+set bug_id 0 -+ -+# are we on a target board -+if [is_remote target] { -+ return -+} -+ -+ -+global verbose -+global GDB -+global GDBFLAGS -+global gdb_prompt -+global timeout -+global gdb_spawn_id; -+ -+gdb_stop_suppressing_tests; -+ -+verbose "Spawning $GDB -nw" -+ -+if [info exists gdb_spawn_id] { -+ return 0; -+} -+ -+if ![is_remote host] { -+ if { [which $GDB] == 0 } then { -+ perror "$GDB does not exist." -+ exit 1 -+ } -+} -+ -+set env(HOME) [pwd] -+remote_exec build "rm .gdbinit" -+remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit" -+remote_exec build "chmod 646 .gdbinit" -+ -+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; -+if { $res < 0 || $res == "" } { -+ perror "Spawning $GDB failed." -+ return 1; -+} -+gdb_expect 360 { -+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { -+ pass "untrusted .gdbinit caught." -+ } -+ -re "$gdb_prompt $" { -+ fail "untrusted .gdbinit caught." -+ } -+ timeout { -+ fail "(timeout) untrusted .gdbinit caught." -+ } -+} -+ -+remote_exec build "chmod 644 .gdbinit" -+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; -+if { $res < 0 || $res == "" } { -+ perror "Spawning $GDB failed." -+ return 1; -+} -+gdb_expect 360 { -+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { -+ fail "trusted .gdbinit allowed." -+ } -+ -re "in gdbinit.*$gdb_prompt $" { -+ pass "trusted .gdbinit allowed." -+ } -+ timeout { -+ fail "(timeout) trusted .gdbinit allowed." -+ } -+} -+ -+remote_exec build "rm .gdbinit" -diff -durN gdb-6.7.orig/gdb/testsuite/gdb.base/gdbinit.sample gdb-6.7/gdb/testsuite/gdb.base/gdbinit.sample ---- gdb-6.7.orig/gdb/testsuite/gdb.base/gdbinit.sample 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.7/gdb/testsuite/gdb.base/gdbinit.sample 2008-06-17 23:25:23.000000000 +0200 -@@ -0,0 +1 @@ -+echo "\nin gdbinit" diff --git a/patches/gdb/6.7/110-hppa-offsets.patch b/patches/gdb/6.7/110-hppa-offsets.patch deleted file mode 100644 index 9de831b..0000000 --- a/patches/gdb/6.7/110-hppa-offsets.patch +++ /dev/null @@ -1,272 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.7/45_all_gdb-hppa-offsets.patch --= BEGIN original header =- -sanitized headers dont include asm/offsets.h, so cache a local copy - -http://bugs.gentoo.org/180476 -http://lists.parisc-linux.org/pipermail/parisc-linux/2007-February/031162.html - --= END original header =- -diff -durN gdb-6.7.orig/gdb/hppa-linux-nat.c gdb-6.7/gdb/hppa-linux-nat.c ---- gdb-6.7.orig/gdb/hppa-linux-nat.c 2007-08-23 20:08:33.000000000 +0200 -+++ gdb-6.7/gdb/hppa-linux-nat.c 2008-06-17 23:25:28.000000000 +0200 -@@ -32,7 +32,7 @@ - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,43) - #include - #else --#include -+#include - #endif - - #include "hppa-tdep.h" -diff -durN gdb-6.7.orig/gdb/hppa-offsets.h gdb-6.7/gdb/hppa-offsets.h ---- gdb-6.7.orig/gdb/hppa-offsets.h 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.7/gdb/hppa-offsets.h 2008-06-17 23:25:28.000000000 +0200 -@@ -0,0 +1,248 @@ -+#ifndef __ASM_OFFSETS_H__ -+#define __ASM_OFFSETS_H__ -+/* -+ * DO NOT MODIFY. -+ * -+ * This file was generated by arch/parisc/Makefile -+ * -+ */ -+ -+#define TASK_THREAD_INFO 4 /* offsetof(struct task_struct, thread_info) */ -+#define TASK_STATE 0 /* offsetof(struct task_struct, state) */ -+#define TASK_FLAGS 12 /* offsetof(struct task_struct, flags) */ -+#define TASK_SIGPENDING 1188 /* offsetof(struct task_struct, pending) */ -+#define TASK_PTRACE 16 /* offsetof(struct task_struct, ptrace) */ -+#define TASK_MM 108 /* offsetof(struct task_struct, mm) */ -+#define TASK_PERSONALITY 132 /* offsetof(struct task_struct, personality) */ -+#define TASK_PID 140 /* offsetof(struct task_struct, pid) */ -+ -+#define TASK_REGS 664 /* offsetof(struct task_struct, thread.regs) */ -+#define TASK_PT_PSW 664 /* offsetof(struct task_struct, thread.regs.gr[ 0]) */ -+#define TASK_PT_GR1 668 /* offsetof(struct task_struct, thread.regs.gr[ 1]) */ -+#define TASK_PT_GR2 672 /* offsetof(struct task_struct, thread.regs.gr[ 2]) */ -+#define TASK_PT_GR3 676 /* offsetof(struct task_struct, thread.regs.gr[ 3]) */ -+#define TASK_PT_GR4 680 /* offsetof(struct task_struct, thread.regs.gr[ 4]) */ -+#define TASK_PT_GR5 684 /* offsetof(struct task_struct, thread.regs.gr[ 5]) */ -+#define TASK_PT_GR6 688 /* offsetof(struct task_struct, thread.regs.gr[ 6]) */ -+#define TASK_PT_GR7 692 /* offsetof(struct task_struct, thread.regs.gr[ 7]) */ -+#define TASK_PT_GR8 696 /* offsetof(struct task_struct, thread.regs.gr[ 8]) */ -+#define TASK_PT_GR9 700 /* offsetof(struct task_struct, thread.regs.gr[ 9]) */ -+#define TASK_PT_GR10 704 /* offsetof(struct task_struct, thread.regs.gr[10]) */ -+#define TASK_PT_GR11 708 /* offsetof(struct task_struct, thread.regs.gr[11]) */ -+#define TASK_PT_GR12 712 /* offsetof(struct task_struct, thread.regs.gr[12]) */ -+#define TASK_PT_GR13 716 /* offsetof(struct task_struct, thread.regs.gr[13]) */ -+#define TASK_PT_GR14 720 /* offsetof(struct task_struct, thread.regs.gr[14]) */ -+#define TASK_PT_GR15 724 /* offsetof(struct task_struct, thread.regs.gr[15]) */ -+#define TASK_PT_GR16 728 /* offsetof(struct task_struct, thread.regs.gr[16]) */ -+#define TASK_PT_GR17 732 /* offsetof(struct task_struct, thread.regs.gr[17]) */ -+#define TASK_PT_GR18 736 /* offsetof(struct task_struct, thread.regs.gr[18]) */ -+#define TASK_PT_GR19 740 /* offsetof(struct task_struct, thread.regs.gr[19]) */ -+#define TASK_PT_GR20 744 /* offsetof(struct task_struct, thread.regs.gr[20]) */ -+#define TASK_PT_GR21 748 /* offsetof(struct task_struct, thread.regs.gr[21]) */ -+#define TASK_PT_GR22 752 /* offsetof(struct task_struct, thread.regs.gr[22]) */ -+#define TASK_PT_GR23 756 /* offsetof(struct task_struct, thread.regs.gr[23]) */ -+#define TASK_PT_GR24 760 /* offsetof(struct task_struct, thread.regs.gr[24]) */ -+#define TASK_PT_GR25 764 /* offsetof(struct task_struct, thread.regs.gr[25]) */ -+#define TASK_PT_GR26 768 /* offsetof(struct task_struct, thread.regs.gr[26]) */ -+#define TASK_PT_GR27 772 /* offsetof(struct task_struct, thread.regs.gr[27]) */ -+#define TASK_PT_GR28 776 /* offsetof(struct task_struct, thread.regs.gr[28]) */ -+#define TASK_PT_GR29 780 /* offsetof(struct task_struct, thread.regs.gr[29]) */ -+#define TASK_PT_GR30 784 /* offsetof(struct task_struct, thread.regs.gr[30]) */ -+#define TASK_PT_GR31 788 /* offsetof(struct task_struct, thread.regs.gr[31]) */ -+#define TASK_PT_FR0 792 /* offsetof(struct task_struct, thread.regs.fr[ 0]) */ -+#define TASK_PT_FR1 800 /* offsetof(struct task_struct, thread.regs.fr[ 1]) */ -+#define TASK_PT_FR2 808 /* offsetof(struct task_struct, thread.regs.fr[ 2]) */ -+#define TASK_PT_FR3 816 /* offsetof(struct task_struct, thread.regs.fr[ 3]) */ -+#define TASK_PT_FR4 824 /* offsetof(struct task_struct, thread.regs.fr[ 4]) */ -+#define TASK_PT_FR5 832 /* offsetof(struct task_struct, thread.regs.fr[ 5]) */ -+#define TASK_PT_FR6 840 /* offsetof(struct task_struct, thread.regs.fr[ 6]) */ -+#define TASK_PT_FR7 848 /* offsetof(struct task_struct, thread.regs.fr[ 7]) */ -+#define TASK_PT_FR8 856 /* offsetof(struct task_struct, thread.regs.fr[ 8]) */ -+#define TASK_PT_FR9 864 /* offsetof(struct task_struct, thread.regs.fr[ 9]) */ -+#define TASK_PT_FR10 872 /* offsetof(struct task_struct, thread.regs.fr[10]) */ -+#define TASK_PT_FR11 880 /* offsetof(struct task_struct, thread.regs.fr[11]) */ -+#define TASK_PT_FR12 888 /* offsetof(struct task_struct, thread.regs.fr[12]) */ -+#define TASK_PT_FR13 896 /* offsetof(struct task_struct, thread.regs.fr[13]) */ -+#define TASK_PT_FR14 904 /* offsetof(struct task_struct, thread.regs.fr[14]) */ -+#define TASK_PT_FR15 912 /* offsetof(struct task_struct, thread.regs.fr[15]) */ -+#define TASK_PT_FR16 920 /* offsetof(struct task_struct, thread.regs.fr[16]) */ -+#define TASK_PT_FR17 928 /* offsetof(struct task_struct, thread.regs.fr[17]) */ -+#define TASK_PT_FR18 936 /* offsetof(struct task_struct, thread.regs.fr[18]) */ -+#define TASK_PT_FR19 944 /* offsetof(struct task_struct, thread.regs.fr[19]) */ -+#define TASK_PT_FR20 952 /* offsetof(struct task_struct, thread.regs.fr[20]) */ -+#define TASK_PT_FR21 960 /* offsetof(struct task_struct, thread.regs.fr[21]) */ -+#define TASK_PT_FR22 968 /* offsetof(struct task_struct, thread.regs.fr[22]) */ -+#define TASK_PT_FR23 976 /* offsetof(struct task_struct, thread.regs.fr[23]) */ -+#define TASK_PT_FR24 984 /* offsetof(struct task_struct, thread.regs.fr[24]) */ -+#define TASK_PT_FR25 992 /* offsetof(struct task_struct, thread.regs.fr[25]) */ -+#define TASK_PT_FR26 1000 /* offsetof(struct task_struct, thread.regs.fr[26]) */ -+#define TASK_PT_FR27 1008 /* offsetof(struct task_struct, thread.regs.fr[27]) */ -+#define TASK_PT_FR28 1016 /* offsetof(struct task_struct, thread.regs.fr[28]) */ -+#define TASK_PT_FR29 1024 /* offsetof(struct task_struct, thread.regs.fr[29]) */ -+#define TASK_PT_FR30 1032 /* offsetof(struct task_struct, thread.regs.fr[30]) */ -+#define TASK_PT_FR31 1040 /* offsetof(struct task_struct, thread.regs.fr[31]) */ -+#define TASK_PT_SR0 1048 /* offsetof(struct task_struct, thread.regs.sr[ 0]) */ -+#define TASK_PT_SR1 1052 /* offsetof(struct task_struct, thread.regs.sr[ 1]) */ -+#define TASK_PT_SR2 1056 /* offsetof(struct task_struct, thread.regs.sr[ 2]) */ -+#define TASK_PT_SR3 1060 /* offsetof(struct task_struct, thread.regs.sr[ 3]) */ -+#define TASK_PT_SR4 1064 /* offsetof(struct task_struct, thread.regs.sr[ 4]) */ -+#define TASK_PT_SR5 1068 /* offsetof(struct task_struct, thread.regs.sr[ 5]) */ -+#define TASK_PT_SR6 1072 /* offsetof(struct task_struct, thread.regs.sr[ 6]) */ -+#define TASK_PT_SR7 1076 /* offsetof(struct task_struct, thread.regs.sr[ 7]) */ -+#define TASK_PT_IASQ0 1080 /* offsetof(struct task_struct, thread.regs.iasq[0]) */ -+#define TASK_PT_IASQ1 1084 /* offsetof(struct task_struct, thread.regs.iasq[1]) */ -+#define TASK_PT_IAOQ0 1088 /* offsetof(struct task_struct, thread.regs.iaoq[0]) */ -+#define TASK_PT_IAOQ1 1092 /* offsetof(struct task_struct, thread.regs.iaoq[1]) */ -+#define TASK_PT_CR27 1096 /* offsetof(struct task_struct, thread.regs.cr27) */ -+#define TASK_PT_ORIG_R28 1104 /* offsetof(struct task_struct, thread.regs.orig_r28) */ -+#define TASK_PT_KSP 1108 /* offsetof(struct task_struct, thread.regs.ksp) */ -+#define TASK_PT_KPC 1112 /* offsetof(struct task_struct, thread.regs.kpc) */ -+#define TASK_PT_SAR 1116 /* offsetof(struct task_struct, thread.regs.sar) */ -+#define TASK_PT_IIR 1120 /* offsetof(struct task_struct, thread.regs.iir) */ -+#define TASK_PT_ISR 1124 /* offsetof(struct task_struct, thread.regs.isr) */ -+#define TASK_PT_IOR 1128 /* offsetof(struct task_struct, thread.regs.ior) */ -+ -+#define TASK_SZ 1272 /* sizeof(struct task_struct) */ -+#define TASK_SZ_ALGN 1344 /* align(sizeof(struct task_struct), 64) */ -+ -+#define PT_PSW 0 /* offsetof(struct pt_regs, gr[ 0]) */ -+#define PT_GR1 4 /* offsetof(struct pt_regs, gr[ 1]) */ -+#define PT_GR2 8 /* offsetof(struct pt_regs, gr[ 2]) */ -+#define PT_GR3 12 /* offsetof(struct pt_regs, gr[ 3]) */ -+#define PT_GR4 16 /* offsetof(struct pt_regs, gr[ 4]) */ -+#define PT_GR5 20 /* offsetof(struct pt_regs, gr[ 5]) */ -+#define PT_GR6 24 /* offsetof(struct pt_regs, gr[ 6]) */ -+#define PT_GR7 28 /* offsetof(struct pt_regs, gr[ 7]) */ -+#define PT_GR8 32 /* offsetof(struct pt_regs, gr[ 8]) */ -+#define PT_GR9 36 /* offsetof(struct pt_regs, gr[ 9]) */ -+#define PT_GR10 40 /* offsetof(struct pt_regs, gr[10]) */ -+#define PT_GR11 44 /* offsetof(struct pt_regs, gr[11]) */ -+#define PT_GR12 48 /* offsetof(struct pt_regs, gr[12]) */ -+#define PT_GR13 52 /* offsetof(struct pt_regs, gr[13]) */ -+#define PT_GR14 56 /* offsetof(struct pt_regs, gr[14]) */ -+#define PT_GR15 60 /* offsetof(struct pt_regs, gr[15]) */ -+#define PT_GR16 64 /* offsetof(struct pt_regs, gr[16]) */ -+#define PT_GR17 68 /* offsetof(struct pt_regs, gr[17]) */ -+#define PT_GR18 72 /* offsetof(struct pt_regs, gr[18]) */ -+#define PT_GR19 76 /* offsetof(struct pt_regs, gr[19]) */ -+#define PT_GR20 80 /* offsetof(struct pt_regs, gr[20]) */ -+#define PT_GR21 84 /* offsetof(struct pt_regs, gr[21]) */ -+#define PT_GR22 88 /* offsetof(struct pt_regs, gr[22]) */ -+#define PT_GR23 92 /* offsetof(struct pt_regs, gr[23]) */ -+#define PT_GR24 96 /* offsetof(struct pt_regs, gr[24]) */ -+#define PT_GR25 100 /* offsetof(struct pt_regs, gr[25]) */ -+#define PT_GR26 104 /* offsetof(struct pt_regs, gr[26]) */ -+#define PT_GR27 108 /* offsetof(struct pt_regs, gr[27]) */ -+#define PT_GR28 112 /* offsetof(struct pt_regs, gr[28]) */ -+#define PT_GR29 116 /* offsetof(struct pt_regs, gr[29]) */ -+#define PT_GR30 120 /* offsetof(struct pt_regs, gr[30]) */ -+#define PT_GR31 124 /* offsetof(struct pt_regs, gr[31]) */ -+#define PT_FR0 128 /* offsetof(struct pt_regs, fr[ 0]) */ -+#define PT_FR1 136 /* offsetof(struct pt_regs, fr[ 1]) */ -+#define PT_FR2 144 /* offsetof(struct pt_regs, fr[ 2]) */ -+#define PT_FR3 152 /* offsetof(struct pt_regs, fr[ 3]) */ -+#define PT_FR4 160 /* offsetof(struct pt_regs, fr[ 4]) */ -+#define PT_FR5 168 /* offsetof(struct pt_regs, fr[ 5]) */ -+#define PT_FR6 176 /* offsetof(struct pt_regs, fr[ 6]) */ -+#define PT_FR7 184 /* offsetof(struct pt_regs, fr[ 7]) */ -+#define PT_FR8 192 /* offsetof(struct pt_regs, fr[ 8]) */ -+#define PT_FR9 200 /* offsetof(struct pt_regs, fr[ 9]) */ -+#define PT_FR10 208 /* offsetof(struct pt_regs, fr[10]) */ -+#define PT_FR11 216 /* offsetof(struct pt_regs, fr[11]) */ -+#define PT_FR12 224 /* offsetof(struct pt_regs, fr[12]) */ -+#define PT_FR13 232 /* offsetof(struct pt_regs, fr[13]) */ -+#define PT_FR14 240 /* offsetof(struct pt_regs, fr[14]) */ -+#define PT_FR15 248 /* offsetof(struct pt_regs, fr[15]) */ -+#define PT_FR16 256 /* offsetof(struct pt_regs, fr[16]) */ -+#define PT_FR17 264 /* offsetof(struct pt_regs, fr[17]) */ -+#define PT_FR18 272 /* offsetof(struct pt_regs, fr[18]) */ -+#define PT_FR19 280 /* offsetof(struct pt_regs, fr[19]) */ -+#define PT_FR20 288 /* offsetof(struct pt_regs, fr[20]) */ -+#define PT_FR21 296 /* offsetof(struct pt_regs, fr[21]) */ -+#define PT_FR22 304 /* offsetof(struct pt_regs, fr[22]) */ -+#define PT_FR23 312 /* offsetof(struct pt_regs, fr[23]) */ -+#define PT_FR24 320 /* offsetof(struct pt_regs, fr[24]) */ -+#define PT_FR25 328 /* offsetof(struct pt_regs, fr[25]) */ -+#define PT_FR26 336 /* offsetof(struct pt_regs, fr[26]) */ -+#define PT_FR27 344 /* offsetof(struct pt_regs, fr[27]) */ -+#define PT_FR28 352 /* offsetof(struct pt_regs, fr[28]) */ -+#define PT_FR29 360 /* offsetof(struct pt_regs, fr[29]) */ -+#define PT_FR30 368 /* offsetof(struct pt_regs, fr[30]) */ -+#define PT_FR31 376 /* offsetof(struct pt_regs, fr[31]) */ -+#define PT_SR0 384 /* offsetof(struct pt_regs, sr[ 0]) */ -+#define PT_SR1 388 /* offsetof(struct pt_regs, sr[ 1]) */ -+#define PT_SR2 392 /* offsetof(struct pt_regs, sr[ 2]) */ -+#define PT_SR3 396 /* offsetof(struct pt_regs, sr[ 3]) */ -+#define PT_SR4 400 /* offsetof(struct pt_regs, sr[ 4]) */ -+#define PT_SR5 404 /* offsetof(struct pt_regs, sr[ 5]) */ -+#define PT_SR6 408 /* offsetof(struct pt_regs, sr[ 6]) */ -+#define PT_SR7 412 /* offsetof(struct pt_regs, sr[ 7]) */ -+#define PT_IASQ0 416 /* offsetof(struct pt_regs, iasq[0]) */ -+#define PT_IASQ1 420 /* offsetof(struct pt_regs, iasq[1]) */ -+#define PT_IAOQ0 424 /* offsetof(struct pt_regs, iaoq[0]) */ -+#define PT_IAOQ1 428 /* offsetof(struct pt_regs, iaoq[1]) */ -+#define PT_CR27 432 /* offsetof(struct pt_regs, cr27) */ -+#define PT_ORIG_R28 440 /* offsetof(struct pt_regs, orig_r28) */ -+#define PT_KSP 444 /* offsetof(struct pt_regs, ksp) */ -+#define PT_KPC 448 /* offsetof(struct pt_regs, kpc) */ -+#define PT_SAR 452 /* offsetof(struct pt_regs, sar) */ -+#define PT_IIR 456 /* offsetof(struct pt_regs, iir) */ -+#define PT_ISR 460 /* offsetof(struct pt_regs, isr) */ -+#define PT_IOR 464 /* offsetof(struct pt_regs, ior) */ -+#define PT_SIZE 472 /* sizeof(struct pt_regs) */ -+#define PT_SZ_ALGN 576 /* align(sizeof(struct pt_regs), 64) */ -+ -+#define TI_TASK 0 /* offsetof(struct thread_info, task) */ -+#define TI_EXEC_DOMAIN 4 /* offsetof(struct thread_info, exec_domain) */ -+#define TI_FLAGS 8 /* offsetof(struct thread_info, flags) */ -+#define TI_CPU 16 /* offsetof(struct thread_info, cpu) */ -+#define TI_SEGMENT 12 /* offsetof(struct thread_info, addr_limit) */ -+#define TI_PRE_COUNT 20 /* offsetof(struct thread_info, preempt_count) */ -+#define THREAD_SZ 44 /* sizeof(struct thread_info) */ -+#define THREAD_SZ_ALGN 128 /* align(sizeof(struct thread_info), 64) */ -+ -+#define IRQSTAT_SIRQ_PEND 0 /* offsetof(irq_cpustat_t, __softirq_pending) */ -+#define IRQSTAT_SZ 64 /* sizeof(irq_cpustat_t) */ -+ -+#define ICACHE_BASE 8 /* offsetof(struct pdc_cache_info, ic_base) */ -+#define ICACHE_STRIDE 12 /* offsetof(struct pdc_cache_info, ic_stride) */ -+#define ICACHE_COUNT 16 /* offsetof(struct pdc_cache_info, ic_count) */ -+#define ICACHE_LOOP 20 /* offsetof(struct pdc_cache_info, ic_loop) */ -+#define DCACHE_BASE 32 /* offsetof(struct pdc_cache_info, dc_base) */ -+#define DCACHE_STRIDE 36 /* offsetof(struct pdc_cache_info, dc_stride) */ -+#define DCACHE_COUNT 40 /* offsetof(struct pdc_cache_info, dc_count) */ -+#define DCACHE_LOOP 44 /* offsetof(struct pdc_cache_info, dc_loop) */ -+#define ITLB_SID_BASE 56 /* offsetof(struct pdc_cache_info, it_sp_base) */ -+#define ITLB_SID_STRIDE 60 /* offsetof(struct pdc_cache_info, it_sp_stride) */ -+#define ITLB_SID_COUNT 64 /* offsetof(struct pdc_cache_info, it_sp_count) */ -+#define ITLB_OFF_BASE 68 /* offsetof(struct pdc_cache_info, it_off_base) */ -+#define ITLB_OFF_STRIDE 72 /* offsetof(struct pdc_cache_info, it_off_stride) */ -+#define ITLB_OFF_COUNT 76 /* offsetof(struct pdc_cache_info, it_off_count) */ -+#define ITLB_LOOP 80 /* offsetof(struct pdc_cache_info, it_loop) */ -+#define DTLB_SID_BASE 92 /* offsetof(struct pdc_cache_info, dt_sp_base) */ -+#define DTLB_SID_STRIDE 96 /* offsetof(struct pdc_cache_info, dt_sp_stride) */ -+#define DTLB_SID_COUNT 100 /* offsetof(struct pdc_cache_info, dt_sp_count) */ -+#define DTLB_OFF_BASE 104 /* offsetof(struct pdc_cache_info, dt_off_base) */ -+#define DTLB_OFF_STRIDE 108 /* offsetof(struct pdc_cache_info, dt_off_stride) */ -+#define DTLB_OFF_COUNT 112 /* offsetof(struct pdc_cache_info, dt_off_count) */ -+#define DTLB_LOOP 116 /* offsetof(struct pdc_cache_info, dt_loop) */ -+ -+#define PA_BLOCKSTEP_BIT 1 /* 31-PT_BLOCKSTEP_BIT */ -+#define PA_SINGLESTEP_BIT 0 /* 31-PT_SINGLESTEP_BIT */ -+ -+#define ASM_PMD_SHIFT 21 /* PMD_SHIFT */ -+#define ASM_PGDIR_SHIFT 21 /* PGDIR_SHIFT */ -+#define ASM_BITS_PER_PGD 11 /* BITS_PER_PGD */ -+#define ASM_BITS_PER_PMD 0 /* BITS_PER_PMD */ -+#define ASM_BITS_PER_PTE 9 /* BITS_PER_PTE */ -+#define ASM_PGD_PMD_OFFSET -8192 /* -(PAGE_SIZE << PGD_ORDER) */ -+#define ASM_PMD_ENTRY 128 /* ((PAGE_OFFSET & PMD_MASK) >> PMD_SHIFT) */ -+#define ASM_PGD_ENTRY 128 /* PAGE_OFFSET >> PGDIR_SHIFT */ -+#define ASM_PGD_ENTRY_SIZE 4 /* PGD_ENTRY_SIZE */ -+#define ASM_PMD_ENTRY_SIZE 4 /* PMD_ENTRY_SIZE */ -+#define ASM_PTE_ENTRY_SIZE 8 /* PTE_ENTRY_SIZE */ -+#define ASM_PT_INITIAL 4 /* PT_INITIAL */ -+#define ASM_PAGE_SIZE 4096 /* PAGE_SIZE */ -+ -+ -+#endif diff --git a/patches/gdb/6.7/120-dwarf-stack-overflow.patch b/patches/gdb/6.7/120-dwarf-stack-overflow.patch deleted file mode 100644 index 171e64e..0000000 --- a/patches/gdb/6.7/120-dwarf-stack-overflow.patch +++ /dev/null @@ -1,52 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.7/80_all_gdb-6.5-dwarf-stack-overflow.patch --= BEGIN original header =- -http://bugs.gentoo.org/144833 - -for gdb/ChangeLog: -2006-08-22 Will Drewry - Tavis Ormandy - - * dwarf2read.c (decode_locdesc): Enforce location description stack - boundaries. - * dwarfread.c (locval): Likewise. - --= END original header =- -diff -durN gdb-6.7.orig/gdb/dwarf2read.c gdb-6.7/gdb/dwarf2read.c ---- gdb-6.7.orig/gdb/dwarf2read.c 2007-09-05 02:51:48.000000000 +0200 -+++ gdb-6.7/gdb/dwarf2read.c 2008-06-17 23:25:38.000000000 +0200 -@@ -9061,8 +9061,7 @@ - callers will only want a very basic result and this can become a - complaint. - -- Note that stack[0] is unused except as a default error return. -- Note that stack overflow is not yet handled. */ -+ Note that stack[0] is unused except as a default error return. */ - - static CORE_ADDR - decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) -@@ -9079,7 +9078,7 @@ - - i = 0; - stacki = 0; -- stack[stacki] = 0; -+ stack[++stacki] = 0; - - while (i < size) - { -@@ -9261,6 +9260,16 @@ - dwarf_stack_op_name (op)); - return (stack[stacki]); - } -+ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing -+ outside of the allocated space. Also enforce minimum > 0. -+ -- wad@google.com 14 Aug 2006 */ -+ if (stacki >= sizeof (stack) / sizeof (*stack) - 1) -+ internal_error (__FILE__, __LINE__, -+ _("location description stack too deep: %d"), -+ stacki); -+ if (stacki <= 0) -+ internal_error (__FILE__, __LINE__, -+ _("location description stack too shallow")); - } - return (stack[stacki]); - } -- cgit v0.10.2-6-g49f6