Add patches for gdb 6.7, 6.7.1 and 6.8, vampirised from the Gentoo CVS.
/trunk/patches/gdb/6.7.1/175-gdb-hppa-offsets.patch | 272 272 0 0 +++++++++++++++++++
/trunk/patches/gdb/6.7.1/200-gdb-deleted-children.patch | 26 26 0 0 ++
/trunk/patches/gdb/6.7.1/225-gdb-6.5-dwarf-stack-overflow.patch | 52 52 0 0 ++++
/trunk/patches/gdb/6.7.1/150-gdb-6.3-security-errata-20050610.patch | 205 205 0 0 ++++++++++++++
/trunk/patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch | 52 52 0 0 ++++
/trunk/patches/gdb/6.7/100-gdb-6.3-security-errata-20050610.patch | 205 205 0 0 ++++++++++++++
/trunk/patches/gdb/6.7/125-gdb-hppa-offsets.patch | 272 272 0 0 +++++++++++++++++++
/trunk/patches/gdb/6.8/100-gdb-6.5-dwarf-stack-overflow.patch | 52 52 0 0 ++++
/trunk/patches/gdb/6.8/200-gdb-tdep-opcode-include-workaround.patch | 33 33 0 0 ++
/trunk/patches/gdb/6.8/150-gdb-6.3-security-errata-20050610.patch | 205 205 0 0 ++++++++++++++
10 files changed, 1374 insertions(+)
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gdb/6.7.1/150-gdb-6.3-security-errata-20050610.patch Tue Jun 17 21:37:27 2008 +0000
1.3 @@ -0,0 +1,205 @@
1.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/35_all_gdb-6.3-security-errata-20050610.patch
1.5 +-= BEGIN original header =-
1.6 +2005-06-09 Jeff Johnston <jjohnstn@redhat.com>
1.7 +
1.8 + * gdb.base/gdbinit.exp: New testcase.
1.9 + * gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp.
1.10 +
1.11 +2005-06-08 Daniel Jacobowitz <dan@codesourcery.com>
1.12 + Jeff Johnston <jjohnstn@redhat.com>
1.13 +
1.14 + * Makefile.in (cli-cmds.o): Update.
1.15 + * configure.in: Add check for getuid.
1.16 + * configure: Regenerated.
1.17 + * config.in: Ditto.
1.18 + * main.c (captured_main): Pass -1 to source_command when loading
1.19 + gdbinit files.
1.20 + * cli/cli-cmds.c: Include "gdb_stat.h" and <fcntl.h>.
1.21 + (source_command): Update documentation. Check permissions if
1.22 + FROM_TTY is -1.
1.23 +
1.24 +-= END original header =-
1.25 +diff -durN gdb-6.7.1.orig/gdb/cli/cli-cmds.c gdb-6.7.1/gdb/cli/cli-cmds.c
1.26 +--- gdb-6.7.1.orig/gdb/cli/cli-cmds.c 2007-08-23 20:08:47.000000000 +0200
1.27 ++++ gdb-6.7.1/gdb/cli/cli-cmds.c 2008-06-17 23:27:44.000000000 +0200
1.28 +@@ -36,6 +36,7 @@
1.29 + #include "objfiles.h"
1.30 + #include "source.h"
1.31 + #include "disasm.h"
1.32 ++#include "gdb_stat.h"
1.33 +
1.34 + #include "ui-out.h"
1.35 +
1.36 +@@ -459,12 +460,31 @@
1.37 +
1.38 + if (fd == -1)
1.39 + {
1.40 +- if (from_tty)
1.41 ++ if (from_tty > 0)
1.42 + perror_with_name (file);
1.43 + else
1.44 + return;
1.45 + }
1.46 +
1.47 ++#ifdef HAVE_GETUID
1.48 ++ if (from_tty == -1)
1.49 ++ {
1.50 ++ struct stat statbuf;
1.51 ++ if (fstat (fd, &statbuf) < 0)
1.52 ++ {
1.53 ++ perror_with_name (file);
1.54 ++ close (fd);
1.55 ++ return;
1.56 ++ }
1.57 ++ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH))
1.58 ++ {
1.59 ++ warning (_("not using untrusted file \"%s\""), file);
1.60 ++ close (fd);
1.61 ++ return;
1.62 ++ }
1.63 ++ }
1.64 ++#endif
1.65 ++
1.66 + stream = fdopen (fd, FOPEN_RT);
1.67 + script_from_file (stream, file);
1.68 +
1.69 +diff -durN gdb-6.7.1.orig/gdb/main.c gdb-6.7.1/gdb/main.c
1.70 +--- gdb-6.7.1.orig/gdb/main.c 2007-08-23 20:08:36.000000000 +0200
1.71 ++++ gdb-6.7.1/gdb/main.c 2008-06-17 23:27:44.000000000 +0200
1.72 +@@ -688,7 +688,7 @@
1.73 +
1.74 + if (!inhibit_gdbinit)
1.75 + {
1.76 +- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL);
1.77 ++ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL);
1.78 + }
1.79 +
1.80 + /* Do stats; no need to do them elsewhere since we'll only
1.81 +@@ -766,7 +766,7 @@
1.82 + || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
1.83 + if (!inhibit_gdbinit)
1.84 + {
1.85 +- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL);
1.86 ++ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL);
1.87 + }
1.88 +
1.89 + for (i = 0; i < ncmd; i++)
1.90 +diff -durN gdb-6.7.1.orig/gdb/Makefile.in gdb-6.7.1/gdb/Makefile.in
1.91 +--- gdb-6.7.1.orig/gdb/Makefile.in 2008-06-17 23:27:44.000000000 +0200
1.92 ++++ gdb-6.7.1/gdb/Makefile.in 2008-06-17 23:27:44.000000000 +0200
1.93 +@@ -2885,7 +2885,7 @@
1.94 + $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \
1.95 + $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \
1.96 + $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \
1.97 +- $(tui_h)
1.98 ++ $(tui_h) $(gdb_stat_h)
1.99 + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
1.100 + cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
1.101 + $(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \
1.102 +diff -durN gdb-6.7.1.orig/gdb/testsuite/gdb.base/gdbinit.exp gdb-6.7.1/gdb/testsuite/gdb.base/gdbinit.exp
1.103 +--- gdb-6.7.1.orig/gdb/testsuite/gdb.base/gdbinit.exp 1970-01-01 01:00:00.000000000 +0100
1.104 ++++ gdb-6.7.1/gdb/testsuite/gdb.base/gdbinit.exp 2008-06-17 23:27:44.000000000 +0200
1.105 +@@ -0,0 +1,98 @@
1.106 ++# Copyright 2005
1.107 ++# Free Software Foundation, Inc.
1.108 ++
1.109 ++# This program is free software; you can redistribute it and/or modify
1.110 ++# it under the terms of the GNU General Public License as published by
1.111 ++# the Free Software Foundation; either version 2 of the License, or
1.112 ++# (at your option) any later version.
1.113 ++#
1.114 ++# This program is distributed in the hope that it will be useful,
1.115 ++# but WITHOUT ANY WARRANTY; without even the implied warranty of
1.116 ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.117 ++# GNU General Public License for more details.
1.118 ++#
1.119 ++# You should have received a copy of the GNU General Public License
1.120 ++# along with this program; if not, write to the Free Software
1.121 ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1.122 ++
1.123 ++# Please email any bugs, comments, and/or additions to this file to:
1.124 ++# bug-gdb@prep.ai.mit.edu
1.125 ++
1.126 ++# This file was written by Jeff Johnston <jjohnstn@redhat.com>.
1.127 ++
1.128 ++if $tracelevel then {
1.129 ++ strace $tracelevel
1.130 ++}
1.131 ++
1.132 ++set prms_id 0
1.133 ++set bug_id 0
1.134 ++
1.135 ++# are we on a target board
1.136 ++if [is_remote target] {
1.137 ++ return
1.138 ++}
1.139 ++
1.140 ++
1.141 ++global verbose
1.142 ++global GDB
1.143 ++global GDBFLAGS
1.144 ++global gdb_prompt
1.145 ++global timeout
1.146 ++global gdb_spawn_id;
1.147 ++
1.148 ++gdb_stop_suppressing_tests;
1.149 ++
1.150 ++verbose "Spawning $GDB -nw"
1.151 ++
1.152 ++if [info exists gdb_spawn_id] {
1.153 ++ return 0;
1.154 ++}
1.155 ++
1.156 ++if ![is_remote host] {
1.157 ++ if { [which $GDB] == 0 } then {
1.158 ++ perror "$GDB does not exist."
1.159 ++ exit 1
1.160 ++ }
1.161 ++}
1.162 ++
1.163 ++set env(HOME) [pwd]
1.164 ++remote_exec build "rm .gdbinit"
1.165 ++remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit"
1.166 ++remote_exec build "chmod 646 .gdbinit"
1.167 ++
1.168 ++set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
1.169 ++if { $res < 0 || $res == "" } {
1.170 ++ perror "Spawning $GDB failed."
1.171 ++ return 1;
1.172 ++}
1.173 ++gdb_expect 360 {
1.174 ++ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
1.175 ++ pass "untrusted .gdbinit caught."
1.176 ++ }
1.177 ++ -re "$gdb_prompt $" {
1.178 ++ fail "untrusted .gdbinit caught."
1.179 ++ }
1.180 ++ timeout {
1.181 ++ fail "(timeout) untrusted .gdbinit caught."
1.182 ++ }
1.183 ++}
1.184 ++
1.185 ++remote_exec build "chmod 644 .gdbinit"
1.186 ++set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
1.187 ++if { $res < 0 || $res == "" } {
1.188 ++ perror "Spawning $GDB failed."
1.189 ++ return 1;
1.190 ++}
1.191 ++gdb_expect 360 {
1.192 ++ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
1.193 ++ fail "trusted .gdbinit allowed."
1.194 ++ }
1.195 ++ -re "in gdbinit.*$gdb_prompt $" {
1.196 ++ pass "trusted .gdbinit allowed."
1.197 ++ }
1.198 ++ timeout {
1.199 ++ fail "(timeout) trusted .gdbinit allowed."
1.200 ++ }
1.201 ++}
1.202 ++
1.203 ++remote_exec build "rm .gdbinit"
1.204 +diff -durN gdb-6.7.1.orig/gdb/testsuite/gdb.base/gdbinit.sample gdb-6.7.1/gdb/testsuite/gdb.base/gdbinit.sample
1.205 +--- gdb-6.7.1.orig/gdb/testsuite/gdb.base/gdbinit.sample 1970-01-01 01:00:00.000000000 +0100
1.206 ++++ gdb-6.7.1/gdb/testsuite/gdb.base/gdbinit.sample 2008-06-17 23:27:44.000000000 +0200
1.207 +@@ -0,0 +1 @@
1.208 ++echo "\nin gdbinit"
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/gdb/6.7.1/175-gdb-hppa-offsets.patch Tue Jun 17 21:37:27 2008 +0000
2.3 @@ -0,0 +1,272 @@
2.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/45_all_gdb-hppa-offsets.patch
2.5 +-= BEGIN original header =-
2.6 +sanitized headers dont include asm/offsets.h, so cache a local copy
2.7 +
2.8 +http://bugs.gentoo.org/180476
2.9 +http://lists.parisc-linux.org/pipermail/parisc-linux/2007-February/031162.html
2.10 +
2.11 +-= END original header =-
2.12 +diff -durN gdb-6.7.1.orig/gdb/hppa-linux-nat.c gdb-6.7.1/gdb/hppa-linux-nat.c
2.13 +--- gdb-6.7.1.orig/gdb/hppa-linux-nat.c 2007-08-23 20:08:33.000000000 +0200
2.14 ++++ gdb-6.7.1/gdb/hppa-linux-nat.c 2008-06-17 23:27:45.000000000 +0200
2.15 +@@ -32,7 +32,7 @@
2.16 + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,43)
2.17 + #include <asm/offset.h>
2.18 + #else
2.19 +-#include <asm/offsets.h>
2.20 ++#include <hppa-offsets.h>
2.21 + #endif
2.22 +
2.23 + #include "hppa-tdep.h"
2.24 +diff -durN gdb-6.7.1.orig/gdb/hppa-offsets.h gdb-6.7.1/gdb/hppa-offsets.h
2.25 +--- gdb-6.7.1.orig/gdb/hppa-offsets.h 1970-01-01 01:00:00.000000000 +0100
2.26 ++++ gdb-6.7.1/gdb/hppa-offsets.h 2008-06-17 23:27:45.000000000 +0200
2.27 +@@ -0,0 +1,248 @@
2.28 ++#ifndef __ASM_OFFSETS_H__
2.29 ++#define __ASM_OFFSETS_H__
2.30 ++/*
2.31 ++ * DO NOT MODIFY.
2.32 ++ *
2.33 ++ * This file was generated by arch/parisc/Makefile
2.34 ++ *
2.35 ++ */
2.36 ++
2.37 ++#define TASK_THREAD_INFO 4 /* offsetof(struct task_struct, thread_info) */
2.38 ++#define TASK_STATE 0 /* offsetof(struct task_struct, state) */
2.39 ++#define TASK_FLAGS 12 /* offsetof(struct task_struct, flags) */
2.40 ++#define TASK_SIGPENDING 1188 /* offsetof(struct task_struct, pending) */
2.41 ++#define TASK_PTRACE 16 /* offsetof(struct task_struct, ptrace) */
2.42 ++#define TASK_MM 108 /* offsetof(struct task_struct, mm) */
2.43 ++#define TASK_PERSONALITY 132 /* offsetof(struct task_struct, personality) */
2.44 ++#define TASK_PID 140 /* offsetof(struct task_struct, pid) */
2.45 ++
2.46 ++#define TASK_REGS 664 /* offsetof(struct task_struct, thread.regs) */
2.47 ++#define TASK_PT_PSW 664 /* offsetof(struct task_struct, thread.regs.gr[ 0]) */
2.48 ++#define TASK_PT_GR1 668 /* offsetof(struct task_struct, thread.regs.gr[ 1]) */
2.49 ++#define TASK_PT_GR2 672 /* offsetof(struct task_struct, thread.regs.gr[ 2]) */
2.50 ++#define TASK_PT_GR3 676 /* offsetof(struct task_struct, thread.regs.gr[ 3]) */
2.51 ++#define TASK_PT_GR4 680 /* offsetof(struct task_struct, thread.regs.gr[ 4]) */
2.52 ++#define TASK_PT_GR5 684 /* offsetof(struct task_struct, thread.regs.gr[ 5]) */
2.53 ++#define TASK_PT_GR6 688 /* offsetof(struct task_struct, thread.regs.gr[ 6]) */
2.54 ++#define TASK_PT_GR7 692 /* offsetof(struct task_struct, thread.regs.gr[ 7]) */
2.55 ++#define TASK_PT_GR8 696 /* offsetof(struct task_struct, thread.regs.gr[ 8]) */
2.56 ++#define TASK_PT_GR9 700 /* offsetof(struct task_struct, thread.regs.gr[ 9]) */
2.57 ++#define TASK_PT_GR10 704 /* offsetof(struct task_struct, thread.regs.gr[10]) */
2.58 ++#define TASK_PT_GR11 708 /* offsetof(struct task_struct, thread.regs.gr[11]) */
2.59 ++#define TASK_PT_GR12 712 /* offsetof(struct task_struct, thread.regs.gr[12]) */
2.60 ++#define TASK_PT_GR13 716 /* offsetof(struct task_struct, thread.regs.gr[13]) */
2.61 ++#define TASK_PT_GR14 720 /* offsetof(struct task_struct, thread.regs.gr[14]) */
2.62 ++#define TASK_PT_GR15 724 /* offsetof(struct task_struct, thread.regs.gr[15]) */
2.63 ++#define TASK_PT_GR16 728 /* offsetof(struct task_struct, thread.regs.gr[16]) */
2.64 ++#define TASK_PT_GR17 732 /* offsetof(struct task_struct, thread.regs.gr[17]) */
2.65 ++#define TASK_PT_GR18 736 /* offsetof(struct task_struct, thread.regs.gr[18]) */
2.66 ++#define TASK_PT_GR19 740 /* offsetof(struct task_struct, thread.regs.gr[19]) */
2.67 ++#define TASK_PT_GR20 744 /* offsetof(struct task_struct, thread.regs.gr[20]) */
2.68 ++#define TASK_PT_GR21 748 /* offsetof(struct task_struct, thread.regs.gr[21]) */
2.69 ++#define TASK_PT_GR22 752 /* offsetof(struct task_struct, thread.regs.gr[22]) */
2.70 ++#define TASK_PT_GR23 756 /* offsetof(struct task_struct, thread.regs.gr[23]) */
2.71 ++#define TASK_PT_GR24 760 /* offsetof(struct task_struct, thread.regs.gr[24]) */
2.72 ++#define TASK_PT_GR25 764 /* offsetof(struct task_struct, thread.regs.gr[25]) */
2.73 ++#define TASK_PT_GR26 768 /* offsetof(struct task_struct, thread.regs.gr[26]) */
2.74 ++#define TASK_PT_GR27 772 /* offsetof(struct task_struct, thread.regs.gr[27]) */
2.75 ++#define TASK_PT_GR28 776 /* offsetof(struct task_struct, thread.regs.gr[28]) */
2.76 ++#define TASK_PT_GR29 780 /* offsetof(struct task_struct, thread.regs.gr[29]) */
2.77 ++#define TASK_PT_GR30 784 /* offsetof(struct task_struct, thread.regs.gr[30]) */
2.78 ++#define TASK_PT_GR31 788 /* offsetof(struct task_struct, thread.regs.gr[31]) */
2.79 ++#define TASK_PT_FR0 792 /* offsetof(struct task_struct, thread.regs.fr[ 0]) */
2.80 ++#define TASK_PT_FR1 800 /* offsetof(struct task_struct, thread.regs.fr[ 1]) */
2.81 ++#define TASK_PT_FR2 808 /* offsetof(struct task_struct, thread.regs.fr[ 2]) */
2.82 ++#define TASK_PT_FR3 816 /* offsetof(struct task_struct, thread.regs.fr[ 3]) */
2.83 ++#define TASK_PT_FR4 824 /* offsetof(struct task_struct, thread.regs.fr[ 4]) */
2.84 ++#define TASK_PT_FR5 832 /* offsetof(struct task_struct, thread.regs.fr[ 5]) */
2.85 ++#define TASK_PT_FR6 840 /* offsetof(struct task_struct, thread.regs.fr[ 6]) */
2.86 ++#define TASK_PT_FR7 848 /* offsetof(struct task_struct, thread.regs.fr[ 7]) */
2.87 ++#define TASK_PT_FR8 856 /* offsetof(struct task_struct, thread.regs.fr[ 8]) */
2.88 ++#define TASK_PT_FR9 864 /* offsetof(struct task_struct, thread.regs.fr[ 9]) */
2.89 ++#define TASK_PT_FR10 872 /* offsetof(struct task_struct, thread.regs.fr[10]) */
2.90 ++#define TASK_PT_FR11 880 /* offsetof(struct task_struct, thread.regs.fr[11]) */
2.91 ++#define TASK_PT_FR12 888 /* offsetof(struct task_struct, thread.regs.fr[12]) */
2.92 ++#define TASK_PT_FR13 896 /* offsetof(struct task_struct, thread.regs.fr[13]) */
2.93 ++#define TASK_PT_FR14 904 /* offsetof(struct task_struct, thread.regs.fr[14]) */
2.94 ++#define TASK_PT_FR15 912 /* offsetof(struct task_struct, thread.regs.fr[15]) */
2.95 ++#define TASK_PT_FR16 920 /* offsetof(struct task_struct, thread.regs.fr[16]) */
2.96 ++#define TASK_PT_FR17 928 /* offsetof(struct task_struct, thread.regs.fr[17]) */
2.97 ++#define TASK_PT_FR18 936 /* offsetof(struct task_struct, thread.regs.fr[18]) */
2.98 ++#define TASK_PT_FR19 944 /* offsetof(struct task_struct, thread.regs.fr[19]) */
2.99 ++#define TASK_PT_FR20 952 /* offsetof(struct task_struct, thread.regs.fr[20]) */
2.100 ++#define TASK_PT_FR21 960 /* offsetof(struct task_struct, thread.regs.fr[21]) */
2.101 ++#define TASK_PT_FR22 968 /* offsetof(struct task_struct, thread.regs.fr[22]) */
2.102 ++#define TASK_PT_FR23 976 /* offsetof(struct task_struct, thread.regs.fr[23]) */
2.103 ++#define TASK_PT_FR24 984 /* offsetof(struct task_struct, thread.regs.fr[24]) */
2.104 ++#define TASK_PT_FR25 992 /* offsetof(struct task_struct, thread.regs.fr[25]) */
2.105 ++#define TASK_PT_FR26 1000 /* offsetof(struct task_struct, thread.regs.fr[26]) */
2.106 ++#define TASK_PT_FR27 1008 /* offsetof(struct task_struct, thread.regs.fr[27]) */
2.107 ++#define TASK_PT_FR28 1016 /* offsetof(struct task_struct, thread.regs.fr[28]) */
2.108 ++#define TASK_PT_FR29 1024 /* offsetof(struct task_struct, thread.regs.fr[29]) */
2.109 ++#define TASK_PT_FR30 1032 /* offsetof(struct task_struct, thread.regs.fr[30]) */
2.110 ++#define TASK_PT_FR31 1040 /* offsetof(struct task_struct, thread.regs.fr[31]) */
2.111 ++#define TASK_PT_SR0 1048 /* offsetof(struct task_struct, thread.regs.sr[ 0]) */
2.112 ++#define TASK_PT_SR1 1052 /* offsetof(struct task_struct, thread.regs.sr[ 1]) */
2.113 ++#define TASK_PT_SR2 1056 /* offsetof(struct task_struct, thread.regs.sr[ 2]) */
2.114 ++#define TASK_PT_SR3 1060 /* offsetof(struct task_struct, thread.regs.sr[ 3]) */
2.115 ++#define TASK_PT_SR4 1064 /* offsetof(struct task_struct, thread.regs.sr[ 4]) */
2.116 ++#define TASK_PT_SR5 1068 /* offsetof(struct task_struct, thread.regs.sr[ 5]) */
2.117 ++#define TASK_PT_SR6 1072 /* offsetof(struct task_struct, thread.regs.sr[ 6]) */
2.118 ++#define TASK_PT_SR7 1076 /* offsetof(struct task_struct, thread.regs.sr[ 7]) */
2.119 ++#define TASK_PT_IASQ0 1080 /* offsetof(struct task_struct, thread.regs.iasq[0]) */
2.120 ++#define TASK_PT_IASQ1 1084 /* offsetof(struct task_struct, thread.regs.iasq[1]) */
2.121 ++#define TASK_PT_IAOQ0 1088 /* offsetof(struct task_struct, thread.regs.iaoq[0]) */
2.122 ++#define TASK_PT_IAOQ1 1092 /* offsetof(struct task_struct, thread.regs.iaoq[1]) */
2.123 ++#define TASK_PT_CR27 1096 /* offsetof(struct task_struct, thread.regs.cr27) */
2.124 ++#define TASK_PT_ORIG_R28 1104 /* offsetof(struct task_struct, thread.regs.orig_r28) */
2.125 ++#define TASK_PT_KSP 1108 /* offsetof(struct task_struct, thread.regs.ksp) */
2.126 ++#define TASK_PT_KPC 1112 /* offsetof(struct task_struct, thread.regs.kpc) */
2.127 ++#define TASK_PT_SAR 1116 /* offsetof(struct task_struct, thread.regs.sar) */
2.128 ++#define TASK_PT_IIR 1120 /* offsetof(struct task_struct, thread.regs.iir) */
2.129 ++#define TASK_PT_ISR 1124 /* offsetof(struct task_struct, thread.regs.isr) */
2.130 ++#define TASK_PT_IOR 1128 /* offsetof(struct task_struct, thread.regs.ior) */
2.131 ++
2.132 ++#define TASK_SZ 1272 /* sizeof(struct task_struct) */
2.133 ++#define TASK_SZ_ALGN 1344 /* align(sizeof(struct task_struct), 64) */
2.134 ++
2.135 ++#define PT_PSW 0 /* offsetof(struct pt_regs, gr[ 0]) */
2.136 ++#define PT_GR1 4 /* offsetof(struct pt_regs, gr[ 1]) */
2.137 ++#define PT_GR2 8 /* offsetof(struct pt_regs, gr[ 2]) */
2.138 ++#define PT_GR3 12 /* offsetof(struct pt_regs, gr[ 3]) */
2.139 ++#define PT_GR4 16 /* offsetof(struct pt_regs, gr[ 4]) */
2.140 ++#define PT_GR5 20 /* offsetof(struct pt_regs, gr[ 5]) */
2.141 ++#define PT_GR6 24 /* offsetof(struct pt_regs, gr[ 6]) */
2.142 ++#define PT_GR7 28 /* offsetof(struct pt_regs, gr[ 7]) */
2.143 ++#define PT_GR8 32 /* offsetof(struct pt_regs, gr[ 8]) */
2.144 ++#define PT_GR9 36 /* offsetof(struct pt_regs, gr[ 9]) */
2.145 ++#define PT_GR10 40 /* offsetof(struct pt_regs, gr[10]) */
2.146 ++#define PT_GR11 44 /* offsetof(struct pt_regs, gr[11]) */
2.147 ++#define PT_GR12 48 /* offsetof(struct pt_regs, gr[12]) */
2.148 ++#define PT_GR13 52 /* offsetof(struct pt_regs, gr[13]) */
2.149 ++#define PT_GR14 56 /* offsetof(struct pt_regs, gr[14]) */
2.150 ++#define PT_GR15 60 /* offsetof(struct pt_regs, gr[15]) */
2.151 ++#define PT_GR16 64 /* offsetof(struct pt_regs, gr[16]) */
2.152 ++#define PT_GR17 68 /* offsetof(struct pt_regs, gr[17]) */
2.153 ++#define PT_GR18 72 /* offsetof(struct pt_regs, gr[18]) */
2.154 ++#define PT_GR19 76 /* offsetof(struct pt_regs, gr[19]) */
2.155 ++#define PT_GR20 80 /* offsetof(struct pt_regs, gr[20]) */
2.156 ++#define PT_GR21 84 /* offsetof(struct pt_regs, gr[21]) */
2.157 ++#define PT_GR22 88 /* offsetof(struct pt_regs, gr[22]) */
2.158 ++#define PT_GR23 92 /* offsetof(struct pt_regs, gr[23]) */
2.159 ++#define PT_GR24 96 /* offsetof(struct pt_regs, gr[24]) */
2.160 ++#define PT_GR25 100 /* offsetof(struct pt_regs, gr[25]) */
2.161 ++#define PT_GR26 104 /* offsetof(struct pt_regs, gr[26]) */
2.162 ++#define PT_GR27 108 /* offsetof(struct pt_regs, gr[27]) */
2.163 ++#define PT_GR28 112 /* offsetof(struct pt_regs, gr[28]) */
2.164 ++#define PT_GR29 116 /* offsetof(struct pt_regs, gr[29]) */
2.165 ++#define PT_GR30 120 /* offsetof(struct pt_regs, gr[30]) */
2.166 ++#define PT_GR31 124 /* offsetof(struct pt_regs, gr[31]) */
2.167 ++#define PT_FR0 128 /* offsetof(struct pt_regs, fr[ 0]) */
2.168 ++#define PT_FR1 136 /* offsetof(struct pt_regs, fr[ 1]) */
2.169 ++#define PT_FR2 144 /* offsetof(struct pt_regs, fr[ 2]) */
2.170 ++#define PT_FR3 152 /* offsetof(struct pt_regs, fr[ 3]) */
2.171 ++#define PT_FR4 160 /* offsetof(struct pt_regs, fr[ 4]) */
2.172 ++#define PT_FR5 168 /* offsetof(struct pt_regs, fr[ 5]) */
2.173 ++#define PT_FR6 176 /* offsetof(struct pt_regs, fr[ 6]) */
2.174 ++#define PT_FR7 184 /* offsetof(struct pt_regs, fr[ 7]) */
2.175 ++#define PT_FR8 192 /* offsetof(struct pt_regs, fr[ 8]) */
2.176 ++#define PT_FR9 200 /* offsetof(struct pt_regs, fr[ 9]) */
2.177 ++#define PT_FR10 208 /* offsetof(struct pt_regs, fr[10]) */
2.178 ++#define PT_FR11 216 /* offsetof(struct pt_regs, fr[11]) */
2.179 ++#define PT_FR12 224 /* offsetof(struct pt_regs, fr[12]) */
2.180 ++#define PT_FR13 232 /* offsetof(struct pt_regs, fr[13]) */
2.181 ++#define PT_FR14 240 /* offsetof(struct pt_regs, fr[14]) */
2.182 ++#define PT_FR15 248 /* offsetof(struct pt_regs, fr[15]) */
2.183 ++#define PT_FR16 256 /* offsetof(struct pt_regs, fr[16]) */
2.184 ++#define PT_FR17 264 /* offsetof(struct pt_regs, fr[17]) */
2.185 ++#define PT_FR18 272 /* offsetof(struct pt_regs, fr[18]) */
2.186 ++#define PT_FR19 280 /* offsetof(struct pt_regs, fr[19]) */
2.187 ++#define PT_FR20 288 /* offsetof(struct pt_regs, fr[20]) */
2.188 ++#define PT_FR21 296 /* offsetof(struct pt_regs, fr[21]) */
2.189 ++#define PT_FR22 304 /* offsetof(struct pt_regs, fr[22]) */
2.190 ++#define PT_FR23 312 /* offsetof(struct pt_regs, fr[23]) */
2.191 ++#define PT_FR24 320 /* offsetof(struct pt_regs, fr[24]) */
2.192 ++#define PT_FR25 328 /* offsetof(struct pt_regs, fr[25]) */
2.193 ++#define PT_FR26 336 /* offsetof(struct pt_regs, fr[26]) */
2.194 ++#define PT_FR27 344 /* offsetof(struct pt_regs, fr[27]) */
2.195 ++#define PT_FR28 352 /* offsetof(struct pt_regs, fr[28]) */
2.196 ++#define PT_FR29 360 /* offsetof(struct pt_regs, fr[29]) */
2.197 ++#define PT_FR30 368 /* offsetof(struct pt_regs, fr[30]) */
2.198 ++#define PT_FR31 376 /* offsetof(struct pt_regs, fr[31]) */
2.199 ++#define PT_SR0 384 /* offsetof(struct pt_regs, sr[ 0]) */
2.200 ++#define PT_SR1 388 /* offsetof(struct pt_regs, sr[ 1]) */
2.201 ++#define PT_SR2 392 /* offsetof(struct pt_regs, sr[ 2]) */
2.202 ++#define PT_SR3 396 /* offsetof(struct pt_regs, sr[ 3]) */
2.203 ++#define PT_SR4 400 /* offsetof(struct pt_regs, sr[ 4]) */
2.204 ++#define PT_SR5 404 /* offsetof(struct pt_regs, sr[ 5]) */
2.205 ++#define PT_SR6 408 /* offsetof(struct pt_regs, sr[ 6]) */
2.206 ++#define PT_SR7 412 /* offsetof(struct pt_regs, sr[ 7]) */
2.207 ++#define PT_IASQ0 416 /* offsetof(struct pt_regs, iasq[0]) */
2.208 ++#define PT_IASQ1 420 /* offsetof(struct pt_regs, iasq[1]) */
2.209 ++#define PT_IAOQ0 424 /* offsetof(struct pt_regs, iaoq[0]) */
2.210 ++#define PT_IAOQ1 428 /* offsetof(struct pt_regs, iaoq[1]) */
2.211 ++#define PT_CR27 432 /* offsetof(struct pt_regs, cr27) */
2.212 ++#define PT_ORIG_R28 440 /* offsetof(struct pt_regs, orig_r28) */
2.213 ++#define PT_KSP 444 /* offsetof(struct pt_regs, ksp) */
2.214 ++#define PT_KPC 448 /* offsetof(struct pt_regs, kpc) */
2.215 ++#define PT_SAR 452 /* offsetof(struct pt_regs, sar) */
2.216 ++#define PT_IIR 456 /* offsetof(struct pt_regs, iir) */
2.217 ++#define PT_ISR 460 /* offsetof(struct pt_regs, isr) */
2.218 ++#define PT_IOR 464 /* offsetof(struct pt_regs, ior) */
2.219 ++#define PT_SIZE 472 /* sizeof(struct pt_regs) */
2.220 ++#define PT_SZ_ALGN 576 /* align(sizeof(struct pt_regs), 64) */
2.221 ++
2.222 ++#define TI_TASK 0 /* offsetof(struct thread_info, task) */
2.223 ++#define TI_EXEC_DOMAIN 4 /* offsetof(struct thread_info, exec_domain) */
2.224 ++#define TI_FLAGS 8 /* offsetof(struct thread_info, flags) */
2.225 ++#define TI_CPU 16 /* offsetof(struct thread_info, cpu) */
2.226 ++#define TI_SEGMENT 12 /* offsetof(struct thread_info, addr_limit) */
2.227 ++#define TI_PRE_COUNT 20 /* offsetof(struct thread_info, preempt_count) */
2.228 ++#define THREAD_SZ 44 /* sizeof(struct thread_info) */
2.229 ++#define THREAD_SZ_ALGN 128 /* align(sizeof(struct thread_info), 64) */
2.230 ++
2.231 ++#define IRQSTAT_SIRQ_PEND 0 /* offsetof(irq_cpustat_t, __softirq_pending) */
2.232 ++#define IRQSTAT_SZ 64 /* sizeof(irq_cpustat_t) */
2.233 ++
2.234 ++#define ICACHE_BASE 8 /* offsetof(struct pdc_cache_info, ic_base) */
2.235 ++#define ICACHE_STRIDE 12 /* offsetof(struct pdc_cache_info, ic_stride) */
2.236 ++#define ICACHE_COUNT 16 /* offsetof(struct pdc_cache_info, ic_count) */
2.237 ++#define ICACHE_LOOP 20 /* offsetof(struct pdc_cache_info, ic_loop) */
2.238 ++#define DCACHE_BASE 32 /* offsetof(struct pdc_cache_info, dc_base) */
2.239 ++#define DCACHE_STRIDE 36 /* offsetof(struct pdc_cache_info, dc_stride) */
2.240 ++#define DCACHE_COUNT 40 /* offsetof(struct pdc_cache_info, dc_count) */
2.241 ++#define DCACHE_LOOP 44 /* offsetof(struct pdc_cache_info, dc_loop) */
2.242 ++#define ITLB_SID_BASE 56 /* offsetof(struct pdc_cache_info, it_sp_base) */
2.243 ++#define ITLB_SID_STRIDE 60 /* offsetof(struct pdc_cache_info, it_sp_stride) */
2.244 ++#define ITLB_SID_COUNT 64 /* offsetof(struct pdc_cache_info, it_sp_count) */
2.245 ++#define ITLB_OFF_BASE 68 /* offsetof(struct pdc_cache_info, it_off_base) */
2.246 ++#define ITLB_OFF_STRIDE 72 /* offsetof(struct pdc_cache_info, it_off_stride) */
2.247 ++#define ITLB_OFF_COUNT 76 /* offsetof(struct pdc_cache_info, it_off_count) */
2.248 ++#define ITLB_LOOP 80 /* offsetof(struct pdc_cache_info, it_loop) */
2.249 ++#define DTLB_SID_BASE 92 /* offsetof(struct pdc_cache_info, dt_sp_base) */
2.250 ++#define DTLB_SID_STRIDE 96 /* offsetof(struct pdc_cache_info, dt_sp_stride) */
2.251 ++#define DTLB_SID_COUNT 100 /* offsetof(struct pdc_cache_info, dt_sp_count) */
2.252 ++#define DTLB_OFF_BASE 104 /* offsetof(struct pdc_cache_info, dt_off_base) */
2.253 ++#define DTLB_OFF_STRIDE 108 /* offsetof(struct pdc_cache_info, dt_off_stride) */
2.254 ++#define DTLB_OFF_COUNT 112 /* offsetof(struct pdc_cache_info, dt_off_count) */
2.255 ++#define DTLB_LOOP 116 /* offsetof(struct pdc_cache_info, dt_loop) */
2.256 ++
2.257 ++#define PA_BLOCKSTEP_BIT 1 /* 31-PT_BLOCKSTEP_BIT */
2.258 ++#define PA_SINGLESTEP_BIT 0 /* 31-PT_SINGLESTEP_BIT */
2.259 ++
2.260 ++#define ASM_PMD_SHIFT 21 /* PMD_SHIFT */
2.261 ++#define ASM_PGDIR_SHIFT 21 /* PGDIR_SHIFT */
2.262 ++#define ASM_BITS_PER_PGD 11 /* BITS_PER_PGD */
2.263 ++#define ASM_BITS_PER_PMD 0 /* BITS_PER_PMD */
2.264 ++#define ASM_BITS_PER_PTE 9 /* BITS_PER_PTE */
2.265 ++#define ASM_PGD_PMD_OFFSET -8192 /* -(PAGE_SIZE << PGD_ORDER) */
2.266 ++#define ASM_PMD_ENTRY 128 /* ((PAGE_OFFSET & PMD_MASK) >> PMD_SHIFT) */
2.267 ++#define ASM_PGD_ENTRY 128 /* PAGE_OFFSET >> PGDIR_SHIFT */
2.268 ++#define ASM_PGD_ENTRY_SIZE 4 /* PGD_ENTRY_SIZE */
2.269 ++#define ASM_PMD_ENTRY_SIZE 4 /* PMD_ENTRY_SIZE */
2.270 ++#define ASM_PTE_ENTRY_SIZE 8 /* PTE_ENTRY_SIZE */
2.271 ++#define ASM_PT_INITIAL 4 /* PT_INITIAL */
2.272 ++#define ASM_PAGE_SIZE 4096 /* PAGE_SIZE */
2.273 ++
2.274 ++
2.275 ++#endif
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/patches/gdb/6.7.1/200-gdb-deleted-children.patch Tue Jun 17 21:37:27 2008 +0000
3.3 @@ -0,0 +1,26 @@
3.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/50_all_gdb-deleted-children.patch
3.5 +-= BEGIN original header =-
3.6 +http://bugs.gentoo.org/210636
3.7 +http://sourceware.org/ml/gdb-patches/2007-11/msg00136.html
3.8 +
3.9 +2007-11-07 Vladimir Prus <vladimir@codesourcery.com>
3.10 +
3.11 + Fix crash when a variable object being deleted
3.12 + has any of its children deleted previously.
3.13 +
3.14 + * varobj.c (delete_variable_1): Don't recurse
3.15 + into deleted children.
3.16 +
3.17 +-= END original header =-
3.18 +diff -durN gdb-6.7.1.orig/gdb/varobj.c gdb-6.7.1/gdb/varobj.c
3.19 +--- gdb-6.7.1.orig/gdb/varobj.c 2007-08-31 21:01:17.000000000 +0200
3.20 ++++ gdb-6.7.1/gdb/varobj.c 2008-06-17 23:27:45.000000000 +0200
3.21 +@@ -1295,6 +1295,8 @@
3.22 + for (i = 0; i < VEC_length (varobj_p, var->children); ++i)
3.23 + {
3.24 + varobj_p child = VEC_index (varobj_p, var->children, i);
3.25 ++ if (!child)
3.26 ++ continue;
3.27 + if (!remove_from_parent_p)
3.28 + child->parent = NULL;
3.29 + delete_variable_1 (resultp, delcountp, child, 0, only_children_p);
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/patches/gdb/6.7.1/225-gdb-6.5-dwarf-stack-overflow.patch Tue Jun 17 21:37:27 2008 +0000
4.3 @@ -0,0 +1,52 @@
4.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/80_all_gdb-6.5-dwarf-stack-overflow.patch
4.5 +-= BEGIN original header =-
4.6 +http://bugs.gentoo.org/144833
4.7 +
4.8 +for gdb/ChangeLog:
4.9 +2006-08-22 Will Drewry <wad@google.com>
4.10 + Tavis Ormandy <taviso@google.com>
4.11 +
4.12 + * dwarf2read.c (decode_locdesc): Enforce location description stack
4.13 + boundaries.
4.14 + * dwarfread.c (locval): Likewise.
4.15 +
4.16 +-= END original header =-
4.17 +diff -durN gdb-6.7.1.orig/gdb/dwarf2read.c gdb-6.7.1/gdb/dwarf2read.c
4.18 +--- gdb-6.7.1.orig/gdb/dwarf2read.c 2007-09-05 02:51:48.000000000 +0200
4.19 ++++ gdb-6.7.1/gdb/dwarf2read.c 2008-06-17 23:27:46.000000000 +0200
4.20 +@@ -9061,8 +9061,7 @@
4.21 + callers will only want a very basic result and this can become a
4.22 + complaint.
4.23 +
4.24 +- Note that stack[0] is unused except as a default error return.
4.25 +- Note that stack overflow is not yet handled. */
4.26 ++ Note that stack[0] is unused except as a default error return. */
4.27 +
4.28 + static CORE_ADDR
4.29 + decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
4.30 +@@ -9079,7 +9078,7 @@
4.31 +
4.32 + i = 0;
4.33 + stacki = 0;
4.34 +- stack[stacki] = 0;
4.35 ++ stack[++stacki] = 0;
4.36 +
4.37 + while (i < size)
4.38 + {
4.39 +@@ -9261,6 +9260,16 @@
4.40 + dwarf_stack_op_name (op));
4.41 + return (stack[stacki]);
4.42 + }
4.43 ++ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing
4.44 ++ outside of the allocated space. Also enforce minimum > 0.
4.45 ++ -- wad@google.com 14 Aug 2006 */
4.46 ++ if (stacki >= sizeof (stack) / sizeof (*stack) - 1)
4.47 ++ internal_error (__FILE__, __LINE__,
4.48 ++ _("location description stack too deep: %d"),
4.49 ++ stacki);
4.50 ++ if (stacki <= 0)
4.51 ++ internal_error (__FILE__, __LINE__,
4.52 ++ _("location description stack too shallow"));
4.53 + }
4.54 + return (stack[stacki]);
4.55 + }
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/patches/gdb/6.7/100-gdb-6.3-security-errata-20050610.patch Tue Jun 17 21:37:27 2008 +0000
5.3 @@ -0,0 +1,205 @@
5.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.7/35_all_gdb-6.3-security-errata-20050610.patch
5.5 +-= BEGIN original header =-
5.6 +2005-06-09 Jeff Johnston <jjohnstn@redhat.com>
5.7 +
5.8 + * gdb.base/gdbinit.exp: New testcase.
5.9 + * gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp.
5.10 +
5.11 +2005-06-08 Daniel Jacobowitz <dan@codesourcery.com>
5.12 + Jeff Johnston <jjohnstn@redhat.com>
5.13 +
5.14 + * Makefile.in (cli-cmds.o): Update.
5.15 + * configure.in: Add check for getuid.
5.16 + * configure: Regenerated.
5.17 + * config.in: Ditto.
5.18 + * main.c (captured_main): Pass -1 to source_command when loading
5.19 + gdbinit files.
5.20 + * cli/cli-cmds.c: Include "gdb_stat.h" and <fcntl.h>.
5.21 + (source_command): Update documentation. Check permissions if
5.22 + FROM_TTY is -1.
5.23 +
5.24 +-= END original header =-
5.25 +diff -durN gdb-6.7.orig/gdb/cli/cli-cmds.c gdb-6.7/gdb/cli/cli-cmds.c
5.26 +--- gdb-6.7.orig/gdb/cli/cli-cmds.c 2007-08-23 20:08:47.000000000 +0200
5.27 ++++ gdb-6.7/gdb/cli/cli-cmds.c 2008-06-17 23:25:23.000000000 +0200
5.28 +@@ -36,6 +36,7 @@
5.29 + #include "objfiles.h"
5.30 + #include "source.h"
5.31 + #include "disasm.h"
5.32 ++#include "gdb_stat.h"
5.33 +
5.34 + #include "ui-out.h"
5.35 +
5.36 +@@ -459,12 +460,31 @@
5.37 +
5.38 + if (fd == -1)
5.39 + {
5.40 +- if (from_tty)
5.41 ++ if (from_tty > 0)
5.42 + perror_with_name (file);
5.43 + else
5.44 + return;
5.45 + }
5.46 +
5.47 ++#ifdef HAVE_GETUID
5.48 ++ if (from_tty == -1)
5.49 ++ {
5.50 ++ struct stat statbuf;
5.51 ++ if (fstat (fd, &statbuf) < 0)
5.52 ++ {
5.53 ++ perror_with_name (file);
5.54 ++ close (fd);
5.55 ++ return;
5.56 ++ }
5.57 ++ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH))
5.58 ++ {
5.59 ++ warning (_("not using untrusted file \"%s\""), file);
5.60 ++ close (fd);
5.61 ++ return;
5.62 ++ }
5.63 ++ }
5.64 ++#endif
5.65 ++
5.66 + stream = fdopen (fd, FOPEN_RT);
5.67 + script_from_file (stream, file);
5.68 +
5.69 +diff -durN gdb-6.7.orig/gdb/main.c gdb-6.7/gdb/main.c
5.70 +--- gdb-6.7.orig/gdb/main.c 2007-08-23 20:08:36.000000000 +0200
5.71 ++++ gdb-6.7/gdb/main.c 2008-06-17 23:25:23.000000000 +0200
5.72 +@@ -688,7 +688,7 @@
5.73 +
5.74 + if (!inhibit_gdbinit)
5.75 + {
5.76 +- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL);
5.77 ++ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL);
5.78 + }
5.79 +
5.80 + /* Do stats; no need to do them elsewhere since we'll only
5.81 +@@ -766,7 +766,7 @@
5.82 + || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
5.83 + if (!inhibit_gdbinit)
5.84 + {
5.85 +- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL);
5.86 ++ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL);
5.87 + }
5.88 +
5.89 + for (i = 0; i < ncmd; i++)
5.90 +diff -durN gdb-6.7.orig/gdb/Makefile.in gdb-6.7/gdb/Makefile.in
5.91 +--- gdb-6.7.orig/gdb/Makefile.in 2007-09-05 02:14:02.000000000 +0200
5.92 ++++ gdb-6.7/gdb/Makefile.in 2008-06-17 23:25:23.000000000 +0200
5.93 +@@ -2882,7 +2882,7 @@
5.94 + $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \
5.95 + $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \
5.96 + $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \
5.97 +- $(tui_h)
5.98 ++ $(tui_h) $(gdb_stat_h)
5.99 + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
5.100 + cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
5.101 + $(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \
5.102 +diff -durN gdb-6.7.orig/gdb/testsuite/gdb.base/gdbinit.exp gdb-6.7/gdb/testsuite/gdb.base/gdbinit.exp
5.103 +--- gdb-6.7.orig/gdb/testsuite/gdb.base/gdbinit.exp 1970-01-01 01:00:00.000000000 +0100
5.104 ++++ gdb-6.7/gdb/testsuite/gdb.base/gdbinit.exp 2008-06-17 23:25:23.000000000 +0200
5.105 +@@ -0,0 +1,98 @@
5.106 ++# Copyright 2005
5.107 ++# Free Software Foundation, Inc.
5.108 ++
5.109 ++# This program is free software; you can redistribute it and/or modify
5.110 ++# it under the terms of the GNU General Public License as published by
5.111 ++# the Free Software Foundation; either version 2 of the License, or
5.112 ++# (at your option) any later version.
5.113 ++#
5.114 ++# This program is distributed in the hope that it will be useful,
5.115 ++# but WITHOUT ANY WARRANTY; without even the implied warranty of
5.116 ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5.117 ++# GNU General Public License for more details.
5.118 ++#
5.119 ++# You should have received a copy of the GNU General Public License
5.120 ++# along with this program; if not, write to the Free Software
5.121 ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5.122 ++
5.123 ++# Please email any bugs, comments, and/or additions to this file to:
5.124 ++# bug-gdb@prep.ai.mit.edu
5.125 ++
5.126 ++# This file was written by Jeff Johnston <jjohnstn@redhat.com>.
5.127 ++
5.128 ++if $tracelevel then {
5.129 ++ strace $tracelevel
5.130 ++}
5.131 ++
5.132 ++set prms_id 0
5.133 ++set bug_id 0
5.134 ++
5.135 ++# are we on a target board
5.136 ++if [is_remote target] {
5.137 ++ return
5.138 ++}
5.139 ++
5.140 ++
5.141 ++global verbose
5.142 ++global GDB
5.143 ++global GDBFLAGS
5.144 ++global gdb_prompt
5.145 ++global timeout
5.146 ++global gdb_spawn_id;
5.147 ++
5.148 ++gdb_stop_suppressing_tests;
5.149 ++
5.150 ++verbose "Spawning $GDB -nw"
5.151 ++
5.152 ++if [info exists gdb_spawn_id] {
5.153 ++ return 0;
5.154 ++}
5.155 ++
5.156 ++if ![is_remote host] {
5.157 ++ if { [which $GDB] == 0 } then {
5.158 ++ perror "$GDB does not exist."
5.159 ++ exit 1
5.160 ++ }
5.161 ++}
5.162 ++
5.163 ++set env(HOME) [pwd]
5.164 ++remote_exec build "rm .gdbinit"
5.165 ++remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit"
5.166 ++remote_exec build "chmod 646 .gdbinit"
5.167 ++
5.168 ++set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
5.169 ++if { $res < 0 || $res == "" } {
5.170 ++ perror "Spawning $GDB failed."
5.171 ++ return 1;
5.172 ++}
5.173 ++gdb_expect 360 {
5.174 ++ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
5.175 ++ pass "untrusted .gdbinit caught."
5.176 ++ }
5.177 ++ -re "$gdb_prompt $" {
5.178 ++ fail "untrusted .gdbinit caught."
5.179 ++ }
5.180 ++ timeout {
5.181 ++ fail "(timeout) untrusted .gdbinit caught."
5.182 ++ }
5.183 ++}
5.184 ++
5.185 ++remote_exec build "chmod 644 .gdbinit"
5.186 ++set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
5.187 ++if { $res < 0 || $res == "" } {
5.188 ++ perror "Spawning $GDB failed."
5.189 ++ return 1;
5.190 ++}
5.191 ++gdb_expect 360 {
5.192 ++ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
5.193 ++ fail "trusted .gdbinit allowed."
5.194 ++ }
5.195 ++ -re "in gdbinit.*$gdb_prompt $" {
5.196 ++ pass "trusted .gdbinit allowed."
5.197 ++ }
5.198 ++ timeout {
5.199 ++ fail "(timeout) trusted .gdbinit allowed."
5.200 ++ }
5.201 ++}
5.202 ++
5.203 ++remote_exec build "rm .gdbinit"
5.204 +diff -durN gdb-6.7.orig/gdb/testsuite/gdb.base/gdbinit.sample gdb-6.7/gdb/testsuite/gdb.base/gdbinit.sample
5.205 +--- gdb-6.7.orig/gdb/testsuite/gdb.base/gdbinit.sample 1970-01-01 01:00:00.000000000 +0100
5.206 ++++ gdb-6.7/gdb/testsuite/gdb.base/gdbinit.sample 2008-06-17 23:25:23.000000000 +0200
5.207 +@@ -0,0 +1 @@
5.208 ++echo "\nin gdbinit"
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/patches/gdb/6.7/125-gdb-hppa-offsets.patch Tue Jun 17 21:37:27 2008 +0000
6.3 @@ -0,0 +1,272 @@
6.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.7/45_all_gdb-hppa-offsets.patch
6.5 +-= BEGIN original header =-
6.6 +sanitized headers dont include asm/offsets.h, so cache a local copy
6.7 +
6.8 +http://bugs.gentoo.org/180476
6.9 +http://lists.parisc-linux.org/pipermail/parisc-linux/2007-February/031162.html
6.10 +
6.11 +-= END original header =-
6.12 +diff -durN gdb-6.7.orig/gdb/hppa-linux-nat.c gdb-6.7/gdb/hppa-linux-nat.c
6.13 +--- gdb-6.7.orig/gdb/hppa-linux-nat.c 2007-08-23 20:08:33.000000000 +0200
6.14 ++++ gdb-6.7/gdb/hppa-linux-nat.c 2008-06-17 23:25:28.000000000 +0200
6.15 +@@ -32,7 +32,7 @@
6.16 + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,43)
6.17 + #include <asm/offset.h>
6.18 + #else
6.19 +-#include <asm/offsets.h>
6.20 ++#include <hppa-offsets.h>
6.21 + #endif
6.22 +
6.23 + #include "hppa-tdep.h"
6.24 +diff -durN gdb-6.7.orig/gdb/hppa-offsets.h gdb-6.7/gdb/hppa-offsets.h
6.25 +--- gdb-6.7.orig/gdb/hppa-offsets.h 1970-01-01 01:00:00.000000000 +0100
6.26 ++++ gdb-6.7/gdb/hppa-offsets.h 2008-06-17 23:25:28.000000000 +0200
6.27 +@@ -0,0 +1,248 @@
6.28 ++#ifndef __ASM_OFFSETS_H__
6.29 ++#define __ASM_OFFSETS_H__
6.30 ++/*
6.31 ++ * DO NOT MODIFY.
6.32 ++ *
6.33 ++ * This file was generated by arch/parisc/Makefile
6.34 ++ *
6.35 ++ */
6.36 ++
6.37 ++#define TASK_THREAD_INFO 4 /* offsetof(struct task_struct, thread_info) */
6.38 ++#define TASK_STATE 0 /* offsetof(struct task_struct, state) */
6.39 ++#define TASK_FLAGS 12 /* offsetof(struct task_struct, flags) */
6.40 ++#define TASK_SIGPENDING 1188 /* offsetof(struct task_struct, pending) */
6.41 ++#define TASK_PTRACE 16 /* offsetof(struct task_struct, ptrace) */
6.42 ++#define TASK_MM 108 /* offsetof(struct task_struct, mm) */
6.43 ++#define TASK_PERSONALITY 132 /* offsetof(struct task_struct, personality) */
6.44 ++#define TASK_PID 140 /* offsetof(struct task_struct, pid) */
6.45 ++
6.46 ++#define TASK_REGS 664 /* offsetof(struct task_struct, thread.regs) */
6.47 ++#define TASK_PT_PSW 664 /* offsetof(struct task_struct, thread.regs.gr[ 0]) */
6.48 ++#define TASK_PT_GR1 668 /* offsetof(struct task_struct, thread.regs.gr[ 1]) */
6.49 ++#define TASK_PT_GR2 672 /* offsetof(struct task_struct, thread.regs.gr[ 2]) */
6.50 ++#define TASK_PT_GR3 676 /* offsetof(struct task_struct, thread.regs.gr[ 3]) */
6.51 ++#define TASK_PT_GR4 680 /* offsetof(struct task_struct, thread.regs.gr[ 4]) */
6.52 ++#define TASK_PT_GR5 684 /* offsetof(struct task_struct, thread.regs.gr[ 5]) */
6.53 ++#define TASK_PT_GR6 688 /* offsetof(struct task_struct, thread.regs.gr[ 6]) */
6.54 ++#define TASK_PT_GR7 692 /* offsetof(struct task_struct, thread.regs.gr[ 7]) */
6.55 ++#define TASK_PT_GR8 696 /* offsetof(struct task_struct, thread.regs.gr[ 8]) */
6.56 ++#define TASK_PT_GR9 700 /* offsetof(struct task_struct, thread.regs.gr[ 9]) */
6.57 ++#define TASK_PT_GR10 704 /* offsetof(struct task_struct, thread.regs.gr[10]) */
6.58 ++#define TASK_PT_GR11 708 /* offsetof(struct task_struct, thread.regs.gr[11]) */
6.59 ++#define TASK_PT_GR12 712 /* offsetof(struct task_struct, thread.regs.gr[12]) */
6.60 ++#define TASK_PT_GR13 716 /* offsetof(struct task_struct, thread.regs.gr[13]) */
6.61 ++#define TASK_PT_GR14 720 /* offsetof(struct task_struct, thread.regs.gr[14]) */
6.62 ++#define TASK_PT_GR15 724 /* offsetof(struct task_struct, thread.regs.gr[15]) */
6.63 ++#define TASK_PT_GR16 728 /* offsetof(struct task_struct, thread.regs.gr[16]) */
6.64 ++#define TASK_PT_GR17 732 /* offsetof(struct task_struct, thread.regs.gr[17]) */
6.65 ++#define TASK_PT_GR18 736 /* offsetof(struct task_struct, thread.regs.gr[18]) */
6.66 ++#define TASK_PT_GR19 740 /* offsetof(struct task_struct, thread.regs.gr[19]) */
6.67 ++#define TASK_PT_GR20 744 /* offsetof(struct task_struct, thread.regs.gr[20]) */
6.68 ++#define TASK_PT_GR21 748 /* offsetof(struct task_struct, thread.regs.gr[21]) */
6.69 ++#define TASK_PT_GR22 752 /* offsetof(struct task_struct, thread.regs.gr[22]) */
6.70 ++#define TASK_PT_GR23 756 /* offsetof(struct task_struct, thread.regs.gr[23]) */
6.71 ++#define TASK_PT_GR24 760 /* offsetof(struct task_struct, thread.regs.gr[24]) */
6.72 ++#define TASK_PT_GR25 764 /* offsetof(struct task_struct, thread.regs.gr[25]) */
6.73 ++#define TASK_PT_GR26 768 /* offsetof(struct task_struct, thread.regs.gr[26]) */
6.74 ++#define TASK_PT_GR27 772 /* offsetof(struct task_struct, thread.regs.gr[27]) */
6.75 ++#define TASK_PT_GR28 776 /* offsetof(struct task_struct, thread.regs.gr[28]) */
6.76 ++#define TASK_PT_GR29 780 /* offsetof(struct task_struct, thread.regs.gr[29]) */
6.77 ++#define TASK_PT_GR30 784 /* offsetof(struct task_struct, thread.regs.gr[30]) */
6.78 ++#define TASK_PT_GR31 788 /* offsetof(struct task_struct, thread.regs.gr[31]) */
6.79 ++#define TASK_PT_FR0 792 /* offsetof(struct task_struct, thread.regs.fr[ 0]) */
6.80 ++#define TASK_PT_FR1 800 /* offsetof(struct task_struct, thread.regs.fr[ 1]) */
6.81 ++#define TASK_PT_FR2 808 /* offsetof(struct task_struct, thread.regs.fr[ 2]) */
6.82 ++#define TASK_PT_FR3 816 /* offsetof(struct task_struct, thread.regs.fr[ 3]) */
6.83 ++#define TASK_PT_FR4 824 /* offsetof(struct task_struct, thread.regs.fr[ 4]) */
6.84 ++#define TASK_PT_FR5 832 /* offsetof(struct task_struct, thread.regs.fr[ 5]) */
6.85 ++#define TASK_PT_FR6 840 /* offsetof(struct task_struct, thread.regs.fr[ 6]) */
6.86 ++#define TASK_PT_FR7 848 /* offsetof(struct task_struct, thread.regs.fr[ 7]) */
6.87 ++#define TASK_PT_FR8 856 /* offsetof(struct task_struct, thread.regs.fr[ 8]) */
6.88 ++#define TASK_PT_FR9 864 /* offsetof(struct task_struct, thread.regs.fr[ 9]) */
6.89 ++#define TASK_PT_FR10 872 /* offsetof(struct task_struct, thread.regs.fr[10]) */
6.90 ++#define TASK_PT_FR11 880 /* offsetof(struct task_struct, thread.regs.fr[11]) */
6.91 ++#define TASK_PT_FR12 888 /* offsetof(struct task_struct, thread.regs.fr[12]) */
6.92 ++#define TASK_PT_FR13 896 /* offsetof(struct task_struct, thread.regs.fr[13]) */
6.93 ++#define TASK_PT_FR14 904 /* offsetof(struct task_struct, thread.regs.fr[14]) */
6.94 ++#define TASK_PT_FR15 912 /* offsetof(struct task_struct, thread.regs.fr[15]) */
6.95 ++#define TASK_PT_FR16 920 /* offsetof(struct task_struct, thread.regs.fr[16]) */
6.96 ++#define TASK_PT_FR17 928 /* offsetof(struct task_struct, thread.regs.fr[17]) */
6.97 ++#define TASK_PT_FR18 936 /* offsetof(struct task_struct, thread.regs.fr[18]) */
6.98 ++#define TASK_PT_FR19 944 /* offsetof(struct task_struct, thread.regs.fr[19]) */
6.99 ++#define TASK_PT_FR20 952 /* offsetof(struct task_struct, thread.regs.fr[20]) */
6.100 ++#define TASK_PT_FR21 960 /* offsetof(struct task_struct, thread.regs.fr[21]) */
6.101 ++#define TASK_PT_FR22 968 /* offsetof(struct task_struct, thread.regs.fr[22]) */
6.102 ++#define TASK_PT_FR23 976 /* offsetof(struct task_struct, thread.regs.fr[23]) */
6.103 ++#define TASK_PT_FR24 984 /* offsetof(struct task_struct, thread.regs.fr[24]) */
6.104 ++#define TASK_PT_FR25 992 /* offsetof(struct task_struct, thread.regs.fr[25]) */
6.105 ++#define TASK_PT_FR26 1000 /* offsetof(struct task_struct, thread.regs.fr[26]) */
6.106 ++#define TASK_PT_FR27 1008 /* offsetof(struct task_struct, thread.regs.fr[27]) */
6.107 ++#define TASK_PT_FR28 1016 /* offsetof(struct task_struct, thread.regs.fr[28]) */
6.108 ++#define TASK_PT_FR29 1024 /* offsetof(struct task_struct, thread.regs.fr[29]) */
6.109 ++#define TASK_PT_FR30 1032 /* offsetof(struct task_struct, thread.regs.fr[30]) */
6.110 ++#define TASK_PT_FR31 1040 /* offsetof(struct task_struct, thread.regs.fr[31]) */
6.111 ++#define TASK_PT_SR0 1048 /* offsetof(struct task_struct, thread.regs.sr[ 0]) */
6.112 ++#define TASK_PT_SR1 1052 /* offsetof(struct task_struct, thread.regs.sr[ 1]) */
6.113 ++#define TASK_PT_SR2 1056 /* offsetof(struct task_struct, thread.regs.sr[ 2]) */
6.114 ++#define TASK_PT_SR3 1060 /* offsetof(struct task_struct, thread.regs.sr[ 3]) */
6.115 ++#define TASK_PT_SR4 1064 /* offsetof(struct task_struct, thread.regs.sr[ 4]) */
6.116 ++#define TASK_PT_SR5 1068 /* offsetof(struct task_struct, thread.regs.sr[ 5]) */
6.117 ++#define TASK_PT_SR6 1072 /* offsetof(struct task_struct, thread.regs.sr[ 6]) */
6.118 ++#define TASK_PT_SR7 1076 /* offsetof(struct task_struct, thread.regs.sr[ 7]) */
6.119 ++#define TASK_PT_IASQ0 1080 /* offsetof(struct task_struct, thread.regs.iasq[0]) */
6.120 ++#define TASK_PT_IASQ1 1084 /* offsetof(struct task_struct, thread.regs.iasq[1]) */
6.121 ++#define TASK_PT_IAOQ0 1088 /* offsetof(struct task_struct, thread.regs.iaoq[0]) */
6.122 ++#define TASK_PT_IAOQ1 1092 /* offsetof(struct task_struct, thread.regs.iaoq[1]) */
6.123 ++#define TASK_PT_CR27 1096 /* offsetof(struct task_struct, thread.regs.cr27) */
6.124 ++#define TASK_PT_ORIG_R28 1104 /* offsetof(struct task_struct, thread.regs.orig_r28) */
6.125 ++#define TASK_PT_KSP 1108 /* offsetof(struct task_struct, thread.regs.ksp) */
6.126 ++#define TASK_PT_KPC 1112 /* offsetof(struct task_struct, thread.regs.kpc) */
6.127 ++#define TASK_PT_SAR 1116 /* offsetof(struct task_struct, thread.regs.sar) */
6.128 ++#define TASK_PT_IIR 1120 /* offsetof(struct task_struct, thread.regs.iir) */
6.129 ++#define TASK_PT_ISR 1124 /* offsetof(struct task_struct, thread.regs.isr) */
6.130 ++#define TASK_PT_IOR 1128 /* offsetof(struct task_struct, thread.regs.ior) */
6.131 ++
6.132 ++#define TASK_SZ 1272 /* sizeof(struct task_struct) */
6.133 ++#define TASK_SZ_ALGN 1344 /* align(sizeof(struct task_struct), 64) */
6.134 ++
6.135 ++#define PT_PSW 0 /* offsetof(struct pt_regs, gr[ 0]) */
6.136 ++#define PT_GR1 4 /* offsetof(struct pt_regs, gr[ 1]) */
6.137 ++#define PT_GR2 8 /* offsetof(struct pt_regs, gr[ 2]) */
6.138 ++#define PT_GR3 12 /* offsetof(struct pt_regs, gr[ 3]) */
6.139 ++#define PT_GR4 16 /* offsetof(struct pt_regs, gr[ 4]) */
6.140 ++#define PT_GR5 20 /* offsetof(struct pt_regs, gr[ 5]) */
6.141 ++#define PT_GR6 24 /* offsetof(struct pt_regs, gr[ 6]) */
6.142 ++#define PT_GR7 28 /* offsetof(struct pt_regs, gr[ 7]) */
6.143 ++#define PT_GR8 32 /* offsetof(struct pt_regs, gr[ 8]) */
6.144 ++#define PT_GR9 36 /* offsetof(struct pt_regs, gr[ 9]) */
6.145 ++#define PT_GR10 40 /* offsetof(struct pt_regs, gr[10]) */
6.146 ++#define PT_GR11 44 /* offsetof(struct pt_regs, gr[11]) */
6.147 ++#define PT_GR12 48 /* offsetof(struct pt_regs, gr[12]) */
6.148 ++#define PT_GR13 52 /* offsetof(struct pt_regs, gr[13]) */
6.149 ++#define PT_GR14 56 /* offsetof(struct pt_regs, gr[14]) */
6.150 ++#define PT_GR15 60 /* offsetof(struct pt_regs, gr[15]) */
6.151 ++#define PT_GR16 64 /* offsetof(struct pt_regs, gr[16]) */
6.152 ++#define PT_GR17 68 /* offsetof(struct pt_regs, gr[17]) */
6.153 ++#define PT_GR18 72 /* offsetof(struct pt_regs, gr[18]) */
6.154 ++#define PT_GR19 76 /* offsetof(struct pt_regs, gr[19]) */
6.155 ++#define PT_GR20 80 /* offsetof(struct pt_regs, gr[20]) */
6.156 ++#define PT_GR21 84 /* offsetof(struct pt_regs, gr[21]) */
6.157 ++#define PT_GR22 88 /* offsetof(struct pt_regs, gr[22]) */
6.158 ++#define PT_GR23 92 /* offsetof(struct pt_regs, gr[23]) */
6.159 ++#define PT_GR24 96 /* offsetof(struct pt_regs, gr[24]) */
6.160 ++#define PT_GR25 100 /* offsetof(struct pt_regs, gr[25]) */
6.161 ++#define PT_GR26 104 /* offsetof(struct pt_regs, gr[26]) */
6.162 ++#define PT_GR27 108 /* offsetof(struct pt_regs, gr[27]) */
6.163 ++#define PT_GR28 112 /* offsetof(struct pt_regs, gr[28]) */
6.164 ++#define PT_GR29 116 /* offsetof(struct pt_regs, gr[29]) */
6.165 ++#define PT_GR30 120 /* offsetof(struct pt_regs, gr[30]) */
6.166 ++#define PT_GR31 124 /* offsetof(struct pt_regs, gr[31]) */
6.167 ++#define PT_FR0 128 /* offsetof(struct pt_regs, fr[ 0]) */
6.168 ++#define PT_FR1 136 /* offsetof(struct pt_regs, fr[ 1]) */
6.169 ++#define PT_FR2 144 /* offsetof(struct pt_regs, fr[ 2]) */
6.170 ++#define PT_FR3 152 /* offsetof(struct pt_regs, fr[ 3]) */
6.171 ++#define PT_FR4 160 /* offsetof(struct pt_regs, fr[ 4]) */
6.172 ++#define PT_FR5 168 /* offsetof(struct pt_regs, fr[ 5]) */
6.173 ++#define PT_FR6 176 /* offsetof(struct pt_regs, fr[ 6]) */
6.174 ++#define PT_FR7 184 /* offsetof(struct pt_regs, fr[ 7]) */
6.175 ++#define PT_FR8 192 /* offsetof(struct pt_regs, fr[ 8]) */
6.176 ++#define PT_FR9 200 /* offsetof(struct pt_regs, fr[ 9]) */
6.177 ++#define PT_FR10 208 /* offsetof(struct pt_regs, fr[10]) */
6.178 ++#define PT_FR11 216 /* offsetof(struct pt_regs, fr[11]) */
6.179 ++#define PT_FR12 224 /* offsetof(struct pt_regs, fr[12]) */
6.180 ++#define PT_FR13 232 /* offsetof(struct pt_regs, fr[13]) */
6.181 ++#define PT_FR14 240 /* offsetof(struct pt_regs, fr[14]) */
6.182 ++#define PT_FR15 248 /* offsetof(struct pt_regs, fr[15]) */
6.183 ++#define PT_FR16 256 /* offsetof(struct pt_regs, fr[16]) */
6.184 ++#define PT_FR17 264 /* offsetof(struct pt_regs, fr[17]) */
6.185 ++#define PT_FR18 272 /* offsetof(struct pt_regs, fr[18]) */
6.186 ++#define PT_FR19 280 /* offsetof(struct pt_regs, fr[19]) */
6.187 ++#define PT_FR20 288 /* offsetof(struct pt_regs, fr[20]) */
6.188 ++#define PT_FR21 296 /* offsetof(struct pt_regs, fr[21]) */
6.189 ++#define PT_FR22 304 /* offsetof(struct pt_regs, fr[22]) */
6.190 ++#define PT_FR23 312 /* offsetof(struct pt_regs, fr[23]) */
6.191 ++#define PT_FR24 320 /* offsetof(struct pt_regs, fr[24]) */
6.192 ++#define PT_FR25 328 /* offsetof(struct pt_regs, fr[25]) */
6.193 ++#define PT_FR26 336 /* offsetof(struct pt_regs, fr[26]) */
6.194 ++#define PT_FR27 344 /* offsetof(struct pt_regs, fr[27]) */
6.195 ++#define PT_FR28 352 /* offsetof(struct pt_regs, fr[28]) */
6.196 ++#define PT_FR29 360 /* offsetof(struct pt_regs, fr[29]) */
6.197 ++#define PT_FR30 368 /* offsetof(struct pt_regs, fr[30]) */
6.198 ++#define PT_FR31 376 /* offsetof(struct pt_regs, fr[31]) */
6.199 ++#define PT_SR0 384 /* offsetof(struct pt_regs, sr[ 0]) */
6.200 ++#define PT_SR1 388 /* offsetof(struct pt_regs, sr[ 1]) */
6.201 ++#define PT_SR2 392 /* offsetof(struct pt_regs, sr[ 2]) */
6.202 ++#define PT_SR3 396 /* offsetof(struct pt_regs, sr[ 3]) */
6.203 ++#define PT_SR4 400 /* offsetof(struct pt_regs, sr[ 4]) */
6.204 ++#define PT_SR5 404 /* offsetof(struct pt_regs, sr[ 5]) */
6.205 ++#define PT_SR6 408 /* offsetof(struct pt_regs, sr[ 6]) */
6.206 ++#define PT_SR7 412 /* offsetof(struct pt_regs, sr[ 7]) */
6.207 ++#define PT_IASQ0 416 /* offsetof(struct pt_regs, iasq[0]) */
6.208 ++#define PT_IASQ1 420 /* offsetof(struct pt_regs, iasq[1]) */
6.209 ++#define PT_IAOQ0 424 /* offsetof(struct pt_regs, iaoq[0]) */
6.210 ++#define PT_IAOQ1 428 /* offsetof(struct pt_regs, iaoq[1]) */
6.211 ++#define PT_CR27 432 /* offsetof(struct pt_regs, cr27) */
6.212 ++#define PT_ORIG_R28 440 /* offsetof(struct pt_regs, orig_r28) */
6.213 ++#define PT_KSP 444 /* offsetof(struct pt_regs, ksp) */
6.214 ++#define PT_KPC 448 /* offsetof(struct pt_regs, kpc) */
6.215 ++#define PT_SAR 452 /* offsetof(struct pt_regs, sar) */
6.216 ++#define PT_IIR 456 /* offsetof(struct pt_regs, iir) */
6.217 ++#define PT_ISR 460 /* offsetof(struct pt_regs, isr) */
6.218 ++#define PT_IOR 464 /* offsetof(struct pt_regs, ior) */
6.219 ++#define PT_SIZE 472 /* sizeof(struct pt_regs) */
6.220 ++#define PT_SZ_ALGN 576 /* align(sizeof(struct pt_regs), 64) */
6.221 ++
6.222 ++#define TI_TASK 0 /* offsetof(struct thread_info, task) */
6.223 ++#define TI_EXEC_DOMAIN 4 /* offsetof(struct thread_info, exec_domain) */
6.224 ++#define TI_FLAGS 8 /* offsetof(struct thread_info, flags) */
6.225 ++#define TI_CPU 16 /* offsetof(struct thread_info, cpu) */
6.226 ++#define TI_SEGMENT 12 /* offsetof(struct thread_info, addr_limit) */
6.227 ++#define TI_PRE_COUNT 20 /* offsetof(struct thread_info, preempt_count) */
6.228 ++#define THREAD_SZ 44 /* sizeof(struct thread_info) */
6.229 ++#define THREAD_SZ_ALGN 128 /* align(sizeof(struct thread_info), 64) */
6.230 ++
6.231 ++#define IRQSTAT_SIRQ_PEND 0 /* offsetof(irq_cpustat_t, __softirq_pending) */
6.232 ++#define IRQSTAT_SZ 64 /* sizeof(irq_cpustat_t) */
6.233 ++
6.234 ++#define ICACHE_BASE 8 /* offsetof(struct pdc_cache_info, ic_base) */
6.235 ++#define ICACHE_STRIDE 12 /* offsetof(struct pdc_cache_info, ic_stride) */
6.236 ++#define ICACHE_COUNT 16 /* offsetof(struct pdc_cache_info, ic_count) */
6.237 ++#define ICACHE_LOOP 20 /* offsetof(struct pdc_cache_info, ic_loop) */
6.238 ++#define DCACHE_BASE 32 /* offsetof(struct pdc_cache_info, dc_base) */
6.239 ++#define DCACHE_STRIDE 36 /* offsetof(struct pdc_cache_info, dc_stride) */
6.240 ++#define DCACHE_COUNT 40 /* offsetof(struct pdc_cache_info, dc_count) */
6.241 ++#define DCACHE_LOOP 44 /* offsetof(struct pdc_cache_info, dc_loop) */
6.242 ++#define ITLB_SID_BASE 56 /* offsetof(struct pdc_cache_info, it_sp_base) */
6.243 ++#define ITLB_SID_STRIDE 60 /* offsetof(struct pdc_cache_info, it_sp_stride) */
6.244 ++#define ITLB_SID_COUNT 64 /* offsetof(struct pdc_cache_info, it_sp_count) */
6.245 ++#define ITLB_OFF_BASE 68 /* offsetof(struct pdc_cache_info, it_off_base) */
6.246 ++#define ITLB_OFF_STRIDE 72 /* offsetof(struct pdc_cache_info, it_off_stride) */
6.247 ++#define ITLB_OFF_COUNT 76 /* offsetof(struct pdc_cache_info, it_off_count) */
6.248 ++#define ITLB_LOOP 80 /* offsetof(struct pdc_cache_info, it_loop) */
6.249 ++#define DTLB_SID_BASE 92 /* offsetof(struct pdc_cache_info, dt_sp_base) */
6.250 ++#define DTLB_SID_STRIDE 96 /* offsetof(struct pdc_cache_info, dt_sp_stride) */
6.251 ++#define DTLB_SID_COUNT 100 /* offsetof(struct pdc_cache_info, dt_sp_count) */
6.252 ++#define DTLB_OFF_BASE 104 /* offsetof(struct pdc_cache_info, dt_off_base) */
6.253 ++#define DTLB_OFF_STRIDE 108 /* offsetof(struct pdc_cache_info, dt_off_stride) */
6.254 ++#define DTLB_OFF_COUNT 112 /* offsetof(struct pdc_cache_info, dt_off_count) */
6.255 ++#define DTLB_LOOP 116 /* offsetof(struct pdc_cache_info, dt_loop) */
6.256 ++
6.257 ++#define PA_BLOCKSTEP_BIT 1 /* 31-PT_BLOCKSTEP_BIT */
6.258 ++#define PA_SINGLESTEP_BIT 0 /* 31-PT_SINGLESTEP_BIT */
6.259 ++
6.260 ++#define ASM_PMD_SHIFT 21 /* PMD_SHIFT */
6.261 ++#define ASM_PGDIR_SHIFT 21 /* PGDIR_SHIFT */
6.262 ++#define ASM_BITS_PER_PGD 11 /* BITS_PER_PGD */
6.263 ++#define ASM_BITS_PER_PMD 0 /* BITS_PER_PMD */
6.264 ++#define ASM_BITS_PER_PTE 9 /* BITS_PER_PTE */
6.265 ++#define ASM_PGD_PMD_OFFSET -8192 /* -(PAGE_SIZE << PGD_ORDER) */
6.266 ++#define ASM_PMD_ENTRY 128 /* ((PAGE_OFFSET & PMD_MASK) >> PMD_SHIFT) */
6.267 ++#define ASM_PGD_ENTRY 128 /* PAGE_OFFSET >> PGDIR_SHIFT */
6.268 ++#define ASM_PGD_ENTRY_SIZE 4 /* PGD_ENTRY_SIZE */
6.269 ++#define ASM_PMD_ENTRY_SIZE 4 /* PMD_ENTRY_SIZE */
6.270 ++#define ASM_PTE_ENTRY_SIZE 8 /* PTE_ENTRY_SIZE */
6.271 ++#define ASM_PT_INITIAL 4 /* PT_INITIAL */
6.272 ++#define ASM_PAGE_SIZE 4096 /* PAGE_SIZE */
6.273 ++
6.274 ++
6.275 ++#endif
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch Tue Jun 17 21:37:27 2008 +0000
7.3 @@ -0,0 +1,52 @@
7.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.7/80_all_gdb-6.5-dwarf-stack-overflow.patch
7.5 +-= BEGIN original header =-
7.6 +http://bugs.gentoo.org/144833
7.7 +
7.8 +for gdb/ChangeLog:
7.9 +2006-08-22 Will Drewry <wad@google.com>
7.10 + Tavis Ormandy <taviso@google.com>
7.11 +
7.12 + * dwarf2read.c (decode_locdesc): Enforce location description stack
7.13 + boundaries.
7.14 + * dwarfread.c (locval): Likewise.
7.15 +
7.16 +-= END original header =-
7.17 +diff -durN gdb-6.7.orig/gdb/dwarf2read.c gdb-6.7/gdb/dwarf2read.c
7.18 +--- gdb-6.7.orig/gdb/dwarf2read.c 2007-09-05 02:51:48.000000000 +0200
7.19 ++++ gdb-6.7/gdb/dwarf2read.c 2008-06-17 23:25:38.000000000 +0200
7.20 +@@ -9061,8 +9061,7 @@
7.21 + callers will only want a very basic result and this can become a
7.22 + complaint.
7.23 +
7.24 +- Note that stack[0] is unused except as a default error return.
7.25 +- Note that stack overflow is not yet handled. */
7.26 ++ Note that stack[0] is unused except as a default error return. */
7.27 +
7.28 + static CORE_ADDR
7.29 + decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
7.30 +@@ -9079,7 +9078,7 @@
7.31 +
7.32 + i = 0;
7.33 + stacki = 0;
7.34 +- stack[stacki] = 0;
7.35 ++ stack[++stacki] = 0;
7.36 +
7.37 + while (i < size)
7.38 + {
7.39 +@@ -9261,6 +9260,16 @@
7.40 + dwarf_stack_op_name (op));
7.41 + return (stack[stacki]);
7.42 + }
7.43 ++ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing
7.44 ++ outside of the allocated space. Also enforce minimum > 0.
7.45 ++ -- wad@google.com 14 Aug 2006 */
7.46 ++ if (stacki >= sizeof (stack) / sizeof (*stack) - 1)
7.47 ++ internal_error (__FILE__, __LINE__,
7.48 ++ _("location description stack too deep: %d"),
7.49 ++ stacki);
7.50 ++ if (stacki <= 0)
7.51 ++ internal_error (__FILE__, __LINE__,
7.52 ++ _("location description stack too shallow"));
7.53 + }
7.54 + return (stack[stacki]);
7.55 + }
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/patches/gdb/6.8/100-gdb-6.5-dwarf-stack-overflow.patch Tue Jun 17 21:37:27 2008 +0000
8.3 @@ -0,0 +1,52 @@
8.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/80_all_gdb-6.5-dwarf-stack-overflow.patch
8.5 +-= BEGIN original header =-
8.6 +http://bugs.gentoo.org/144833
8.7 +
8.8 +for gdb/ChangeLog:
8.9 +2006-08-22 Will Drewry <wad@google.com>
8.10 + Tavis Ormandy <taviso@google.com>
8.11 +
8.12 + * dwarf2read.c (decode_locdesc): Enforce location description stack
8.13 + boundaries.
8.14 + * dwarfread.c (locval): Likewise.
8.15 +
8.16 +-= END original header =-
8.17 +diff -durN gdb-6.8.orig/gdb/dwarf2read.c gdb-6.8/gdb/dwarf2read.c
8.18 +--- gdb-6.8.orig/gdb/dwarf2read.c 2008-03-10 15:18:10.000000000 +0100
8.19 ++++ gdb-6.8/gdb/dwarf2read.c 2008-06-17 16:07:31.000000000 +0200
8.20 +@@ -9124,8 +9124,7 @@
8.21 + callers will only want a very basic result and this can become a
8.22 + complaint.
8.23 +
8.24 +- Note that stack[0] is unused except as a default error return.
8.25 +- Note that stack overflow is not yet handled. */
8.26 ++ Note that stack[0] is unused except as a default error return. */
8.27 +
8.28 + static CORE_ADDR
8.29 + decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
8.30 +@@ -9142,7 +9141,7 @@
8.31 +
8.32 + i = 0;
8.33 + stacki = 0;
8.34 +- stack[stacki] = 0;
8.35 ++ stack[++stacki] = 0;
8.36 +
8.37 + while (i < size)
8.38 + {
8.39 +@@ -9324,6 +9323,16 @@
8.40 + dwarf_stack_op_name (op));
8.41 + return (stack[stacki]);
8.42 + }
8.43 ++ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing
8.44 ++ outside of the allocated space. Also enforce minimum > 0.
8.45 ++ -- wad@google.com 14 Aug 2006 */
8.46 ++ if (stacki >= sizeof (stack) / sizeof (*stack) - 1)
8.47 ++ internal_error (__FILE__, __LINE__,
8.48 ++ _("location description stack too deep: %d"),
8.49 ++ stacki);
8.50 ++ if (stacki <= 0)
8.51 ++ internal_error (__FILE__, __LINE__,
8.52 ++ _("location description stack too shallow"));
8.53 + }
8.54 + return (stack[stacki]);
8.55 + }
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/patches/gdb/6.8/150-gdb-6.3-security-errata-20050610.patch Tue Jun 17 21:37:27 2008 +0000
9.3 @@ -0,0 +1,205 @@
9.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/35_all_gdb-6.3-security-errata-20050610.patch
9.5 +-= BEGIN original header =-
9.6 +2005-06-09 Jeff Johnston <jjohnstn@redhat.com>
9.7 +
9.8 + * gdb.base/gdbinit.exp: New testcase.
9.9 + * gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp.
9.10 +
9.11 +2005-06-08 Daniel Jacobowitz <dan@codesourcery.com>
9.12 + Jeff Johnston <jjohnstn@redhat.com>
9.13 +
9.14 + * Makefile.in (cli-cmds.o): Update.
9.15 + * configure.in: Add check for getuid.
9.16 + * configure: Regenerated.
9.17 + * config.in: Ditto.
9.18 + * main.c (captured_main): Pass -1 to source_command when loading
9.19 + gdbinit files.
9.20 + * cli/cli-cmds.c: Include "gdb_stat.h" and <fcntl.h>.
9.21 + (source_command): Update documentation. Check permissions if
9.22 + FROM_TTY is -1.
9.23 +
9.24 +-= END original header =-
9.25 +diff -durN gdb-6.8.orig/gdb/Makefile.in gdb-6.8/gdb/Makefile.in
9.26 +--- gdb-6.8.orig/gdb/Makefile.in 2008-03-17 13:15:08.000000000 +0100
9.27 ++++ gdb-6.8/gdb/Makefile.in 2008-06-17 16:07:33.000000000 +0200
9.28 +@@ -3004,7 +3004,7 @@
9.29 + $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \
9.30 + $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \
9.31 + $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \
9.32 +- $(tui_h)
9.33 ++ $(tui_h) $(gdb_stat_h)
9.34 + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
9.35 + cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
9.36 + $(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \
9.37 +diff -durN gdb-6.8.orig/gdb/cli/cli-cmds.c gdb-6.8/gdb/cli/cli-cmds.c
9.38 +--- gdb-6.8.orig/gdb/cli/cli-cmds.c 2008-01-01 23:53:14.000000000 +0100
9.39 ++++ gdb-6.8/gdb/cli/cli-cmds.c 2008-06-17 16:07:33.000000000 +0200
9.40 +@@ -36,6 +36,7 @@
9.41 + #include "objfiles.h"
9.42 + #include "source.h"
9.43 + #include "disasm.h"
9.44 ++#include "gdb_stat.h"
9.45 +
9.46 + #include "ui-out.h"
9.47 +
9.48 +@@ -459,12 +460,31 @@
9.49 +
9.50 + if (fd == -1)
9.51 + {
9.52 +- if (from_tty)
9.53 ++ if (from_tty > 0)
9.54 + perror_with_name (file);
9.55 + else
9.56 + return;
9.57 + }
9.58 +
9.59 ++#ifdef HAVE_GETUID
9.60 ++ if (from_tty == -1)
9.61 ++ {
9.62 ++ struct stat statbuf;
9.63 ++ if (fstat (fd, &statbuf) < 0)
9.64 ++ {
9.65 ++ perror_with_name (file);
9.66 ++ close (fd);
9.67 ++ return;
9.68 ++ }
9.69 ++ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH))
9.70 ++ {
9.71 ++ warning (_("not using untrusted file \"%s\""), file);
9.72 ++ close (fd);
9.73 ++ return;
9.74 ++ }
9.75 ++ }
9.76 ++#endif
9.77 ++
9.78 + stream = fdopen (fd, FOPEN_RT);
9.79 + script_from_file (stream, file);
9.80 +
9.81 +diff -durN gdb-6.8.orig/gdb/main.c gdb-6.8/gdb/main.c
9.82 +--- gdb-6.8.orig/gdb/main.c 2008-01-05 17:49:53.000000000 +0100
9.83 ++++ gdb-6.8/gdb/main.c 2008-06-17 16:07:33.000000000 +0200
9.84 +@@ -690,7 +690,7 @@
9.85 +
9.86 + if (!inhibit_gdbinit)
9.87 + {
9.88 +- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL);
9.89 ++ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL);
9.90 + }
9.91 +
9.92 + /* Do stats; no need to do them elsewhere since we'll only
9.93 +@@ -778,7 +778,7 @@
9.94 + || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
9.95 + if (!inhibit_gdbinit)
9.96 + {
9.97 +- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL);
9.98 ++ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL);
9.99 + }
9.100 +
9.101 + for (i = 0; i < ncmd; i++)
9.102 +diff -durN gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.exp gdb-6.8/gdb/testsuite/gdb.base/gdbinit.exp
9.103 +--- gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.exp 1970-01-01 01:00:00.000000000 +0100
9.104 ++++ gdb-6.8/gdb/testsuite/gdb.base/gdbinit.exp 2008-06-17 16:07:33.000000000 +0200
9.105 +@@ -0,0 +1,98 @@
9.106 ++# Copyright 2005
9.107 ++# Free Software Foundation, Inc.
9.108 ++
9.109 ++# This program is free software; you can redistribute it and/or modify
9.110 ++# it under the terms of the GNU General Public License as published by
9.111 ++# the Free Software Foundation; either version 2 of the License, or
9.112 ++# (at your option) any later version.
9.113 ++#
9.114 ++# This program is distributed in the hope that it will be useful,
9.115 ++# but WITHOUT ANY WARRANTY; without even the implied warranty of
9.116 ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9.117 ++# GNU General Public License for more details.
9.118 ++#
9.119 ++# You should have received a copy of the GNU General Public License
9.120 ++# along with this program; if not, write to the Free Software
9.121 ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9.122 ++
9.123 ++# Please email any bugs, comments, and/or additions to this file to:
9.124 ++# bug-gdb@prep.ai.mit.edu
9.125 ++
9.126 ++# This file was written by Jeff Johnston <jjohnstn@redhat.com>.
9.127 ++
9.128 ++if $tracelevel then {
9.129 ++ strace $tracelevel
9.130 ++}
9.131 ++
9.132 ++set prms_id 0
9.133 ++set bug_id 0
9.134 ++
9.135 ++# are we on a target board
9.136 ++if [is_remote target] {
9.137 ++ return
9.138 ++}
9.139 ++
9.140 ++
9.141 ++global verbose
9.142 ++global GDB
9.143 ++global GDBFLAGS
9.144 ++global gdb_prompt
9.145 ++global timeout
9.146 ++global gdb_spawn_id;
9.147 ++
9.148 ++gdb_stop_suppressing_tests;
9.149 ++
9.150 ++verbose "Spawning $GDB -nw"
9.151 ++
9.152 ++if [info exists gdb_spawn_id] {
9.153 ++ return 0;
9.154 ++}
9.155 ++
9.156 ++if ![is_remote host] {
9.157 ++ if { [which $GDB] == 0 } then {
9.158 ++ perror "$GDB does not exist."
9.159 ++ exit 1
9.160 ++ }
9.161 ++}
9.162 ++
9.163 ++set env(HOME) [pwd]
9.164 ++remote_exec build "rm .gdbinit"
9.165 ++remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit"
9.166 ++remote_exec build "chmod 646 .gdbinit"
9.167 ++
9.168 ++set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
9.169 ++if { $res < 0 || $res == "" } {
9.170 ++ perror "Spawning $GDB failed."
9.171 ++ return 1;
9.172 ++}
9.173 ++gdb_expect 360 {
9.174 ++ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
9.175 ++ pass "untrusted .gdbinit caught."
9.176 ++ }
9.177 ++ -re "$gdb_prompt $" {
9.178 ++ fail "untrusted .gdbinit caught."
9.179 ++ }
9.180 ++ timeout {
9.181 ++ fail "(timeout) untrusted .gdbinit caught."
9.182 ++ }
9.183 ++}
9.184 ++
9.185 ++remote_exec build "chmod 644 .gdbinit"
9.186 ++set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
9.187 ++if { $res < 0 || $res == "" } {
9.188 ++ perror "Spawning $GDB failed."
9.189 ++ return 1;
9.190 ++}
9.191 ++gdb_expect 360 {
9.192 ++ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
9.193 ++ fail "trusted .gdbinit allowed."
9.194 ++ }
9.195 ++ -re "in gdbinit.*$gdb_prompt $" {
9.196 ++ pass "trusted .gdbinit allowed."
9.197 ++ }
9.198 ++ timeout {
9.199 ++ fail "(timeout) trusted .gdbinit allowed."
9.200 ++ }
9.201 ++}
9.202 ++
9.203 ++remote_exec build "rm .gdbinit"
9.204 +diff -durN gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.sample gdb-6.8/gdb/testsuite/gdb.base/gdbinit.sample
9.205 +--- gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.sample 1970-01-01 01:00:00.000000000 +0100
9.206 ++++ gdb-6.8/gdb/testsuite/gdb.base/gdbinit.sample 2008-06-17 16:07:33.000000000 +0200
9.207 +@@ -0,0 +1 @@
9.208 ++echo "\nin gdbinit"
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/patches/gdb/6.8/200-gdb-tdep-opcode-include-workaround.patch Tue Jun 17 21:37:27 2008 +0000
10.3 @@ -0,0 +1,33 @@
10.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/20_all_gdb-tdep-opcode-include-workaround.patch
10.5 +-= BEGIN original header =-
10.6 +workaround build failure
10.7 +
10.8 +http://bugs.gentoo.org/216368
10.9 +
10.10 +-= END original header =-
10.11 +diff -durN gdb-6.8.orig/gdb/frv-tdep.c gdb-6.8/gdb/frv-tdep.c
10.12 +--- gdb-6.8.orig/gdb/frv-tdep.c 2008-01-11 14:19:59.000000000 +0100
10.13 ++++ gdb-6.8/gdb/frv-tdep.c 2008-06-17 16:07:34.000000000 +0200
10.14 +@@ -32,7 +32,7 @@
10.15 + #include "gdb_assert.h"
10.16 + #include "sim-regno.h"
10.17 + #include "gdb/sim-frv.h"
10.18 +-#include "opcodes/frv-desc.h" /* for the H_SPR_... enums */
10.19 ++#include "../opcodes/frv-desc.h" /* for the H_SPR_... enums */
10.20 + #include "symtab.h"
10.21 + #include "elf-bfd.h"
10.22 + #include "elf/frv.h"
10.23 +diff -durN gdb-6.8.orig/gdb/mep-tdep.c gdb-6.8/gdb/mep-tdep.c
10.24 +--- gdb-6.8.orig/gdb/mep-tdep.c 2008-01-11 14:20:02.000000000 +0100
10.25 ++++ gdb-6.8/gdb/mep-tdep.c 2008-06-17 16:07:34.000000000 +0200
10.26 +@@ -53,8 +53,8 @@
10.27 +
10.28 + /* Get the user's customized MeP coprocessor register names from
10.29 + libopcodes. */
10.30 +-#include "opcodes/mep-desc.h"
10.31 +-#include "opcodes/mep-opc.h"
10.32 ++#include "../opcodes/mep-desc.h"
10.33 ++#include "../opcodes/mep-opc.h"
10.34 +
10.35 +
10.36 + /* The gdbarch_tdep structure. */