openSUSE Commits
Threads by month
- ----- 2024 -----
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2009
- 1 participants
- 754 discussions
Hello community,
here is the log from the commit of package yast2-core for openSUSE:Factory
checked in at Tue May 5 01:02:14 CEST 2009.
--------
--- yast2-core/yast2-core.changes 2009-04-27 16:10:56.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-core/yast2-core.changes 2009-05-04 19:33:20.000000000 +0200
@@ -1,0 +2,7 @@
+Mon May 4 17:28:28 CEST 2009 - lslezak(a)suse.cz
+
+- SCR DBus service - fixed DBus object registration, fixed creating
+ the PolicyKit action ID
+- 2.18.10
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-core-2.18.9.tar.bz2
New:
----
yast2-core-2.18.10.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-core.spec ++++++
--- /var/tmp/diff_new_pack.B15805/_old 2009-05-05 01:01:45.000000000 +0200
+++ /var/tmp/diff_new_pack.B15805/_new 2009-05-05 01:01:45.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-core (Version 2.18.9)
+# spec file for package yast2-core (Version 2.18.10)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-core
-Version: 2.18.9
+Version: 2.18.10
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-core-2.18.9.tar.bz2
+Source0: yast2-core-2.18.10.tar.bz2
Prefix: /usr
# obviously
BuildRequires: gcc-c++
@@ -95,7 +95,7 @@
Stanislav Visnovsky <visnov(a)suse.cz>
%prep
-%setup -n yast2-core-2.18.9
+%setup -n yast2-core-2.18.10
%build
%{prefix}/bin/y2tool y2autoconf
@@ -190,6 +190,10 @@
%doc %{_datadir}/doc/yastdoc
/usr/share/YaST2/data/devtools/bin/generateYCPWrappers
%changelog
+* Mon May 04 2009 lslezak(a)suse.cz
+- SCR DBus service - fixed DBus object registration, fixed creating
+ the PolicyKit action ID
+- 2.18.10
* Mon Apr 27 2009 mvidner(a)suse.cz
- Resurrected logging in the signal handler, into
/var/log/YaST2/signal (or ./y2signal.log) (bnc#493152#c33).
++++++ yast2-core-2.18.9.tar.bz2 -> yast2-core-2.18.10.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/aclocal.m4 new/yast2-core-2.18.10/aclocal.m4
--- old/yast2-core-2.18.9/aclocal.m4 2009-04-27 15:53:10.000000000 +0200
+++ new/yast2-core-2.18.10/aclocal.m4 2009-05-04 18:56:13.000000000 +0200
@@ -19,162 +19,6 @@
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-#
-# Copyright © 2004 Scott James Remnant <scott(a)netsplit.com>.
-#
-# 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.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=m4_default([$1], [0.9.0])
- AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- PKG_CONFIG=""
- fi
-
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists. Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
- AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
- m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
- $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
- pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
- PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
- [pkg_failed=yes])
- else
- pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
- _PKG_SHORT_ERRORS_SUPPORTED
- if test $_pkg_short_errors_supported = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
- else
- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
- ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
- [AC_MSG_RESULT([no])
- $4])
-elif test $pkg_failed = untried; then
- ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
- [$4])
-else
- $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
- $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
- AC_MSG_RESULT([yes])
- ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -1060,6 +904,162 @@
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott(a)netsplit.com>.
+#
+# 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
dnl check for docbook -*- autoconf -*-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agent-modules/conf/modprobe_blacklist.scr new/yast2-core-2.18.10/agent-modules/conf/modprobe_blacklist.scr
--- old/yast2-core-2.18.9/agent-modules/conf/modprobe_blacklist.scr 2009-04-06 13:00:18.000000000 +0200
+++ new/yast2-core-2.18.10/agent-modules/conf/modprobe_blacklist.scr 2009-04-29 12:58:11.000000000 +0200
@@ -1,5 +1,5 @@
/**
- * $Id$
+ * $Id: modprobe_blacklist.scr 57028 2009-04-29 10:58:09Z lslezak $
* File: modprobe_blacklist.scr
* Summary: SCR agent for accessing /etc/modprobe.d/blacklist file
* Authors: Ladislav Slezák <lslezak(a)novell.com>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agent-modules/testsuite/tests/dir.scr new/yast2-core-2.18.10/agent-modules/testsuite/tests/dir.scr
--- old/yast2-core-2.18.9/agent-modules/testsuite/tests/dir.scr 2009-04-27 13:31:18.000000000 +0200
+++ new/yast2-core-2.18.10/agent-modules/testsuite/tests/dir.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/dir.in.test")
-)
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agent-modules/testsuite/tests/missing.scr new/yast2-core-2.18.10/agent-modules/testsuite/tests/missing.scr
--- old/yast2-core-2.18.9/agent-modules/testsuite/tests/missing.scr 2009-04-27 13:31:17.000000000 +0200
+++ new/yast2-core-2.18.10/agent-modules/testsuite/tests/missing.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/missing.in.test")
-)
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agent-modules/testsuite/tests/read1.scr new/yast2-core-2.18.10/agent-modules/testsuite/tests/read1.scr
--- old/yast2-core-2.18.9/agent-modules/testsuite/tests/read1.scr 2009-04-27 13:31:17.000000000 +0200
+++ new/yast2-core-2.18.10/agent-modules/testsuite/tests/read1.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/read1.in.test")
-)
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agent-modules/testsuite/tests/write1.scr new/yast2-core-2.18.10/agent-modules/testsuite/tests/write1.scr
--- old/yast2-core-2.18.9/agent-modules/testsuite/tests/write1.scr 2009-04-27 13:31:19.000000000 +0200
+++ new/yast2-core-2.18.10/agent-modules/testsuite/tests/write1.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/write1.in.test")
-)
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agent-modules/testsuite/tests/write2.scr new/yast2-core-2.18.10/agent-modules/testsuite/tests/write2.scr
--- old/yast2-core-2.18.9/agent-modules/testsuite/tests/write2.scr 2009-04-27 13:31:10.000000000 +0200
+++ new/yast2-core-2.18.10/agent-modules/testsuite/tests/write2.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/write2.in.test")
-)
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agent-modules/testsuite/tests/write3.scr new/yast2-core-2.18.10/agent-modules/testsuite/tests/write3.scr
--- old/yast2-core-2.18.9/agent-modules/testsuite/tests/write3.scr 2009-04-27 13:31:18.000000000 +0200
+++ new/yast2-core-2.18.10/agent-modules/testsuite/tests/write3.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/write3.in.test")
-)
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agent-process/conf/process.scr new/yast2-core-2.18.10/agent-process/conf/process.scr
--- old/yast2-core-2.18.9/agent-process/conf/process.scr 2008-03-12 13:57:07.000000000 +0100
+++ new/yast2-core-2.18.10/agent-process/conf/process.scr 2009-04-29 12:58:11.000000000 +0200
@@ -5,7 +5,7 @@
* Access: read / write / execute
* See: anyagent libscr MANPAGE(1) file/relative/to/doc_home/file.html
*
- * $Id$
+ * $Id: process.scr 57028 2009-04-29 10:58:09Z lslezak $
*
* Examples:
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agent-process/src/Process.h new/yast2-core-2.18.10/agent-process/src/Process.h
--- old/yast2-core-2.18.9/agent-process/src/Process.h 2008-12-22 12:58:28.000000000 +0100
+++ new/yast2-core-2.18.10/agent-process/src/Process.h 2009-04-29 13:04:20.000000000 +0200
@@ -23,7 +23,7 @@
*
* Authors: Ladislav Slezák <lslezak(a)novell.com>
*
- * $Id:$
+ * $Id: Process.h 57029 2009-04-29 11:04:19Z lslezak $
*/
#ifndef Process_h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/agents-perl/doc/ycp-pm-pod.html new/yast2-core-2.18.10/agents-perl/doc/ycp-pm-pod.html
--- old/yast2-core-2.18.9/agents-perl/doc/ycp-pm-pod.html 2009-01-26 14:04:49.000000000 +0100
+++ new/yast2-core-2.18.10/agents-perl/doc/ycp-pm-pod.html 2009-04-10 10:03:42.000000000 +0200
@@ -4,7 +4,7 @@
<head>
<title>ycp - a Perl module for parsing and writing the YaST2 Communication Protocol</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:root@localhost" />
+<link rev="made" href="mailto:feedback@suse.de" />
</head>
<body style="background-color: white">
@@ -104,31 +104,36 @@
<p>A PerlYCPValue cannot represent a term but only a term is allowed
to initialize an agent in a .scr file. Therefore <a href="#parseterm">ParseTerm</a> is provided.</p>
<dl>
-<dt><strong><a name="string_integer_boolean" class="item">string, integer, boolean</a></strong></dt>
+<dt><strong><a name="string_integer_boolean" class="item">string, integer, boolean</a></strong>
<dd>
<p>Stored as a scalar.</p>
</dd>
-<dt><strong><a name="list" class="item">list</a></strong></dt>
+</li>
+<dt><strong><a name="list" class="item">list</a></strong>
<dd>
<p>Stored as a reference to a list of PerlYCPValues.</p>
</dd>
-<dt><strong><a name="map" class="item">map</a></strong></dt>
+</li>
+<dt><strong><a name="map" class="item">map</a></strong>
<dd>
<p>Stored as a reference to a map of PerlYCPValues.</p>
</dd>
-<dt><strong><a name="path" class="item">path</a></strong></dt>
+</li>
+<dt><strong><a name="path" class="item">path</a></strong>
<dd>
<p>Stored as a reference to a string (starting with a "." as expected).</p>
</dd>
-<dt><strong><a name="nil" class="item">nil (void)</a></strong></dt>
+</li>
+<dt><strong><a name="nil" class="item">nil (void)</a></strong>
<dd>
<p>Stored as an undef.</p>
</dd>
+</li>
</dl>
<p>
</p>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/base/tools/tty_wrapper/tty_wrapper.cc new/yast2-core-2.18.10/base/tools/tty_wrapper/tty_wrapper.cc
--- old/yast2-core-2.18.9/base/tools/tty_wrapper/tty_wrapper.cc 2009-04-27 15:44:26.000000000 +0200
+++ new/yast2-core-2.18.10/base/tools/tty_wrapper/tty_wrapper.cc 2009-04-29 13:04:20.000000000 +0200
@@ -20,7 +20,7 @@
*/
/*
- File: $Id:$
+ File: $Id: tty_wrapper.cc 57029 2009-04-29 11:04:19Z lslezak $
Author: Ladislav Slezák <lslezak(a)novell.com>
Summary: This is a generic tty wrapper
Description: Starts a subprocess with a new internal tty input/output
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/configure new/yast2-core-2.18.10/configure
--- old/yast2-core-2.18.9/configure 2009-04-27 15:53:14.000000000 +0200
+++ new/yast2-core-2.18.10/configure 2009-05-04 18:56:16.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-core 2.18.9.
+# Generated by GNU Autoconf 2.63 for yast2-core 2.18.10.
#
# Report bugs to <http://bugs.opensuse.org/>.
#
@@ -745,8 +745,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-core'
PACKAGE_TARNAME='yast2-core'
-PACKAGE_VERSION='2.18.9'
-PACKAGE_STRING='yast2-core 2.18.9'
+PACKAGE_VERSION='2.18.10'
+PACKAGE_STRING='yast2-core 2.18.10'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1567,7 +1567,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-core 2.18.9 to adapt to many kinds of systems.
+\`configure' configures yast2-core 2.18.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1638,7 +1638,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-core 2.18.9:";;
+ short | recursive ) echo "Configuration of yast2-core 2.18.10:";;
esac
cat <<\_ACEOF
@@ -1755,7 +1755,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-core configure 2.18.9
+yast2-core configure 2.18.10
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1769,7 +1769,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-core $as_me 2.18.9, which was
+It was created by yast2-core $as_me 2.18.10, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2616,7 +2616,7 @@
# Define the identity of the package.
PACKAGE='yast2-core'
- VERSION='2.18.9'
+ VERSION='2.18.10'
cat >>confdefs.h <<_ACEOF
@@ -2840,7 +2840,7 @@
-VERSION="2.18.9"
+VERSION="2.18.10"
RPMNAME="yast2-core"
MAINTAINER="Martin Vidner <mvidner(a)suse.cz>"
@@ -19983,7 +19983,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-core $as_me 2.18.9, which was
+This file was extended by yast2-core $as_me 2.18.10, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20046,7 +20046,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-core config.status 2.18.9
+yast2-core config.status 2.18.10
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/configure.in new/yast2-core-2.18.10/configure.in
--- old/yast2-core-2.18.9/configure.in 2009-04-27 15:52:54.000000000 +0200
+++ new/yast2-core-2.18.10/configure.in 2009-05-04 18:55:59.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-core
dnl
-dnl -- This file is generated by y2autoconf 2.18.3 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-core, 2.18.9, http://bugs.opensuse.org/, yast2-core)
+AC_INIT(yast2-core, 2.18.10, http://bugs.opensuse.org/, yast2-core)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.18.9"
+VERSION="2.18.10"
RPMNAME="yast2-core"
MAINTAINER="Martin Vidner <mvidner(a)suse.cz>"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/dbus/SCR_service/DBusServer.cc new/yast2-core-2.18.10/dbus/SCR_service/DBusServer.cc
--- old/yast2-core-2.18.9/dbus/SCR_service/DBusServer.cc 2009-04-14 12:41:32.000000000 +0200
+++ new/yast2-core-2.18.10/dbus/SCR_service/DBusServer.cc 2009-05-04 18:34:47.000000000 +0200
@@ -61,11 +61,6 @@
std::string object(SCR_OBJECT_PATH);
- if (!object.empty() && object[0] == '/')
- {
- object.erase(object.begin());
- }
-
// register the manager object: register_function(object, interface, method, signature, handler)
register_method(object, YAST_SCR_INTERFACE, METHOD_READ, sig_3param, cb);
register_method(object, YAST_SCR_INTERFACE, METHOD_WRITE, sig_3param, cb);
@@ -142,7 +137,7 @@
check_ok = true;
}
- y2internal("check_ok: %d", check_ok);
+ y2debug("check_ok: %d", check_ok);
if (check_ok)
{
@@ -195,7 +190,7 @@
}
}
- y2internal("Finishing the callback");
+ y2milestone("Finishing the callback");
return reply;
}
@@ -210,22 +205,28 @@
ret.push_back(action_id);
+ YCPValue path = msg.getYCPValue(0);
YCPValue arg = msg.getYCPValue(1);
YCPValue opt = msg.getYCPValue(2);
- std::string arg_str, opt_str;
+ std::string path_str, arg_str, opt_str;
+
+ if (!path.isNull())
+ {
+ path_str = path->toString();
+ }
- if (!arg.isNull())
+ if (!arg.isNull() && arg->isString())
{
- arg_str = arg->toString();
+ arg_str = arg->asString()->value();
}
- if (!opt.isNull())
+ if (!opt.isNull() && opt->isString())
{
- opt_str = opt->toString();
+ opt_str = opt->asString()->value();
}
- action_id = PolKit::createActionId(POLKIT_PREFIX, msg.path(), msg.method(), arg_str, opt_str);
+ action_id = PolKit::createActionId(POLKIT_PREFIX, path_str, msg.method(), arg_str, opt_str);
ret.push_back(action_id);
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/dbus/SCR_service/test_SCR_dbus_server.rb.in new/yast2-core-2.18.10/dbus/SCR_service/test_SCR_dbus_server.rb.in
--- old/yast2-core-2.18.9/dbus/SCR_service/test_SCR_dbus_server.rb.in 2009-03-06 10:30:21.000000000 +0100
+++ new/yast2-core-2.18.10/dbus/SCR_service/test_SCR_dbus_server.rb.in 2009-05-04 17:34:42.000000000 +0200
@@ -26,7 +26,7 @@
# Get the object from this service
# (using the root object of the service, for SCR there's just one)
- objYast = yast.object("/#{yast.root}")
+ objYast = yast.object("/SCR")
assert objYast
# Create a local object for accessing the interface provided by the remote object
@@ -47,7 +47,7 @@
assert yast
# Get the object from this service
- objYast = yast.object("/#{yast.root}")
+ objYast = yast.object("/SCR")
assert objYast
poiSCR = DBus::ProxyObjectInterface.new(objYast, "@YAST_SCR_INTERFACE@")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/liby2dbus/src/DBusServerBase.cc new/yast2-core-2.18.10/liby2dbus/src/DBusServerBase.cc
--- old/yast2-core-2.18.9/liby2dbus/src/DBusServerBase.cc 2009-04-14 12:41:37.000000000 +0200
+++ new/yast2-core-2.18.10/liby2dbus/src/DBusServerBase.cc 2009-05-04 18:52:52.000000000 +0200
@@ -458,6 +458,11 @@
return false;
}
+ if (dbus_error_is_set(err))
+ {
+ dbus_error_free(err);
+ }
+
// check the policy here
if (policykit.isDBusUserAuthorized(*it, msg.sender(), connection.getConnection(), err))
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/Makefile.am new/yast2-core-2.18.10/Makefile.am
--- old/yast2-core-2.18.9/Makefile.am 2009-04-27 15:52:54.000000000 +0200
+++ new/yast2-core-2.18.10/Makefile.am 2009-05-04 18:55:59.000000000 +0200
@@ -32,7 +32,7 @@
# less strict; prefer bzip2
AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip
-# where devtools instal m4 snippets
+# where devtools install m4 snippets
# argh, executed literally
#ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal
ACLOCAL_AMFLAGS = -I . -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/Makefile.in new/yast2-core-2.18.10/Makefile.in
--- old/yast2-core-2.18.9/Makefile.in 2009-04-27 15:53:36.000000000 +0200
+++ new/yast2-core-2.18.10/Makefile.in 2009-05-04 18:56:34.000000000 +0200
@@ -302,7 +302,7 @@
# less strict; prefer bzip2
AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip
-# where devtools instal m4 snippets
+# where devtools install m4 snippets
# argh, executed literally
#ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal
ACLOCAL_AMFLAGS = -I . -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/VERSION new/yast2-core-2.18.10/VERSION
--- old/yast2-core-2.18.9/VERSION 2009-04-27 15:49:38.000000000 +0200
+++ new/yast2-core-2.18.10/VERSION 2009-05-04 18:32:25.000000000 +0200
@@ -1 +1 @@
-2.18.9
+2.18.10
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.18.9/wfm/src/Y2WFMComponent.cc new/yast2-core-2.18.10/wfm/src/Y2WFMComponent.cc
--- old/yast2-core-2.18.9/wfm/src/Y2WFMComponent.cc 2008-09-11 07:45:32.000000000 +0200
+++ new/yast2-core-2.18.10/wfm/src/Y2WFMComponent.cc 2009-05-04 17:28:04.000000000 +0200
@@ -698,7 +698,9 @@
string filename = ee.filename ();
int linenumber = ee.linenumber ();
ycp2milestone (filename.c_str(), linenumber,
- "Calling YaST client %s (arguments: %s)", new_modulename.c_str (), args->toString ().c_str ());
+ "Calling YaST client %s", new_modulename.c_str ());
+ ycp2debug (filename.c_str(), linenumber,
+ "(arguments: %s)", args->toString ().c_str ());
YCPValue result = client_comp->doActualWork (args, NULL);
ee.setFilename (filename);
ee.setLinenumber (linenumber);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package gdb for openSUSE:Factory
checked in at Mon May 4 18:52:54 CEST 2009.
--------
--- gdb/gdb.changes 2009-03-10 11:27:21.000000000 +0100
+++ /mounts/work_src_done/STABLE/gdb/gdb.changes 2009-04-29 15:11:58.000000000 +0200
@@ -1,0 +2,16 @@
+Wed Apr 29 15:11:15 CEST 2009 - rguenther(a)suse.de
+
+- Adjust package name and release to not contain macros.
+
+-------------------------------------------------------------------
+Mon Apr 27 16:18:02 CEST 2009 - rguenther(a)suse.de
+
+- Disable rpm support for locating debug info packages.
+
+-------------------------------------------------------------------
+Mon Apr 27 13:33:06 CEST 2009 - rguenther(a)suse.de
+
+- Switch to Fedora 11 source RPM.
+ * includes partially merge from Archer. [bnc#329420, bnc#497141]
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
baselibs.conf
cell-combined.diff
expand-line-sal-maybe.diff
find-pc-sect-line.diff
find-separate-debug-file.diff
fix-gdb-backtrace.diff
gdb-6.8.50.20090216-cvs.tar.bz2
gdb-6.8-bz377541-vla.patch
gstack.patch
pie-relocate.diff
readnever.patch
sect-index-text.diff
New:
----
gdb-6.3-attach-see-vdso-test.patch
gdb-6.3-bt-past-zero-20051201.patch
gdb-6.3-bz140532-ppc-unwinding-test.patch
gdb-6.3-bz202689-exec-from-pthread-test.patch
gdb-6.3-bz231832-obstack-2gb.patch
gdb-6.3-dtorfix-20050121.patch
gdb-6.3-focus-cmd-prev-test.patch
gdb-6.3-framepczero-20040927.patch
gdb-6.3-gcore-thread-20050204.patch
gdb-6.3-gstack-20050411.patch
gdb-6.3-gstack-without-path-20060414.patch
gdb-6.3-ia64-gcore-page0-20050421.patch
gdb-6.3-ia64-gcore-speedup-20050714.patch
gdb-6.3-ia64-info-frame-fix-20050725.patch
gdb-6.3-ia64-sigill-20051115.patch
gdb-6.3-ia64-sigtramp-fp-20050926.patch
gdb-6.3-ia64-sigtramp-frame-20050708.patch
gdb-6.3-inferior-notification-20050721.patch
gdb-6.3-inheritance-20050324.patch
gdb-6.3-inheritancetest-20050726.patch
gdb-6.3-large-core-20051206.patch
gdb-6.3-linespec-20041213.patch
gdb-6.3-mapping-zero-inode-test.patch
gdb-6.3-nonthreaded-wp-20050117.patch
gdb-6.3-pie-20050110.patch
gdb-6.3-ppc64displaysymbol-20041124.patch
gdb-6.3-ppc64syscall-20040622.patch
gdb-6.3-ppcdotsolib-20041022.patch
gdb-6.3-readnever-20050907.patch
gdb-6.3-removebp-20041130.patch
gdb-6.3-rh-dummykfail-20041202.patch
gdb-6.3-rh-testlibunwind1fix-20041202.patch
gdb-6.3-rh-testlibunwind-20041202.patch
gdb-6.3-rh-testversion-20041202.patch
gdb-6.3-security-errata-20050610.patch
gdb-6.3-sepcrc-20050402.patch
gdb-6.3-step-thread-exit-20050211-test.patch
gdb-6.3-terminal-fix-20050214.patch
gdb-6.3-test-dtorfix-20050121.patch
gdb-6.3-test-movedir-20050125.patch
gdb-6.3-test-pie-20050107.patch
gdb-6.3-test-self-20050110.patch
gdb-6.3-test-sepcrc-20050402.patch
gdb-6.3-threaded-watchpoints2-20050225.patch
gdb-6.3-watchpoint-cond-gone-test.patch
gdb-6.5-BEA-testsuite.patch
gdb-6.5-bz109921-DW_AT_decl_file-test.patch
gdb-6.5-bz181390-memory-address-width.patch
gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
gdb-6.5-bz190810-gdbserver-arch-advice.patch
gdb-6.5-bz203661-emit-relocs.patch
gdb-6.5-bz216711-clone-is-outermost.patch
gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch
gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
gdb-6.5-bz243845-stale-testing-zombie-test.patch
gdb-6.5-dwarf-stack-overflow.patch
gdb-6.5-gcore-buffer-limit-test.patch
gdb-6.5-gcore-i386-on-amd64.patch
gdb-6.5-ia64-libunwind-leak-test.patch
gdb-6.5-last-address-space-byte-test.patch
gdb-6.5-missed-trap-on-step-test.patch
gdb-6.5-readline-long-line-crash.patch
gdb-6.5-readline-long-line-crash-test.patch
gdb-6.5-section-num-fixup-test.patch
gdb-6.5-sharedlibrary-path.patch
gdb-6.5-tls-of-separate-debuginfo.patch
gdb-6.6-buildid-locate.patch
gdb-6.6-buildid-locate-rpm.patch
gdb-6.6-bz225783-gdb-debuginfo-paths.patch
gdb-6.6-bz225783-prelink-path.patch
gdb-6.6-bz229517-gcore-without-terminal.patch
gdb-6.6-bz230000-power6-disassembly-test.patch
gdb-6.6-bz235197-fork-detach-info.patch
gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
gdb-6.6-bz247354-leader-exit-fix.patch
gdb-6.6-bz247354-leader-exit-test.patch
gdb-6.6-gcore32-test.patch
gdb-6.6-multifork-debugreg.patch
gdb-6.6-readline-system.patch
gdb-6.6-scheduler_locking-step-is-default.patch
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
gdb-6.6-step-thread-exit.patch
gdb-6.6-testsuite-timeouts.patch
gdb-6.6-threads-static-test.patch
gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch
gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
gdb-6.7-charsign-test.patch
gdb-6.7-kernel-headers-compat.patch
gdb-6.7-ppc-clobbered-registers-O2-test.patch
gdb-6.7-testsuite-stable-results.patch
gdb-6.8.50.20090302.tar.bz2
gdb-6.8-attach-signalled-detach-stopped.patch
gdb-6.8-bz254229-gcore-prpsinfo.patch
gdb-6.8-bz436037-reg-no-longer-active.patch
gdb-6.8-bz442765-threaded-exec-test.patch
gdb-6.8-bz457187-largefile.patch
gdb-6.8-bz466901-backtrace-full-prelinked.patch
gdb-6.8-constant-watchpoints.patch
gdb-6.8-ctors-dtors-unique.patch
gdb-6.8-fortran-tag-constant.patch
gdb-6.8-gcc35998-ada-memory-trash.patch
gdb-6.8-glibc-headers-compat.patch
gdb-6.8-quit-never-aborts.patch
gdb-6.8-sparc64-silence-memcpy-check.patch
gdb-6.8-tui-singlebinary.patch
gdb-6.8-watchpoint-conditionals-test.patch
gdb-archer.patch
gdb-c_get_string-xfree.patch
gdb-charset-crash.patch
gdb-gstack.man
gdb-orphanripper.c
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gdb.spec ++++++
++++ 799 lines (skipped)
++++ between gdb/gdb.spec
++++ and /mounts/work_src_done/STABLE/gdb/gdb.spec
++++++ gdb-6.3-attach-see-vdso-test.patch ++++++
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/attach-see-vdso.c 6 Jul 2007 14:14:44 -0000
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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. */
+
+#include <unistd.h>
+
+int main ()
+{
+ pause ();
+ return 1;
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/attach-see-vdso.exp 6 Jul 2007 14:14:44 -0000
@@ -0,0 +1,79 @@
+# Copyright 2007
+
+# 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.
+
+# This file was created by Jan Kratochvil <jan.kratochvil(a)redhat.com>.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# This test only works on Linux
+if { ![istarget "*-*-linux-gnu*"] } {
+ return 0
+}
+
+set testfile "attach-see-vdso"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
+
+# The kernel VDSO is used for the syscalls returns only on i386 (not x86_64).
+#
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-m32}] != "" } {
+ gdb_suppress_entire_file "Testcase nonthraded compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+# Start the program running and then wait for a bit, to be sure
+# that it can be attached to.
+
+set testpid [eval exec $binfile &]
+
+# Avoid some race:
+sleep 2
+
+# Start with clean gdb
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+# Never call: gdb_load ${binfile}
+# as the former problem would not reproduce otherwise.
+
+set test "attach"
+gdb_test_multiple "attach $testpid" "$test" {
+ -re "Attaching to process $testpid\r?\n.*$gdb_prompt $" {
+ pass "$test"
+ }
+}
+
+gdb_test "bt" "#0 *0x\[0-9a-f\]* in \[^?\].*" "backtrace decodes VDSO"
+
+# Exit and detach the process.
+
+gdb_exit
+
+# Make sure we don't leave a process around to confuse
+# the next test run (and prevent the compile by keeping
+# the text file busy), in case the "set should_exit" didn't
+# work.
+
+remote_exec build "kill -9 ${testpid}"
++++++ gdb-6.3-bt-past-zero-20051201.patch ++++++
2005-12-01 Jeff Johnston <jjohnstn(a)redhat.com>
* frame.c (backtrace_past_zero_pc): New static variable.
(get_prev_frame): Don't return NULL for zero pc value if
backtrace past-zero-frame option is turned on.
(_initialize_frame): Initialize new command to allow backtracing
past a zero pc value (set backtrace past-zero-pc).
testsuite/gdb.base:
2005-12-01 Jeff Johnston <jjohnstn(a)redhat.com>
* setshow.exp: Add testing of "set backtrace past-zero-pc" option.
2007-10-15 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/testsuite/gdb.base/setshow.exp
===================================================================
--- gdb-6.7.orig/gdb/testsuite/gdb.base/setshow.exp 2007-08-23 20:14:17.000000000 +0200
+++ gdb-6.7/gdb/testsuite/gdb.base/setshow.exp 2007-10-15 21:34:52.000000000 +0200
@@ -106,6 +106,16 @@ if { ![target_info exists use_gdb_stub]
delete_breakpoints
gdb_test "run" "Starting program:.*foo bar blup baz bubble.*" "passing args"
}
+#test show backtrace past-zero-pc
+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "default show backtrace past-zero-pc (off)"
+#test set backtrace past-zero-pc on
+gdb_test "set backtrace past-zero-pc on" "" "set backtrace past-zero-pc on"
+#test show backtrace past-zero-pc
+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is on." "show backtrace past-zero-pc (on)"
+#test set backtrace past-zero-pc off
+gdb_test "set backtrace past-zero-pc off" "" "set backtrace past-zero-pc off"
+#test show backtrace past-zero-pc
+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "show backtrace past-zero-pc (off)"
#test set check range on
gdb_test "set check range on" "" "set check range on"
#test show check range on
Index: gdb-6.7/gdb/frame.c
===================================================================
--- gdb-6.7.orig/gdb/frame.c 2007-10-12 22:35:58.000000000 +0200
+++ gdb-6.7/gdb/frame.c 2007-10-15 21:34:52.000000000 +0200
@@ -133,6 +133,16 @@ Whether backtraces should continue past
value);
}
+static int backtrace_past_zero_pc;
+static void
+show_backtrace_past_zero_pc (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ fprintf_filtered (file, _("\
+Whether backtraces should continue past a zero pc value is %s.\n"),
+ value);
+}
+
static int backtrace_past_entry;
static void
show_backtrace_past_entry (struct ui_file *file, int from_tty,
@@ -1483,9 +1493,7 @@ get_prev_frame (struct frame_info *this_
}
if (this_frame->level > 0
-#if 0
- && backtrace_past_zero_pc
-#endif
+ && !backtrace_past_zero_pc
&& get_frame_type (this_frame) == NORMAL_FRAME
&& get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
&& get_frame_pc (this_frame) == 0)
@@ -1850,6 +1858,17 @@ the rest of the stack trace."),
&set_backtrace_cmdlist,
&show_backtrace_cmdlist);
+ add_setshow_boolean_cmd ("past-zero-pc", class_obscure,
+ &backtrace_past_zero_pc, _("\
+Set whether backtraces should continue past a zero pc value."), _("\
+Show whether backtraces should continue past a zero pc value."), _("\
+Normally GDB stops backtracing when it finds a zero pc.\n\
+Set this variable if you need to see the rest of the stack trace."),
+ NULL,
+ show_backtrace_past_zero_pc,
+ &set_backtrace_cmdlist,
+ &show_backtrace_cmdlist);
+
add_setshow_integer_cmd ("limit", class_obscure,
&backtrace_limit, _("\
Set an upper bound on the number of backtrace levels."), _("\
++++++ gdb-6.3-bz140532-ppc-unwinding-test.patch ++++++
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 2007-08-02 13:23:10.000000000 -0400
@@ -0,0 +1,78 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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. */
+
+ .section ".text"
+ .align 2
+ .globl func0
+ .type func0, @function
+func0:
+ stwu 1,-16(1)
+ mflr 0
+ stw 31,12(1)
+ stw 0,20(1)
+ mr 31,1
+ bl abort
+ .size func0, .-func0
+ .align 2
+ .globl func1
+ .type func1, @function
+func1:
+ stwu 1,-16(1)
+ mflr 0
+/* 20 = BO = branch always
+ 31 = BI = CR bit (ignored) */
+ bcl 20,31,.Lpie
+.Lpie: stw 31,12(1)
+ stw 0,20(1)
+ mr 31,1
+ bl func0
+ mr 0,3
+ lis 9,var@ha
+ lwz 9,var@l(9)
+ add 0,0,9
+ mr 3,0
+ lwz 11,0(1)
+ lwz 0,4(11)
+ mtlr 0
+ lwz 31,-4(11)
+ mr 1,11
+ blr
+ .size func1, .-func1
+ .section .note.GNU-stack,"",@progbits
+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
+
+/* Original source file:
+
+#include <stdlib.h>
+
+extern volatile int var;
+
+int func0 (void) __attribute__((__noinline__));
+int func0 (void)
+{
+ abort ();
+ return var;
+}
+
+int func1 (void) __attribute__((__noinline__));
+int func1 (void)
+{
+ return func0 () + var;
+}
+
+*/
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 2007-08-02 14:28:56.000000000 -0400
@@ -0,0 +1,98 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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. */
+
+ .section ".toc","aw"
+ .section ".text"
+ .align 2
+ .globl func0
+ .section ".opd","aw"
+ .align 3
+func0:
+ .quad .L.func0,.TOC.@tocbase
+ .previous
+ .type func0, @function
+.L.func0:
+ mflr 0
+ std 31,-8(1)
+ std 0,16(1)
+ stdu 1,-128(1)
+ mr 31,1
+ bl abort
+ nop
+ .long 0
+ .byte 0,0,0,1,128,1,0,1
+ .size func0,.-.L.func0
+ .section ".toc","aw"
+.LC1:
+ .tc var[TC],var
+ .section ".text"
+ .align 2
+ .globl func1
+ .section ".opd","aw"
+ .align 3
+func1:
+ .quad .L.func1,.TOC.@tocbase
+ .previous
+ .type func1, @function
+.L.func1:
+ mflr 0
+/* 20 = BO = branch always
+ 31 = BI = CR bit (ignored) */
+ bcl 20,31,.Lpie
+.Lpie: std 31,-8(1)
+ std 0,16(1)
+ stdu 1,-128(1)
+ mr 31,1
+ bl func0
+ mr 11,3
+ ld 9,.LC1@toc(2)
+ lwz 0,0(9)
+ add 0,11,0
+ extsw 0,0
+ mr 3,0
+ ld 1,0(1)
+ ld 0,16(1)
+ mtlr 0
+ ld 31,-8(1)
+ blr
+ .long 0
+ .byte 0,0,0,1,128,1,0,1
+ .size func1,.-.L.func1
+ .section .note.GNU-stack,"",@progbits
+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
+
+/* Original source file:
+
+#include <stdlib.h>
+
+extern volatile int var;
+
+int func0 (void) __attribute__((__noinline__));
+int func0 (void)
+{
+ abort ();
+ return var;
+}
+
+int func1 (void) __attribute__((__noinline__));
+int func1 (void)
+{
+ return func0 () + var;
+}
+
+*/
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 2007-08-02 13:25:10.000000000 -0400
@@ -0,0 +1,29 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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. */
+
+/* Force `-fpie' double jump bl->blrl. */
+/* No longer used. */
+volatile int var;
+
+extern int func1 (void);
+
+int main (void)
+{
+ func1 ();
+ return 0;
+}
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 2007-08-02 14:21:29.000000000 -0400
@@ -0,0 +1,79 @@
+# Copyright 2006, 2007 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.
+
+# Test unwinding fixes of the PPC platform, specifically on the coping with BCL
+# jump of the PIE code.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "powerpc*-*-linux*"] then {
+ verbose "Skipping powerpc-linux prologue tests."
+ return
+}
+
+set testfile "powerpc-bcl-prologue"
+set srcfile1 ${testfile}.c
+set flags "debug"
+if [istarget "powerpc-*"] then {
+ set srcfile2 ${testfile}-asm32.S
+ set flags "$flags additional_flags=-m32"
+} elseif [istarget "powerpc64-*"] then {
+ set srcfile2 ${testfile}-asm64.S
+ set flags "$flags additional_flags=-m64"
+} else {
+ fail "powerpc arch test"
+ return
+}
+set objfile2 ${objdir}/${subdir}/${testfile}-asm.o
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2}" ${binfile} executable $flags] != ""} {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# We should stop in abort(3).
+
+gdb_run_cmd
+
+gdb_test_multiple {} "continue to abort()" {
+ -re ".*Program received signal SIGABRT,.*$gdb_prompt $" {
+ pass "continue to abort()"
+ }
+}
+
+# Check backtrace:
+# #3 0x0804835f in func0 ()
+# #4 0x0804836a in func1 ()
+# #5 0x0804838c in main ()
+# (gdb)
+# `\\.?' prefixes are needed for ppc64 without `debug' (another bug).
+
+set test "matching unwind"
+gdb_test_multiple "backtrace" $test {
+ -re "\r\n#\[0-9\]\[^\r\n\]* in \\.?func0 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?func1 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?main \\(\[^\r\n\]*\r\n$gdb_prompt $" {
+ pass $test
+ }
+}
Fixup the testcase for ppc64 biarch GDB.
--- ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-13 13:32:19.000000000 +0100
+++ ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-02 00:04:10.000000000 +0100
@@ -17,8 +17,9 @@
# Test PowerPC prologue analyzer.
# Do not run on AIX (where we won't be able to build the tests without
-# some surgery) or on PowerPC64 (ditto, dot symbols).
-if {[istarget *-*-aix*] || ![istarget "powerpc-*-*"]} then {
+# some surgery). PowerPC64 target would break due to dot symbols but we build
+# there PowerPC32 inferior.
+if {[istarget *-*-aix*] || ![istarget "powerpc*-*-*"]} then {
verbose "Skipping PowerPC prologue tests."
return
}
++++++ gdb-6.3-bz202689-exec-from-pthread-test.patch ++++++
2007-01-17 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/threaded-exec.c 17 Jan 2007 23:10:22 -0000
@@ -0,0 +1,46 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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. */
+
+#include <stddef.h>
+#include <pthread.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+static void *
+threader (void *arg)
+{
+ return NULL;
+}
+
+int
+main (void)
+{
+ pthread_t t1;
+ int i;
+
+ i = pthread_create (&t1, NULL, threader, (void *) NULL);
+ assert (i == 0);
+ i = pthread_join (t1, NULL);
+ assert (i == 0);
+
+ execl ("/bin/true", "/bin/true", NULL);
+ abort ();
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/threaded-exec.exp 17 Jan 2007 23:10:22 -0000
@@ -0,0 +1,41 @@
+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
+# Copyright (C) 2007 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(a)prep.ai.mit.edu
+
+set testfile threaded-exec
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+
+gdb_run_cmd
+
+gdb_test_multiple {} "Program exited" {
+ -re "\r\nProgram exited normally.\r\n$gdb_prompt $" {
+ pass "Program exited"
+ }
+}
++++++ gdb-6.3-bz231832-obstack-2gb.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
Index: gdb-6.8/gdb/symmisc.c
===================================================================
--- gdb-6.8.orig/gdb/symmisc.c 2008-03-17 16:06:24.000000000 +0100
+++ gdb-6.8/gdb/symmisc.c 2008-07-14 10:27:50.000000000 +0200
@@ -230,8 +230,8 @@ print_objfile_statistics (void)
if (OBJSTAT (objfile, sz_strtab) > 0)
printf_filtered (_(" Space used by a.out string tables: %d\n"),
OBJSTAT (objfile, sz_strtab));
- printf_filtered (_(" Total memory used for objfile obstack: %d\n"),
- obstack_memory_used (&objfile->objfile_obstack));
+ printf_filtered (_(" Total memory used for objfile obstack: %ld\n"),
+ (long) obstack_memory_used (&objfile->objfile_obstack));
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
bcache_memory_used (objfile->psymbol_cache));
printf_filtered (_(" Total memory used for macro cache: %d\n"),
Index: gdb-6.8/include/obstack.h
===================================================================
--- gdb-6.8.orig/include/obstack.h 2005-05-10 12:21:08.000000000 +0200
+++ gdb-6.8/include/obstack.h 2008-07-14 10:27:50.000000000 +0200
@@ -188,31 +188,31 @@ struct obstack /* control current objec
/* Declare the external functions we use; they are in obstack.c. */
-extern void _obstack_newchunk (struct obstack *, int);
+extern void _obstack_newchunk (struct obstack *, PTR_INT_TYPE);
extern void _obstack_free (struct obstack *, void *);
-extern int _obstack_begin (struct obstack *, int, int,
+extern int _obstack_begin (struct obstack *, PTR_INT_TYPE, int,
void *(*) (long), void (*) (void *));
-extern int _obstack_begin_1 (struct obstack *, int, int,
+extern int _obstack_begin_1 (struct obstack *, PTR_INT_TYPE, int,
void *(*) (void *, long),
void (*) (void *, void *), void *);
-extern int _obstack_memory_used (struct obstack *);
+extern PTR_INT_TYPE _obstack_memory_used (struct obstack *);
/* Do the function-declarations after the structs
but before defining the macros. */
void obstack_init (struct obstack *obstack);
-void * obstack_alloc (struct obstack *obstack, int size);
+void * obstack_alloc (struct obstack *obstack, PTR_INT_TYPE size);
-void * obstack_copy (struct obstack *obstack, void *address, int size);
-void * obstack_copy0 (struct obstack *obstack, void *address, int size);
+void * obstack_copy (struct obstack *obstack, void *address, PTR_INT_TYPE size);
+void * obstack_copy0 (struct obstack *obstack, void *address, PTR_INT_TYPE size);
void obstack_free (struct obstack *obstack, void *block);
-void obstack_blank (struct obstack *obstack, int size);
+void obstack_blank (struct obstack *obstack, PTR_INT_TYPE size);
-void obstack_grow (struct obstack *obstack, void *data, int size);
-void obstack_grow0 (struct obstack *obstack, void *data, int size);
+void obstack_grow (struct obstack *obstack, void *data, PTR_INT_TYPE size);
+void obstack_grow0 (struct obstack *obstack, void *data, PTR_INT_TYPE size);
void obstack_1grow (struct obstack *obstack, int data_char);
void obstack_ptr_grow (struct obstack *obstack, void *data);
@@ -220,20 +220,20 @@ void obstack_int_grow (struct obstack *o
void * obstack_finish (struct obstack *obstack);
-int obstack_object_size (struct obstack *obstack);
+PTR_INT_TYPE obstack_object_size (struct obstack *obstack);
-int obstack_room (struct obstack *obstack);
-void obstack_make_room (struct obstack *obstack, int size);
+PTR_INT_TYPE obstack_room (struct obstack *obstack);
+void obstack_make_room (struct obstack *obstack, PTR_INT_TYPE size);
void obstack_1grow_fast (struct obstack *obstack, int data_char);
void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
void obstack_int_grow_fast (struct obstack *obstack, int data);
-void obstack_blank_fast (struct obstack *obstack, int size);
+void obstack_blank_fast (struct obstack *obstack, PTR_INT_TYPE size);
void * obstack_base (struct obstack *obstack);
void * obstack_next_free (struct obstack *obstack);
int obstack_alignment_mask (struct obstack *obstack);
-int obstack_chunk_size (struct obstack *obstack);
-int obstack_memory_used (struct obstack *obstack);
+size_t obstack_chunk_size (struct obstack *obstack);
+size_t obstack_memory_used (struct obstack *obstack);
/* Error handler called when `obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function. The
@@ -318,7 +318,7 @@ extern int obstack_exit_failure;
# define obstack_make_room(OBSTACK,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
+ PTR_INT_TYPE __len = (length); \
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
(void) 0; })
@@ -331,7 +331,7 @@ __extension__ \
# define obstack_grow(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
+ PTR_INT_TYPE __len = (length); \
if (__o->next_free + __len > __o->chunk_limit) \
_obstack_newchunk (__o, __len); \
_obstack_memcpy (__o->next_free, (where), __len); \
@@ -341,7 +341,7 @@ __extension__ \
# define obstack_grow0(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
+ PTR_INT_TYPE __len = (length); \
if (__o->next_free + __len + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, __len + 1); \
_obstack_memcpy (__o->next_free, (where), __len); \
@@ -392,7 +392,7 @@ __extension__ \
# define obstack_blank(OBSTACK,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
+ PTR_INT_TYPE __len = (length); \
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
obstack_blank_fast (__o, __len); \
@@ -532,7 +532,7 @@ __extension__ \
# define obstack_free(h,obj) \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
+ ? (PTR_INT_TYPE) ((h)->next_free = (h)->object_base \
= (h)->temp + (char *) (h)->chunk) \
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
Index: gdb-6.8/libiberty/obstack.c
===================================================================
--- gdb-6.8.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
+++ gdb-6.8/libiberty/obstack.c 2008-07-14 10:27:50.000000000 +0200
@@ -44,9 +44,11 @@
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
#include <gnu-versions.h>
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
+#if 0 /* 64-bit obstack is not compatible with any glibc implementation. */
#define ELIDE_CODE
#endif
#endif
+#endif
#ifndef ELIDE_CODE
@@ -139,7 +141,7 @@ struct obstack *_obstack;
free up some memory, then call this again. */
int
-_obstack_begin (struct obstack *h, int size, int alignment,
+_obstack_begin (struct obstack *h, PTR_INT_TYPE size, int alignment,
POINTER (*chunkfun) (long), void (*freefun) (void *))
{
register struct _obstack_chunk *chunk; /* points to new chunk */
@@ -183,7 +185,7 @@ _obstack_begin (struct obstack *h, int s
}
int
-_obstack_begin_1 (struct obstack *h, int size, int alignment,
+_obstack_begin_1 (struct obstack *h, PTR_INT_TYPE size, int alignment,
POINTER (*chunkfun) (POINTER, long),
void (*freefun) (POINTER, POINTER), POINTER arg)
{
@@ -235,7 +237,7 @@ _obstack_begin_1 (struct obstack *h, int
to the beginning of the new one. */
void
-_obstack_newchunk (struct obstack *h, int length)
+_obstack_newchunk (struct obstack *h, PTR_INT_TYPE length)
{
register struct _obstack_chunk *old_chunk = h->chunk;
register struct _obstack_chunk *new_chunk;
@@ -388,11 +390,11 @@ obstack_free (struct obstack *h, POINTER
abort ();
}
-int
+PTR_INT_TYPE
_obstack_memory_used (struct obstack *h)
{
register struct _obstack_chunk* lp;
- register int nbytes = 0;
+ register PTR_INT_TYPE nbytes = 0;
for (lp = h->chunk; lp != 0; lp = lp->prev)
{
@@ -421,6 +423,7 @@ print_and_abort (void)
}
#if 0
+/* These functions are now broken for 64-bit obstack! */
/* These are now turned off because the applications do not use it
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
++++++ gdb-6.3-dtorfix-20050121.patch ++++++
2005-01-21 Jeff Johnston <jjohnstn(a)redhat.com>
* linespec.c (collect_methods): Don't do special processing for
destructors as this will be handled in find_methods.
(find_methods): Fix ctor check to also check for dtor.
2007-10-14 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/linespec.c
===================================================================
--- gdb-6.7.orig/gdb/linespec.c 2007-10-13 05:26:33.000000000 +0200
+++ gdb-6.7/gdb/linespec.c 2007-10-14 23:31:03.000000000 +0200
@@ -398,12 +398,14 @@ add_matching_methods (int method_counter
/* Check for special case of looking for member that
doesn't have a mangled name provided. This will happen
- when we have in-charge and not-in-charge constructors.
+ when we have in-charge and not-in-charge ctors/dtors.
Since we don't have a mangled name to work with, if we
- look for the symbol, we can only find the class itself.
+ look for the symbol, we can at best find the class itself.
We can find the information we need in the minimal symbol
table which has the full member name information we need. */
- if (strlen (phys_name) <= strlen (class_name))
+ if (strlen (phys_name) <= strlen (class_name)
+ || (strlen (phys_name) == strlen (class_name) + 1
+ && phys_name[0] == '~'))
return add_minsym_members (class_name, phys_name, msym_arr);
/* Destructor is handled by caller, don't add it to
@@ -1731,6 +1733,11 @@ collect_methods (char *copy, struct type
{
int i1 = 0; /* Counter for the symbol array. */
+#if 0
+ /* Ignore this special method for getting destructors because
+ find_methods is more robust and can handle multiple
+ destructors which is the case when gcc generates a not-in-charge
+ vs an in-charge destructor. */
if (destructor_name_p (copy, t))
{
/* Destructors are a special case. */
@@ -1749,6 +1756,7 @@ collect_methods (char *copy, struct type
}
}
else
+#endif
i1 = find_methods (t, copy, SYMBOL_LANGUAGE (sym_class), sym_arr, msym_arr);
return i1;
++++++ gdb-6.3-focus-cmd-prev-test.patch ++++++
--- /dev/null 2008-03-23 13:41:46.072650180 +0100
+++ gdb-6.3/gdb/testsuite/gdb.base/focus-cmd-prev.exp 2008-03-23 23:46:45.000000000 +0100
@@ -0,0 +1,25 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+gdb_exit
+gdb_start
+
+gdb_test "focus cmd"
+gdb_test "focus prev"
++++++ gdb-6.3-framepczero-20040927.patch ++++++
2004-09-27 Andrew Cagney <cagney(a)gnu.org>
* frame.c (get_prev_frame): Stop backtrace when a zero PC and
successive normal frames.
Index: gdb-6.8.50.20081128/gdb/frame.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/frame.c 2008-12-04 01:34:37.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/frame.c 2008-12-04 01:35:47.000000000 +0100
@@ -1566,6 +1566,18 @@ get_prev_frame (struct frame_info *this_
return NULL;
}
+ if (this_frame->level > 0
+#if 0
+ && backtrace_past_zero_pc
+#endif
+ && get_frame_type (this_frame) == NORMAL_FRAME
+ && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
+ && get_frame_pc (this_frame) == 0)
+ {
+ frame_debug_got_null_frame (this_frame, "zero PC");
+ return NULL;
+ }
+
return get_prev_frame_1 (this_frame);
}
++++++ gdb-6.3-gcore-thread-20050204.patch ++++++
2005-02-07 Jeff Johnston <jjohnstn(a)redhat.com>
* linux-nat.c (linux_nat_xfer_memory): Don't use
linux_proc_xfer_memory for ia64.
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:22:23.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:25:26.000000000 +0100
@@ -4123,10 +4123,15 @@ linux_xfer_partial (struct target_ops *o
return linux_nat_xfer_osdata (ops, object, annex, readbuf, writebuf,
offset, len);
+#ifndef NATIVE_XFER_UNWIND_TABLE
+ /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory
+ for accessing thread storage. Revert when Bugzilla 147436
+ is fixed. */
xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf,
offset, len);
if (xfer != 0)
return xfer;
+#endif
return super_xfer_partial (ops, object, annex, readbuf, writebuf,
offset, len);
++++++ gdb-6.3-gstack-20050411.patch ++++++
2004-11-23 Andrew Cagney <cagney(a)redhat.com>
* Makefile.in (uninstall-gstack, install-gstack): New rules, add
to install and uninstall.
* gstack.sh, gstack.1: New files.
Index: gdb-6.8.50.20090226/gdb/Makefile.in
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/Makefile.in 2009-02-26 22:09:59.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/Makefile.in 2009-02-26 22:10:22.000000000 +0100
@@ -973,7 +973,7 @@ install: all install-only
# The "install-only" target also installs the syscalls' XML files in
# the system.
-install-only: $(CONFIG_INSTALL) xml-syscall-install
+install-only: install-gstack $(CONFIG_INSTALL) xml-syscall-install
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
@@ -1005,9 +1005,26 @@ install-tui:
$(DESTDIR)$(man1dir) ; \
$(INSTALL_DATA) $(srcdir)/gdb.1 \
$(DESTDIR)$(man1dir)/$$transformed_name.1
+GSTACK=gstack
+.PHONY: install-gstack
+install-gstack:
+ transformed_name=`t='$(program_transform_name)'; \
+ echo $(GSTACK) | sed -e "$$t"` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=$(GSTACK) ; \
+ else \
+ true ; \
+ fi ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
+ $(INSTALL_PROGRAM) $(srcdir)/$(GSTACK).sh \
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+ : $(SHELL) $(srcdir)/../mkinstalldirs \
+ $(DESTDIR)$(man1dir) ; \
+ : $(INSTALL_DATA) $(srcdir)/gstack.1 \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
-uninstall: force $(CONFIG_UNINSTALL)
+uninstall: force uninstall-gstack $(CONFIG_UNINSTALL)
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \
@@ -1029,6 +1046,17 @@ uninstall-tui:
fi ; \
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
$(DESTDIR)$(man1dir)/$$transformed_name.1
+.PHONY: uninstall-gstack
+uninstall-gstack:
+ transformed_name=`t='$(program_transform_name)'; \
+ echo $(GSTACK) | sed -e $$t` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=$(GSTACK) ; \
+ else \
+ true ; \
+ fi ; \
+ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
# The C++ name parser can be built standalone for testing.
test-cp-name-parser.o: cp-name-parser.c
Index: gdb-6.8.50.20090226/gdb/gstack.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090226/gdb/gstack.sh 2009-02-26 22:10:05.000000000 +0100
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+if test $# -ne 1; then
+ echo "Usage: `basename $0 .sh` <process-id>" 1>&2
+ exit 1
+fi
+
+if test ! -r /proc/$1; then
+ echo "Process $1 not found." 1>&2
+ exit 1
+fi
+
+# GDB doesn't allow "thread apply all bt" when the process isn't
+# threaded; need to peek at the process to determine if that or the
+# simpler "bt" should be used.
+
+backtrace="bt"
+if test -d /proc/$1/task ; then
+ # Newer kernel; has a task/ directory.
+ if test `ls /proc/$1/task | wc -l` -gt 1 2>/dev/null ; then
+ backtrace="thread apply all bt"
+ fi
+elif test -f /proc/$1/maps ; then
+ # Older kernel; go by it loading libpthread.
+ if grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
+ backtrace="thread apply all bt"
+ fi
+fi
+
+GDB=${GDB:-gdb}
+
+if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
+ readnever=--readnever
+else
+ readnever=
+fi
+
+# Run GDB, strip out unwanted noise.
+$GDB --quiet $readnever -nx /proc/$1/exe $1 <<EOF 2>&1 |
+$backtrace
+EOF
+sed -n \
+ -e 's/^(gdb) //' \
+ -e '/^#/p' \
+ -e '/^Thread/p'
++++++ gdb-6.3-gstack-without-path-20060414.patch ++++++
Index: gdb-6.3/gdb/gstack.sh
===================================================================
--- gdb-6.3.orig/gdb/gstack.sh 2006-02-14 17:21:05.000000000 -0200
+++ gdb-6.3/gdb/gstack.sh 2006-04-14 03:17:12.000000000 -0300
@@ -17,17 +17,17 @@ fi
backtrace="bt"
if test -d /proc/$1/task ; then
# Newer kernel; has a task/ directory.
- if test `ls /proc/$1/task | wc -l` -gt 1 2>/dev/null ; then
+ if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
backtrace="thread apply all bt"
fi
elif test -f /proc/$1/maps ; then
# Older kernel; go by it loading libpthread.
- if grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
+ if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
backtrace="thread apply all bt"
fi
fi
-GDB=${GDB:-gdb}
+GDB=${GDB:-/usr/bin/gdb}
if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
readnever=--readnever
@@ -39,7 +39,7 @@ fi
$GDB --quiet $readnever -nx /proc/$1/exe $1 <<EOF 2>&1 |
$backtrace
EOF
-sed -n \
+/bin/sed -n \
-e 's/^(gdb) //' \
-e '/^#/p' \
-e '/^Thread/p'
++++++ gdb-6.3-ia64-gcore-page0-20050421.patch ++++++
Index: gdb-6.8.50.20081128/gdb/gcore.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/gcore.c 2008-09-11 16:27:34.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/gcore.c 2008-12-01 16:39:04.000000000 +0100
@@ -475,8 +475,14 @@ gcore_copy_callback (bfd *obfd, asection
if (size > total_size)
size = total_size;
+ /* Warn if read error occurs except if we were trying to read the
+ first page for ia64. The first page is marked readable, but it cannot
+ be read. */
if (target_read_memory (bfd_section_vma (obfd, osec) + offset,
- memhunk, size) != 0)
+ memhunk, size) != 0
+ && (strcmp (gdbarch_bfd_arch_info (current_gdbarch)->arch_name,
+ "ia64")
+ || bfd_section_vma (obfd, osec) != 0))
{
warning (_("Memory read failed for corefile section, %s bytes at 0x%s."),
plongest (size), paddr (bfd_section_vma (obfd, osec)));
++++++ gdb-6.3-ia64-gcore-speedup-20050714.patch ++++++
2005-07-14 Jeff Johnsotn <jjohnstn(a)redhat.com>
* linux-nat.c (linux_nat_xfer_memory): Incorporate Fujitsu
work-around to use /proc/mem for storage, but to fall-back
to PTRACE for ia64 rse register areas.
* ia64-linux-nat.c (ia64_rse_slot_num): New static function.
(ia64_rse_skip_regs): Ditto.
(ia64_linux_check_stack_region): New function.
Index: gdb-6.8.50.20090226/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/linux-nat.c 2009-02-27 07:51:44.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/linux-nat.c 2009-02-28 07:19:05.000000000 +0100
@@ -4386,15 +4386,38 @@ linux_xfer_partial (struct target_ops *o
return linux_nat_xfer_osdata (ops, object, annex, readbuf, writebuf,
offset, len);
-#ifndef NATIVE_XFER_UNWIND_TABLE
- /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory
- for accessing thread storage. Revert when Bugzilla 147436
- is fixed. */
xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf,
offset, len);
if (xfer != 0)
- return xfer;
+ {
+#ifdef NATIVE_XFER_UNWIND_TABLE
+ struct mem_region range;
+ range.lo = memaddr;
+ range.hi = memaddr + len;
+
+ /* FIXME: For ia64, we cannot currently use
+ linux_proc_xfer_partial for accessing rse register storage.
+ Revert when Bugzilla 147436 is fixed. */
+#ifdef NATIVE_XFER_UNWIND_TABLE
+ extern int ia64_linux_check_stack_region (struct lwp_info *lwp,
+ void *range);
+#endif
+ if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
+ { /* This region contains ia64 rse registers, we have to re-read. */
+ int xxfer;
+
+ /* Re-read register stack area. */
+ xxfer = super_xfer_partial (ops, object, annex,
+ readbuf + (range.lo - memaddr),
+ writebuf + (range.lo - memaddr),
+ offset + (range.lo - memaddr),
+ range.hi - range.lo);
+ if (xxfer == 0)
+ xfer = 0;
+ }
#endif
+ return xfer;
+ }
return super_xfer_partial (ops, object, annex, readbuf, writebuf,
offset, len);
Index: gdb-6.8.50.20090226/gdb/ia64-linux-nat.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/ia64-linux-nat.c 2009-02-23 01:03:49.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/ia64-linux-nat.c 2009-02-28 07:18:10.000000000 +0100
@@ -809,6 +809,64 @@ ia64_linux_xfer_partial (struct target_o
void _initialize_ia64_linux_nat (void);
+/*
+ * Note: taken from ia64_tdep.c
+ *
+ */
+
+static __inline__ unsigned long
+ia64_rse_slot_num (unsigned long addr)
+{
+ return (addr >> 3) & 0x3f;
+}
+
+/* Skip over a designated number of registers in the backing
+ store, remembering every 64th position is for NAT. */
+static __inline__ unsigned long
+ia64_rse_skip_regs (unsigned long addr, long num_regs)
+{
+ long delta = ia64_rse_slot_num(addr) + num_regs;
+
+ if (num_regs < 0)
+ delta -= 0x3e;
+ return addr + ((num_regs + delta/0x3f) << 3);
+}
+
+/*
+ * Check mem_region is stack or not. If stack, /proc/<pid>/mem cannot return
+ * expected value.
+ */
+int ia64_linux_check_stack_region(struct lwp_info *ti, struct mem_region *range)
+{
+ CORE_ADDR addr;
+ int error;
+ unsigned long bsp, cfm, bspstore;
+ long sof;
+ pid_t pid = ptid_get_lwp(ti->ptid);
+ bsp = ptrace(PTRACE_PEEKUSER, pid, PT_AR_BSP ,NULL);
+ if (bsp == (unsigned long)-1) {
+ return 1;
+ }
+ /* stack is allocated by one-segment, not separated into several segments.
+ So, we only have to check whether bsp is in *range* or not. */
+ if((range->lo <= bsp) && (bsp <= range->hi)) {
+ bspstore = ptrace(PTRACE_PEEKUSER, pid, PT_AR_BSPSTORE, NULL);
+ cfm = ptrace(PTRACE_PEEKUSER, pid, PT_CFM, NULL);
+ sof = cfm & 0x3f;
+ bsp = ia64_rse_skip_regs(bsp, -sof);
+ range->lo = bspstore;
+ range->hi = bsp;
+ /* we have to check the size of dirty register stack area */
+ /*
+ fprintf_unfiltered(gdb_stdlog, "<%d> <%p> <%lx> <%p> <%p>\n",
+ pid, bsp, sof, range->lo, range->hi);
+ */
+ return 1;
+ }
+
+ return 0;
+}
+
void
_initialize_ia64_linux_nat (void)
{
++++++ gdb-6.3-ia64-info-frame-fix-20050725.patch ++++++
2005-07-25 Jeff Johnstno <jjohnstn(a)redhat.com>
* libunwind-frame.c (libunwind_frame_prev_register): Check valuep
is not NULL before copying cursor address into it.
testsuite:
2005-07-25 Jeff Johnstno <jjohnstn(a)redhat.com>
* gdb.arch/ia64-sigtramp.exp: New test.
* gdb.arch/ia64-sigtramp.c: Ditto.
2008-02-24 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.8pre. (Only the testcase has remained.)
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c.fix 2005-07-25 16:42:46.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c 2005-07-25 16:42:08.000000000 -0400
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <signal.h>
+
+int *l;
+
+void x (int sig)
+{
+ printf ("in signal handler for signal %d\n", sig);
+}
+
+int main()
+{
+ int k;
+
+ signal (SIGSEGV, &x);
+
+ k = *l;
+
+ printf ("k is %d\n", k);
+
+ return 0;
+}
+
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp.fix 2005-07-25 16:42:50.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp 2005-07-25 16:42:01.000000000 -0400
@@ -0,0 +1,66 @@
+# 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(a)prep.ai.mit.edu
+
+# This file was written by Jeff Johnston (jjohnstn(a)redhat.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+if ![istarget "ia64-*-*"] then {
+ return
+}
+
+set testfile "ia64-sigtramp"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 0
+}
+
+gdb_test "handle SIGSEGV" "SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault"
+gdb_test "next" "" "first next"
+gdb_test "next" "Program received signal SIGSEGV.*" "getting SIGSEGV"
+gdb_breakpoint "x"
+gdb_test "continue" "Breakpoint.*x.*" "continue to x"
+
+gdb_test "f 1" ".*signal handler called.*" "frame 1"
+gdb_test "info frame" "Stack level 1.*p63 at .*" "info sigtramp frame"
+
++++++ gdb-6.3-ia64-sigill-20051115.patch ++++++
2005-11-15 Jeff Johnston <jjohnstn(a)redhat.com>
* linux-thread-db.c (thread_db_wait): Don't bother continuing if
the wait result indicates the program terminated with a signal.
* linux-nat.c (linux_nat_wait): For SIGILL and SIGTRAP, don't
throw away the event if the user has specified nostop noprint.
gdb/testsuite:
2005-11-15 Jeff Johnston <jjohnstn(a)redhat.com>
* gdb.arch/ia64-sigill.c: New test.
* gdb.arch/ia64-sigill.exp: Ditto.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.exp 2008-12-02 21:10:57.000000000 +0100
@@ -0,0 +1,59 @@
+# 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(a)prep.ai.mit.edu
+
+# This file was written by Jeff Johnston (jjohnstn(a)redhat.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+if ![istarget "ia64-*-*"] then {
+ return
+}
+
+set testfile "ia64-sigill"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# Deliberately compile with pthreads, even though test is single-threaded.
+# We want to force gdb thread code to be exercised.
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# We set up SIGILL nostop, noprint, pass and then run the program.
+# We expect to just see a normal run.
+gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill"
+gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit"
+
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.c 2008-12-02 21:10:57.000000000 +0100
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int main()
+{
+ printf ("hello world\n");
+ return 0;
+}
+
Index: gdb-6.8.50.20081128/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c 2008-12-02 19:04:38.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/linux-nat.c 2008-12-02 21:11:11.000000000 +0100
@@ -2974,7 +2974,8 @@ retry:
threads can be a bit time-consuming so if we want decent
performance with heavily multi-threaded programs, especially when
they're using a high frequency timer, we'd better avoid it if we
- can. */
+ can. For possible trap signals like SIGTRAP and SIGILL, don't
+ avoid reporting. */
if (WIFSTOPPED (status))
{
@@ -2992,7 +2993,9 @@ retry:
&& inf->stop_soon == NO_STOP_QUIETLY
&& signal_stop_state (signo) == 0
&& signal_print_state (signo) == 0
- && signal_pass_state (signo) == 1)
+ && signal_pass_state (signo) == 1
+ && signo != TARGET_SIGNAL_ILL
+ && signo != TARGET_SIGNAL_TRAP)
{
/* FIMXE: kettenis/2001-06-06: Should we resume all threads
here? It is not clear we should. GDB may not expect
++++++ gdb-6.3-ia64-sigtramp-fp-20050926.patch ++++++
2005-09-27 Jeff Johnston <jjohnstn(a)redhat.com>
* libunwind-frame.c (libunwind_frame_cache): Save the current
stack pointer in the cache.
(libunwind_sigtramp_frame_this_id): New function.
(libunwind_sigtramp_frame_unwind): New unwinder.
(libunwind_sigtramp_frame_sniffer): Return
libunwind_sigtramp_frame_unwind address.
* libunwind-frame.h (libunwind_sigtramp_frame_this_id): New
prototype.
* ia64-tdep.c (ia64_libunwind_sigtramp_frame_this_id): Calculate
the base address using the current stack pointer plus a fixed
offset.
2007-10-14 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
2008-02-24 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.8pre.
2008-04-16 Yi Zhan <yi.zhan(a)intel.com>
Fix a compilation error on a typo.
Index: gdb-6.8.50.20081128/gdb/libunwind-frame.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/libunwind-frame.c 2008-05-06 20:37:46.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/libunwind-frame.c 2008-12-02 19:46:26.000000000 +0100
@@ -61,6 +61,7 @@ static unw_word_t (*unw_find_dyn_list_p)
struct libunwind_frame_cache
{
CORE_ADDR base;
+ CORE_ADDR sp;
CORE_ADDR func_addr;
unw_cursor_t cursor;
unw_addr_space_t as;
@@ -133,6 +134,7 @@ libunwind_frame_cache (struct frame_info
unw_accessors_t *acc;
unw_addr_space_t as;
unw_word_t fp;
+ unw_word_t sp;
unw_regnum_t uw_sp_regnum;
struct libunwind_frame_cache *cache;
struct libunwind_descr *descr;
@@ -174,14 +176,30 @@ libunwind_frame_cache (struct frame_info
: __LITTLE_ENDIAN);
unw_init_remote_p (&cache->cursor, as, this_frame);
+
+ /* For the base address, we have a small problem. The majority
+ of the time, we can get the stack pointer of the previous
+ frame to use as a frame pointer. In the case where we have
+ a signal trampoline, the stack may change due to a sigaltstack
+ being set up. In that case, the normal mechanism will give us
+ an address in the regular stack which is not at the end of the
+ sigaltstack as we want. To handle this, we record the stack
+ address so the caller may calculate a more correct base address
+ to use. */
+ uw_sp_regnum = descr->gdb2uw (gdbarch_sp_regnum (gdbarch));
+ ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &sp);
+ if (ret < 0)
+ {
+ unw_destroy_addr_space_p (as);
+ error (_("Can't get libunwind sp register."));
+ }
+
if (unw_step_p (&cache->cursor) < 0)
{
unw_destroy_addr_space_p (as);
return NULL;
}
- /* To get base address, get sp from previous frame. */
- uw_sp_regnum = descr->gdb2uw (gdbarch_sp_regnum (gdbarch));
ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &fp);
if (ret < 0)
{
@@ -189,6 +207,7 @@ libunwind_frame_cache (struct frame_info
error (_("Can't get libunwind sp register."));
}
+ cache->sp = (CORE_ADDR)sp;
cache->base = (CORE_ADDR)fp;
cache->as = as;
@@ -376,6 +395,31 @@ libunwind_search_unwind_table (void *as,
di, pi, need_unwind_info, args);
}
+void
+libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
+ void **this_cache,
+ struct frame_id *this_id)
+{
+ struct libunwind_frame_cache *cache =
+ libunwind_frame_cache (this_frame, this_cache);
+
+ /* Unlike a regular frame, we can't use the normal frame pointer
+ mechanism because a sigaltstack may have been used. Instead,
+ we return the current stack pointer for the caller to use
+ to calculate the base address. */
+ if (cache != NULL)
+ (*this_id) = frame_id_build (cache->sp, cache->func_addr);
+ else
+ (*this_id) = null_frame_id;
+}
+
+static const struct frame_unwind libunwind_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ libunwind_sigtramp_frame_this_id,
+ libunwind_frame_prev_register
+};
+
/* Verify if we are in a sigtramp frame and we can use libunwind to unwind. */
int
libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
Index: gdb-6.8.50.20081128/gdb/libunwind-frame.h
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/libunwind-frame.h 2008-05-06 20:37:46.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/libunwind-frame.h 2008-12-02 19:38:55.000000000 +0100
@@ -52,6 +52,9 @@ void libunwind_frame_set_descr (struct g
void libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache,
struct frame_id *this_id);
+void libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
+ void **this_cache,
+ struct frame_id *this_id);
struct value *libunwind_frame_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum);
void libunwind_frame_dealloc_cache (struct frame_info *self, void *cache);
Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/ia64-tdep.c 2008-12-02 19:04:32.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/ia64-tdep.c 2008-12-02 21:09:46.000000000 +0100
@@ -2964,7 +2964,7 @@ ia64_libunwind_sigtramp_frame_this_id (s
struct frame_id id;
CORE_ADDR prev_ip;
- libunwind_frame_this_id (this_frame, this_cache, &id);
+ libunwind_sigtramp_frame_this_id (this_frame, this_cache, &id);
if (frame_id_eq (id, null_frame_id))
{
(*this_id) = null_frame_id;
@@ -2976,8 +2976,14 @@ ia64_libunwind_sigtramp_frame_this_id (s
get_frame_register (this_frame, IA64_BSP_REGNUM, buf);
bsp = extract_unsigned_integer (buf, 8);
- /* For a sigtramp frame, we don't make the check for previous ip being 0. */
- (*this_id) = frame_id_build_special (id.stack_addr, id.code_addr, bsp);
+ /* For a sigtramp frame, we don't make the check for previous ip being 0.
+ We also must calculate the frame pointer because libunwind will give
+ us back the current stack pointer instead of the frame pointer since
+ it cannot figure this out when in a sigaltstack. We make a basic
+ assumption of 16 (default size) + 8 bytes for sigcontext address.
+ FIXME: if libunwind were to export the frame pointer address, we
+ could eliminate the assumption and get the actual value. */
+ (*this_id) = frame_id_build_special (id.stack_addr + 24, id.code_addr, bsp);
if (gdbarch_debug >= 1)
fprintf_unfiltered (gdb_stdlog,
++++++ gdb-6.3-ia64-sigtramp-frame-20050708.patch ++++++
2005-07-08 Jeff Johnston <jjohnstn(a)redhat.com>
* ia64-tdep.c (ia64_sigtramp_frame_prev_register): Build
pseudo-registers the same as ia64_pseudo_register_read.
2008-04-16 Yi Zhan <yi.zhan(a)intel.com>
* ia64-tdep.c (ia64_sigtramp_frame_prev_register): Fix an
ISO C compliance compilation error.
2008-02-12 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to gdb-6.8.50.20081128, follow the upstream change:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-tdep.c.diff?cvsroot=s…
Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/ia64-tdep.c 2008-11-26 06:27:48.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/ia64-tdep.c 2008-12-02 19:04:32.000000000 +0100
@@ -2107,6 +2107,94 @@ ia64_sigtramp_frame_prev_register (struc
return frame_unwind_got_constant (this_frame, regnum, pc);
}
+ /* Red Hat patch begin. */
+ else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
+ {
+ /* NAT pseudo registers 0-31: get them from UNAT.
+ * "copied" from ia64_pseudo_register_read() */
+ ULONGEST unatN_val;
+ ULONGEST unat;
+ read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
+ register_size (current_gdbarch, IA64_UNAT_REGNUM));
+ unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
+ return frame_unwind_got_constant (this_frame, regnum, unatN_val);
+ }
+ else if (IA64_NAT32_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM)
+ {
+ /* NAT pseudo registers 32-127.
+ * "copied" from ia64_pseudo_register_read()
+ * FIXME: Not currently tested -- cannot get the frame to include
+ * NAT32-NAT127. */
+ ULONGEST bsp;
+ ULONGEST cfm;
+ ULONGEST natN_val = 0;
+ CORE_ADDR gr_addr = 0, nat_addr = 0;
+
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
+
+ /* The bsp points at the end of the register frame so we
+ subtract the size of frame from it to get start of register frame. */
+ bsp = rse_address_add (bsp, -(cfm & 0x7f));
+
+ if ((cfm & 0x7f) > regnum - V32_REGNUM)
+ gr_addr = rse_address_add (bsp, (regnum - V32_REGNUM));
+
+ if (gr_addr != 0)
+ {
+ /* Compute address of nat collection bits */
+ CORE_ADDR nat_collection;
+ int nat_bit;
+ nat_addr = gr_addr | 0x1f8;
+ /* If our nat collection address is bigger than bsp, we have to get
+ the nat collection from rnat. Otherwise, we fetch the nat
+ collection from the computed address. FIXME: Do not know if
+ RNAT can be not stored in the frame--being extra cautious. */
+ if (nat_addr >= bsp)
+ {
+ nat_addr = cache->saved_regs[IA64_RNAT_REGNUM];
+ if (nat_addr != 0)
+ read_memory (nat_addr, (char *) &nat_collection,
+ register_size (current_gdbarch, IA64_RNAT_REGNUM));
+ }
+ else
+ nat_collection = read_memory_integer (nat_addr, 8);
+ if (nat_addr != 0)
+ {
+ nat_bit = (gr_addr >> 3) & 0x3f;
+ natN_val = (nat_collection >> nat_bit) & 1;
+ return frame_unwind_got_constant (this_frame, regnum, natN_val);
+ }
+ }
+ warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"),
+ regnum);
+ }
+ else if (regnum == VBOF_REGNUM)
+ {
+ /* BOF pseudo register.
+ * "copied" from ia64_pseudo_register_read()
+ *
+ * A virtual register frame start is provided for user convenience.
+ * It can be calculated as the bsp - sof (sizeof frame). */
+ ULONGEST bsp;
+ ULONGEST cfm;
+ ULONGEST bof;
+
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
+
+ /* The bsp points at the end of the register frame so we
+ subtract the size of frame from it to get beginning of frame. */
+ bof = rse_address_add (bsp, -(cfm & 0x7f));
+
+ return frame_unwind_got_constant (this_frame, regnum, bof);
+ }
+ /* Red Hat patch end. */
+
else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM)
|| (regnum >= V32_REGNUM && regnum <= V127_REGNUM))
{
@@ -2121,7 +2209,42 @@ ia64_sigtramp_frame_prev_register (struc
return frame_unwind_got_constant (this_frame, regnum, 0);
}
- else /* All other registers not listed above. */
+ /* Red Hat patch begin. */
+ else if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
+ {
+ /* VP 0-63.
+ * "copied" from ia64_pseudo_register_read()
+ *
+ * FIXME: Not currently tested--cannot get the frame to include PR. */
+ CORE_ADDR pr_addr = 0;
+
+ pr_addr = cache->saved_regs[IA64_PR_REGNUM];
+ if (pr_addr != 0)
+ {
+ ULONGEST pr;
+ ULONGEST cfm;
+ ULONGEST prN_val;
+ read_memory (pr_addr, (char *) &pr,
+ register_size (current_gdbarch, IA64_PR_REGNUM));
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
+
+ /* Get the register rename base for this frame and adjust the
+ * register name to take rotation into account. */
+ if (VP16_REGNUM <= regnum && regnum <= VP63_REGNUM)
+ {
+ int rrb_pr = (cfm >> 32) & 0x3f;
+ regnum = VP16_REGNUM + ((regnum - VP16_REGNUM) + rrb_pr) % 48;
+ }
+ prN_val = (pr & (1LL << (regnum - VP0_REGNUM))) != 0;
+ return frame_unwind_got_constant (this_frame, regnum, prN_val);
+ }
+ warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"),
+ regnum);
+ }
+ /* Red Hat patch end. */
+
+ /* All other registers not listed above. */
{
CORE_ADDR addr = cache->saved_regs[regnum];
++++++ gdb-6.3-inferior-notification-20050721.patch ++++++
2005-07-21 Jeff Johnston <jjohnstn(a)redhat.com>
* gdb.base/attach-32.exp: New test for attaching in 32-bit
mode on 64-bit systems.
* gdb.base/attach-32.c: Ditto.
* gdb.base/attach-32b.c: Ditto.
2007-12-26 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c 2008-12-07 10:06:03.000000000 +0100
@@ -0,0 +1,20 @@
+/* This program is intended to be started outside of gdb, and then
+ attached to by gdb. Thus, it simply spins in a loop. The loop
+ is exited when & if the variable 'should_exit' is non-zero. (It
+ is initialized to zero in this program, so the loop will never
+ exit unless/until gdb sets the variable to non-zero.)
+ */
+#include <stdio.h>
+
+int should_exit = 0;
+
+int main ()
+{
+ int local_i = 0;
+
+ while (! should_exit)
+ {
+ local_i++;
+ }
+ return 0;
+}
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp 2008-12-07 10:08:52.000000000 +0100
@@ -0,0 +1,252 @@
+# 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.
+#
+# This test was based on attach.exp and modified for 32/64 bit Linux systems. */
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# On HP-UX 11.0, this test is causing a process running the program
+# "attach" to be left around spinning. Until we figure out why, I am
+# commenting out the test to avoid polluting tiamat (our 11.0 nightly
+# test machine) with these processes. RT
+#
+# Setting the magic bit in the target app should work. I added a
+# "kill", and also a test for the R3 register warning. JB
+if { ![istarget "x86_64*-*linux*"]
+ && ![istarget "powerpc64*-*linux*"]} {
+ return 0
+}
+
+# are we on a target board
+if [is_remote target] then {
+ return 0
+}
+
+set testfile "attach-32"
+set srcfile ${testfile}.c
+set srcfile2 ${testfile}b.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile2 ${objdir}/${subdir}/${testfile}b
+set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
+
+#execute_anywhere "rm -f ${binfile} ${binfile2}"
+remote_exec build "rm -f ${binfile} ${binfile2}"
+# For debugging this test
+#
+#log_user 1
+
+# build the first test case
+#
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-m32"]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Build the in-system-call test
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable [list debug "additional_flags=-m32"]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+proc do_attach_tests {} {
+ global gdb_prompt
+ global binfile
+ global escapedbinfile
+ global srcfile
+ global testfile
+ global objdir
+ global subdir
+ global timeout
+ global testpid
+
+ # Verify that we can "see" the variable "should_exit" in the
+ # program, and that it is zero.
+
+ gdb_test "print should_exit" " = 0" "after attach-32, print should_exit"
+
+ # Verify that we can modify the variable "should_exit" in the
+ # program.
+
+ gdb_test "set should_exit=1" "" "after attach-32, set should_exit"
+
+ # Verify that the modification really happened.
+
+ send_gdb "tbreak 19\n"
+ gdb_expect {
+ -re "reakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
+ pass "after attach-32, set tbreak postloop"
+ }
+ -re "$gdb_prompt $" {
+ fail "after attach-32, set tbreak postloop"
+ }
+ timeout {
+ fail "(timeout) after attach-32, set tbreak postloop"
+ }
+ }
+ send_gdb "continue\n"
+ gdb_expect {
+ -re "main.*at.*$srcfile:19.*$gdb_prompt $" {
+ pass "after attach-32, reach tbreak postloop"
+ }
+ -re "$gdb_prompt $" {
+ fail "after attach-32, reach tbreak postloop"
+ }
+ timeout {
+ fail "(timeout) after attach-32, reach tbreak postloop"
+ }
+ }
+
+ # Allow the test process to exit, to cleanup after ourselves.
+
+ gdb_test "continue" "Program exited normally." "after attach-32, exit"
+
+ # Make sure we don't leave a process around to confuse
+ # the next test run (and prevent the compile by keeping
+ # the text file busy), in case the "set should_exit" didn't
+ # work.
+
+ remote_exec build "kill -9 ${testpid}"
+
+ # Start the program running and then wait for a bit, to be sure
+ # that it can be attached to.
+
+ set testpid [eval exec $binfile &]
+ exec sleep 2
+ if { [istarget "*-*-cygwin*"] } {
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
+ # different due to the way fork/exec works.
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+ }
+
+ # Verify that we can attach to the process, and find its a.out
+ # when we're cd'd to some directory that doesn't contain the
+ # a.out. (We use the source path set by the "dir" command.)
+
+ gdb_test "dir ${objdir}/${subdir}" "Source directories searched: .*" \
+ "set source path"
+
+ gdb_test "cd /tmp" "Working directory /tmp." \
+ "cd away from process working directory"
+
+ # Explicitly flush out any knowledge of the previous attachment.
+
+ set test "before attach-32-3, flush symbols"
+ gdb_test_multiple "symbol" "$test" {
+ -re "Discard symbol table from.*y or n. $" {
+ gdb_test "y" "No symbol file now." \
+ "$test"
+ }
+ -re "No symbol file now.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ gdb_test "exec" "No executable file now." \
+ "before attach-32-3, flush exec"
+
+ gdb_test "attach $testpid" \
+ "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*" \
+ "attach-32 when process' a.out not in cwd"
+
+ set test "after attach-32-3, exit"
+ gdb_test_multiple "kill" "$test" {
+ -re "Kill the program being debugged.*y or n. $" {
+ gdb_test "y" "" "$test"
+ }
+ }
+
+ # Another "don't leave a process around"
+ remote_exec build "kill -9 ${testpid}"
+}
+
+proc do_call_attach_tests {} {
+ global gdb_prompt
+ global binfile2
+ global testpid
+
+ # See if other registers are problems
+
+ set test "info other register"
+ gdb_test_multiple "i r r3" "$test" {
+ -re "warning: reading register.*$gdb_prompt $" {
+ fail "$test"
+ }
+ -re "r3.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ # Get rid of the process
+
+ gdb_test "p should_exit = 1"
+ gdb_test "c" "Program exited normally."
+
+ # Be paranoid
+
+ remote_exec build "kill -9 ${testpid}"
+}
+
+
+# Start with a fresh gdb
+
+gdb_exit
+set testpid [eval exec $binfile &]
+exec sleep 3
+if { [istarget "*-*-cygwin*"] } {
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
+ # different due to the way fork/exec works.
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+}
+
+set GDBFLAGS_orig $GDBFLAGS
+set GDBFLAGS "--pid=$testpid"
+gdb_start
+set GDBFLAGS $GDBFLAGS_orig
+
+gdb_reinitialize_dir $srcdir/$subdir
+
+# This is a test of gdb's ability to attach to a running process.
+
+do_attach_tests
+
+# Test attaching when the target is inside a system call
+
+gdb_exit
+set testpid [eval exec $binfile2 &]
+exec sleep 3
+if { [istarget "*-*-cygwin*"] } {
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
+ # different due to the way fork/exec works.
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+}
+
+set GDBFLAGS_orig $GDBFLAGS
+set GDBFLAGS "--pid=$testpid"
+gdb_start
+set GDBFLAGS $GDBFLAGS_orig
+
+gdb_reinitialize_dir $srcdir/$subdir
+do_call_attach_tests
+
+return 0
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c 2008-12-07 10:06:03.000000000 +0100
@@ -0,0 +1,24 @@
+/* This program is intended to be started outside of gdb, and then
+ attached to by gdb. Thus, it simply spins in a loop. The loop
+ is exited when & if the variable 'should_exit' is non-zero. (It
+ is initialized to zero in this program, so the loop will never
+ exit unless/until gdb sets the variable to non-zero.)
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int should_exit = 0;
+
+int main ()
+{
+ int local_i = 0;
+
+ sleep( 10 ); /* System call causes register fetch to fail */
+ /* This is a known HPUX "feature" */
+ while (! should_exit)
+ {
+ local_i++;
+ }
+ return (0);
+}
++++++ gdb-6.3-inheritance-20050324.patch ++++++
2005-03-24 Jeff Johnston <jjohnstn(a)redhat.com>
* valops.c (check_field_in): Use check_typedef for base classes
to avoid problems with opaque type references.
Index: gdb-6.8.50.20081128/gdb/valops.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/valops.c 2008-12-08 10:56:11.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/valops.c 2008-12-08 10:59:14.000000000 +0100
@@ -2484,8 +2484,14 @@ check_field (struct type *type, const ch
}
for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
- if (check_field (TYPE_BASECLASS (type, i), name))
- return 1;
+ {
+ /* Check the base classes. Make sure we have the real type for
+ each base class as opposed to an opaque declaration. */
+ struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
+
+ if (check_field (baseclass, name))
+ return 1;
+ }
return 0;
}
++++++ gdb-6.3-inheritancetest-20050726.patch ++++++
2005-07-26 Jeff Johnston <jjohnstn(a)redhat.com>
* gdb.cp/b146835.exp: New testcase.
* gdb.cp/b146835.cc: Ditto.
* gdb.cp/b146835b.cc: Ditto.
* gdb.cp/b146835.h: Ditto.
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835b.cc.fix3 2005-07-26 16:47:12.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835b.cc 2005-07-26 16:53:31.000000000 -0400
@@ -0,0 +1,11 @@
+#include "b146835.h"
+
+C::C() { d = 0; x = 3; }
+
+int C::z (char *s) { return 0; }
+
+C::~C() {}
+
+void A::funcD (class E *e, class D *d) {}
+void A::funcE (E *e, D *d) {}
+void A::funcF (unsigned long x, D *d) {}
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835.cc.fix3 2005-07-26 16:47:20.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835.cc 2005-07-26 16:46:50.000000000 -0400
@@ -0,0 +1,32 @@
+#include "b146835.h"
+#include <iostream>
+
+class F : public C {
+
+protected:
+
+ virtual void funcA (unsigned long a, B *b);
+ virtual void funcB (E *e);
+ virtual void funcC (unsigned long x, bool y);
+
+ char *s1, *s2;
+ bool b1;
+ int k;
+
+public:
+ void foo() {
+ std::cout << "foo" << std::endl;
+ }
+};
+
+
+void F::funcA (unsigned long a, B *b) {}
+void F::funcB (E *e) {}
+void F::funcC (unsigned long x, bool y) {}
+
+int main()
+{
+ F f;
+ f.foo();
+}
+
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835.exp.fix3 2005-07-26 16:47:26.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835.exp 2005-07-26 16:46:50.000000000 -0400
@@ -0,0 +1,55 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# 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.
+
+# Check that GDB can properly print an inherited member variable
+# (Bugzilla 146835)
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "b146835"
+set srcfile ${testfile}.cc
+set srcfile2 ${testfile}b.cc
+set binfile ${objdir}/${subdir}/${testfile}
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+gdb_test "break 'F::foo()'" ""
+gdb_continue_to_breakpoint "First line foo"
+
+# Verify that we can access the inherited member d
+gdb_test "p d" ".*(struct D \*.).*0x0" "Verify inherited member d accessible"
+
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835.h.fix3 2005-07-26 16:47:36.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835.h 2005-07-26 16:53:18.000000000 -0400
@@ -0,0 +1,36 @@
+
+class A {
+
+protected:
+
+ virtual void funcA (unsigned long a, class B *b) = 0;
+ virtual void funcB (class E *e) = 0;
+ virtual void funcC (unsigned long x, bool y) = 0;
+
+ void funcD (class E *e, class D* d);
+ virtual void funcE (E *e, D *d);
+ virtual void funcF (unsigned long x, D *d);
+};
+
+
+class C : public A {
+
+protected:
+
+ int x;
+ class K *k;
+ class H *h;
+
+ D *d;
+
+ class W *w;
+ class N *n;
+ class L *l;
+ unsigned long *r;
+
+public:
+
+ C();
+ int z (char *s);
+ virtual ~C();
+};
++++++ gdb-6.3-large-core-20051206.patch ++++++
2005-12-14 Jeff Johnston <jjohnstn(a)redhat.com>
* symfile-mem.c (read_memory): New static read callback function.
(symfile_add_from_memory): Pass read_memory to bfd instead of
target_read_memory.
* target.c (target_xfer_memory): Add support for LONGEST len and
change all callers.
(deprecated_debug_xfer_memory, target_read_memory): Ditto.
(target_write_memory, do_xfer_memory): Ditto.
(target_xfer_memory_partial, target_read_memory_partial): Ditto.
(target_write_memory_partial): Ditto.
* infptrace.c (child_xfer_memory): Ditto.
* linux-nat.c (linux_nat_xfer_memory): Ditto.
(linux_nat_proc_xfer_memory): Ditto.
* dcache.c (dcache_xfer_memory): Ditto.
* exec.c (xfer_memory): Ditto.
* remote.c (remote_xfer_memory): Ditto.
* remote-sim.c (gdbsim_xfer_interior_memory): Ditto.
* target.h: Change prototypes for functions changed above.
* linux-nat.h: Ditto.
* remote.h: Ditto.
* dcache.h: Ditto.
2007-10-15 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
Index: gdb-6.8.50.20090226/gdb/symfile-mem.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/symfile-mem.c 2009-02-21 17:14:49.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/symfile-mem.c 2009-02-28 07:22:09.000000000 +0100
@@ -56,6 +56,14 @@
#include "elf/common.h"
+/* Local callback routine to pass to bfd to read from target memory,
+ using a len constrained to INT_MAX. */
+static int
+read_target_memory (bfd_vma addr, bfd_byte *buf, int len)
+{
+ return target_read_memory (addr, buf, (LONGEST)len);
+}
+
/* Read inferior memory at ADDR to find the header of a loaded object file
and read its in-core symbols out of inferior memory. TEMPL is a bfd
representing the target's format. NAME is the name to use for this
@@ -76,7 +84,7 @@ symbol_file_add_from_memory (struct bfd
error (_("add-symbol-file-from-memory not supported for this target"));
nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase,
- target_read_memory);
+ read_target_memory);
if (nbfd == NULL)
error (_("Failed to read a valid object file image from memory."));
Index: gdb-6.8.50.20090226/gdb/target.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/target.c 2009-02-27 00:04:32.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/target.c 2009-02-28 07:22:09.000000000 +0100
@@ -57,7 +57,7 @@ static int nosymbol (char *, CORE_ADDR *
static void tcomplain (void) ATTR_NORETURN;
-static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
+static LONGEST nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
static int return_zero (void);
@@ -286,7 +286,7 @@ target_create_inferior (char *exec_file,
}
-static int
+static LONGEST
nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
struct target_ops *t)
{
@@ -507,7 +507,7 @@ update_current_target (void)
(void (*) (struct regcache *))
noprocess);
de_fault (deprecated_xfer_memory,
- (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *))
+ (LONGEST (*) (CORE_ADDR, gdb_byte *, LONGEST, int, struct mem_attrib *, struct target_ops *))
nomemory);
de_fault (to_files_info,
(void (*) (struct target_ops *))
@@ -1237,7 +1237,7 @@ target_xfer_partial (struct target_ops *
it makes no progress, and then return how much was transferred). */
int
-target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
+target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len)
{
if (target_read (¤t_target, TARGET_OBJECT_MEMORY, NULL,
myaddr, memaddr, len) == len)
@@ -1247,7 +1247,7 @@ target_read_memory (CORE_ADDR memaddr, g
}
int
-target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
+target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, LONGEST len)
{
if (target_write (¤t_target, TARGET_OBJECT_MEMORY, NULL,
myaddr, memaddr, len) == len)
@@ -2777,8 +2777,8 @@ debug_to_prepare_to_store (struct regcac
fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
}
-static int
-deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, int len,
+static LONGEST
+deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, LONGEST len,
int write, struct mem_attrib *attrib,
struct target_ops *target)
{
@@ -2788,8 +2788,8 @@ deprecated_debug_xfer_memory (CORE_ADDR
attrib, target);
fprintf_unfiltered (gdb_stdlog,
- "target_xfer_memory (%s, xxx, %d, %s, xxx) = %d",
- paddress (memaddr), len, write ? "write" : "read",
+ "target_xfer_memory (%s, xxx, %ld, %s, xxx) = %d",
+ paddress (memaddr), (long) len, write ? "write" : "read",
retval);
if (retval > 0)
Index: gdb-6.8.50.20090226/gdb/target.h
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/target.h 2009-02-27 00:04:32.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/target.h 2009-02-28 07:22:09.000000000 +0100
@@ -376,10 +376,10 @@ struct target_ops
NOTE: cagney/2004-10-01: This has been entirely superseeded by
to_xfer_partial and inferior inheritance. */
- int (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr,
- int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target);
+ LONGEST (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr,
+ LONGEST len, int write,
+ struct mem_attrib *attrib,
+ struct target_ops *target);
void (*to_files_info) (struct target_ops *);
int (*to_insert_breakpoint) (struct bp_target_info *);
@@ -679,13 +679,14 @@ extern DCACHE *target_dcache;
extern int target_read_string (CORE_ADDR, char **, int, int *);
-extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
+extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
+ LONGEST len);
extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
- int len);
+ LONGEST len);
-extern int xfer_memory (CORE_ADDR, gdb_byte *, int, int,
- struct mem_attrib *, struct target_ops *);
+extern LONGEST xfer_memory (CORE_ADDR, gdb_byte *, LONGEST, int,
+ struct mem_attrib *, struct target_ops *);
/* Fetches the target's memory map. If one is found it is sorted
and returned, after some consistency checking. Otherwise, NULL
Index: gdb-6.8.50.20090226/gdb/dcache.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/dcache.c 2009-01-03 06:57:51.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/dcache.c 2009-02-28 07:22:09.000000000 +0100
@@ -524,9 +524,9 @@ dcache_free (DCACHE *dcache)
This routine is indended to be called by remote_xfer_ functions. */
-int
+LONGEST
dcache_xfer_memory (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
- int len, int should_write)
+ LONGEST len, int should_write)
{
int i;
int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr);
Index: gdb-6.8.50.20090226/gdb/dcache.h
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/dcache.h 2009-01-03 06:57:51.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/dcache.h 2009-02-28 07:22:09.000000000 +0100
@@ -35,7 +35,7 @@ void dcache_free (DCACHE *);
/* Simple to call from <remote>_xfer_memory */
-int dcache_xfer_memory (DCACHE *cache, CORE_ADDR mem, gdb_byte *my,
- int len, int should_write);
+LONGEST dcache_xfer_memory (DCACHE *cache, CORE_ADDR mem, gdb_byte *my,
+ LONGEST len, int should_write);
#endif /* DCACHE_H */
Index: gdb-6.8.50.20090226/gdb/exec.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/exec.c 2009-02-22 20:35:47.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/exec.c 2009-02-28 07:22:09.000000000 +0100
@@ -464,8 +464,8 @@ map_vmap (bfd *abfd, bfd *arch)
The same routine is used to handle both core and exec files;
we just tail-call it with more arguments to select between them. */
-int
-xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
+LONGEST
+xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len, int write,
struct mem_attrib *attrib, struct target_ops *target)
{
int res;
Index: gdb-6.8.50.20090226/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/linux-nat.c 2009-02-28 07:22:02.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/linux-nat.c 2009-02-28 07:22:32.000000000 +0100
@@ -4407,7 +4407,7 @@ linux_xfer_partial (struct target_ops *o
#endif
if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
{ /* This region contains ia64 rse registers, we have to re-read. */
- int xxfer;
+ LONGEST xxfer;
/* Re-read register stack area. */
xxfer = super_xfer_partial (ops, object, annex,
Index: gdb-6.8.50.20090226/gdb/remote.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/remote.c 2009-02-25 03:14:22.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/remote.c 2009-02-28 07:22:09.000000000 +0100
@@ -25,6 +25,7 @@
#include "gdb_string.h"
#include <ctype.h>
#include <fcntl.h>
+#include <limits.h>
#include "inferior.h"
#include "bfd.h"
#include "symfile.h"
@@ -5683,12 +5684,19 @@ handle_notification (char *buf, size_t l
if SHOULD_WRITE is nonzero. Returns length of data written or
read; 0 for error. TARGET is unused. */
-static int
-remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, int mem_len,
+static LONGEST
+remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, LONGEST mem_len,
int should_write, struct mem_attrib *attrib,
struct target_ops *target)
{
int res;
+ int len;
+
+ /* This routine is not set up to handle > INT_MAX bytes. */
+ if (mem_len >= (LONGEST)INT_MAX)
+ return 0;
+
+ len = (int)mem_len;
set_general_thread (inferior_ptid);
@@ -5697,7 +5705,7 @@ remote_xfer_memory (CORE_ADDR mem_addr,
else
res = remote_read_bytes (mem_addr, buffer, mem_len);
- return res;
+ return (LONGEST)res;
}
/* Sends a packet with content determined by the printf format string
Index: gdb-6.8.50.20090226/gdb/remote-sim.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/remote-sim.c 2009-02-23 19:31:23.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/remote-sim.c 2009-02-28 07:22:09.000000000 +0100
@@ -754,11 +754,14 @@ gdbsim_prepare_to_store (struct regcache
Returns the number of bytes transferred. */
-static int
-gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
+static LONGEST
+gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len,
int write, struct mem_attrib *attrib,
struct target_ops *target)
{
+ /* Convert to len type that sim_read and sim_write can handle. */
+ int xfer_len = (int)len;
+
/* If no program is running yet, then ignore the simulator for
memory. Pass the request down to the next target, hopefully
an exec file. */
@@ -774,22 +777,22 @@ gdbsim_xfer_inferior_memory (CORE_ADDR m
printf_filtered ("gdbsim_xfer_inferior_memory: myaddr 0x");
gdb_print_host_address (myaddr, gdb_stdout);
printf_filtered (", memaddr 0x%s, len %d, write %d\n",
- paddr_nz (memaddr), len, write);
+ paddr_nz (memaddr), xfer_len, write);
if (remote_debug && write)
- dump_mem (myaddr, len);
+ dump_mem (myaddr, xfer_len);
}
if (write)
{
- len = sim_write (gdbsim_desc, memaddr, myaddr, len);
+ xfer_len = sim_write (gdbsim_desc, memaddr, myaddr, xfer_len);
}
else
{
- len = sim_read (gdbsim_desc, memaddr, myaddr, len);
- if (remote_debug && len > 0)
- dump_mem (myaddr, len);
+ xfer_len = sim_read (gdbsim_desc, memaddr, myaddr, xfer_len);
+ if (remote_debug && xfer_len > 0)
+ dump_mem (myaddr, xfer_len);
}
- return len;
+ return (LONGEST)xfer_len;
}
static void
++++++ gdb-6.3-linespec-20041213.patch ++++++
[base]
2007-09-21 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* linespec.c (add_minsym_members): Support also the `$allocate' and
`$delete' variants.
2007-10-05 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* linespec.c (add_minsym_members): Support also the `$allocate' and
`$delete' variants.
(decode_variable): Renamed to ...
(decode_variable_1) ... here, its parameter NOT_FOUND_PTR and its
exception throwing was moved to ...
(decode_variable_not_found): ... a new function here.
(decode_variable): New function.
2007-10-31 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
[ Remove decode_variable* for GDB-6.8+ as no longer needed. ]
Index: gdb-6.8.50.20081128/gdb/linespec.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/linespec.c 2008-09-05 13:37:17.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/linespec.c 2008-12-04 01:43:36.000000000 +0100
@@ -39,6 +39,7 @@
#include "interps.h"
#include "mi/mi-cmds.h"
#include "target.h"
+#include "gdb_assert.h"
/* We share this one with symtab.c, but it is not exported widely. */
@@ -78,7 +79,8 @@ static struct symtabs_and_lines find_met
static int collect_methods (char *copy, struct type *t,
struct symbol *sym_class,
- struct symbol **sym_arr);
+ struct symbol **sym_arr,
+ struct minimal_symbol **msym_arr);
static NORETURN void cplusplus_error (const char *name,
const char *fmt, ...)
@@ -87,11 +89,13 @@ static NORETURN void cplusplus_error (co
static int total_number_of_methods (struct type *type);
static int find_methods (struct type *, char *,
- enum language, struct symbol **);
+ enum language, struct symbol **,
+ struct minimal_symbol **);
static int add_matching_methods (int method_counter, struct type *t,
enum language language,
- struct symbol **sym_arr);
+ struct symbol **sym_arr,
+ struct minimal_symbol **msym_arr);
static int add_constructors (int method_counter, struct type *t,
enum language language,
@@ -107,6 +111,9 @@ static int is_objc_method_format (const
static struct symtabs_and_lines decode_line_2 (struct symbol *[],
int, int, char ***);
+static struct symtabs_and_lines decode_line_3 (struct minimal_symbol *[],
+ int, int, char ***);
+
static struct symtab *symtab_from_filename (char **argptr,
char *p, int is_quote_enclosed,
int *not_found_ptr);
@@ -196,13 +203,18 @@ total_number_of_methods (struct type *ty
/* Recursive helper function for decode_line_1.
Look for methods named NAME in type T.
Return number of matches.
- Put matches in SYM_ARR, which should have been allocated with
+ Put symbol matches in SYM_ARR, which should have been allocated with
a size of total_number_of_methods (T) * sizeof (struct symbol *).
+ In a special case where we are looking for constructors, we may
+ have to return minimal symbols in the array: MSYM_ARR. This occurs
+ when the compiler does not generate mangled names for the constructor's
+ debug info because there are multiple versions of the constructor
+ (in-charge vs not-in-charge).
Note that this function is g++ specific. */
static int
find_methods (struct type *t, char *name, enum language language,
- struct symbol **sym_arr)
+ struct symbol **sym_arr, struct minimal_symbol **msym_arr)
{
int i1 = 0;
int ibase;
@@ -244,7 +256,7 @@ find_methods (struct type *t, char *name
if (strcmp_iw (name, method_name) == 0)
/* Find all the overloaded methods with that name. */
i1 += add_matching_methods (method_counter, t, language,
- sym_arr + i1);
+ sym_arr + i1, msym_arr);
else if (strncmp (class_name, name, name_len) == 0
&& (class_name[name_len] == '\0'
|| class_name[name_len] == '<'))
@@ -267,21 +279,100 @@ find_methods (struct type *t, char *name
if (i1 == 0)
for (ibase = 0; ibase < TYPE_N_BASECLASSES (t); ibase++)
i1 += find_methods (TYPE_BASECLASS (t, ibase), name,
- language, sym_arr + i1);
+ language, sym_arr + i1, msym_arr);
return i1;
}
+static int
+add_minsym_members (const char *class_name,
+ const char *member_name,
+ struct minimal_symbol **msym_arr)
+{
+ char *completion_name;
+ char **list;
+ int i;
+ int comp_len;
+ int counter = 0;
+
+ /* To find the member, we first cheat and use symbol completion.
+ This will give us a list of all the member names including
+ the function signature. */
+ completion_name = xmalloc (strlen (class_name) +
+ strlen (member_name) + 9);
+ completion_name[0] = '\'';
+ strcpy (completion_name+1, class_name);
+ /* FIXME: make this the language class separator. */
+ strcat (completion_name, "::");
+ strcat (completion_name, member_name);
+ strcat (completion_name, "(");
+ list = make_symbol_completion_list (completion_name,
+ completion_name+1);
+
+ /* Now that we have the list, we generate an array of their
+ corresponding minimal symbols. */
+ counter = 0;
+ while (list && list[counter] != NULL)
+ {
+ msym_arr[counter] = lookup_minimal_symbol (list[counter], NULL, NULL);
+ ++counter;
+ }
+
+ xfree (list);
+
+ /* In the case of constructors, there may be in-charge vs not-in-charge
+ constructors. Check for names with $base which indicates not-in-charge
+ constructors. */
+ comp_len = strlen (completion_name);
+ strcpy (completion_name + comp_len - 1, "$base(");
+ list = make_symbol_completion_list (completion_name,
+ completion_name+1);
+
+ /* Again we have a list. Add their minimal symbols to the array. */
+ i = 0;
+ while (list && list[i] != NULL)
+ {
+ msym_arr[counter] = lookup_minimal_symbol (list[i++], NULL, NULL);
+ ++counter;
+ }
+ xfree (list);
+
+ /* Target also the allocating/deleting variants. */
+ if (member_name[0] == '~')
+ strcpy (completion_name + comp_len - 1, "$delete(");
+ else
+ strcpy (completion_name + comp_len - 1, "$allocate(");
+ list = make_symbol_completion_list (completion_name,
+ completion_name+1);
+
+ /* Again we have a list. Add their minimal symbols to the array. */
+ i = 0;
+ while (list && list[i] != NULL)
+ {
+ msym_arr[counter] = lookup_minimal_symbol (list[i++], NULL, NULL);
+ ++counter;
+ }
+ xfree (list);
+
+ xfree (completion_name);
+
+ return counter;
+}
+
/* Add the symbols associated to methods of the class whose type is T
and whose name matches the method indexed by METHOD_COUNTER in the
array SYM_ARR. Return the number of methods added. */
static int
add_matching_methods (int method_counter, struct type *t,
- enum language language, struct symbol **sym_arr)
+ enum language language, struct symbol **sym_arr,
+ struct minimal_symbol **msym_arr)
{
int field_counter;
int i1 = 0;
+ int cons_index = 0;
+ char *class_name = type_name_no_tag (t);
+ char **list = NULL;
for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
field_counter >= 0;
@@ -306,6 +397,16 @@ add_matching_methods (int method_counter
else
phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
+ /* Check for special case of looking for member that
+ doesn't have a mangled name provided. This will happen
+ when we have in-charge and not-in-charge constructors.
+ Since we don't have a mangled name to work with, if we
+ look for the symbol, we can only find the class itself.
+ We can find the information we need in the minimal symbol
+ table which has the full member name information we need. */
+ if (strlen (phys_name) <= strlen (class_name))
+ return add_minsym_members (class_name, phys_name, msym_arr);
+
/* Destructor is handled by caller, don't add it to
the list. */
if (is_destructor_name (phys_name) != 0)
@@ -330,6 +431,9 @@ add_matching_methods (int method_counter
}
}
+ if (list)
+ xfree (list);
+
return i1;
}
@@ -630,6 +734,146 @@ See set/show multiple-symbol."));
discard_cleanups (old_chain);
return return_values;
}
+
+/* Given a list of NELTS minimal symbols in MSYM_ARR, return a list of lines to
+ operate on (ask user if necessary).
+ If CANONICAL is non-NULL return a corresponding array of mangled names
+ as canonical line specs there. */
+
+static struct symtabs_and_lines
+decode_line_3 (struct minimal_symbol *msym_arr[],
+ int nelts, int funfirstline,
+ char ***canonical)
+{
+ struct symtabs_and_lines values, return_values;
+ char *args, *arg1;
+ int i;
+ char *prompt;
+ char *symname;
+ struct cleanup *old_chain;
+ char **canonical_arr = (char **) NULL;
+
+ values.sals = (struct symtab_and_line *)
+ alloca (nelts * sizeof (struct symtab_and_line));
+ return_values.sals = (struct symtab_and_line *)
+ xmalloc (nelts * sizeof (struct symtab_and_line));
+ old_chain = make_cleanup (xfree, return_values.sals);
+
+ if (canonical)
+ {
+ canonical_arr = (char **) xmalloc (nelts * sizeof (char *));
+ make_cleanup (xfree, canonical_arr);
+ memset (canonical_arr, 0, nelts * sizeof (char *));
+ *canonical = canonical_arr;
+ }
+
+ i = 0;
+ printf_unfiltered ("[0] cancel\n[1] all\n");
+ while (i < nelts)
+ {
+ init_sal (&return_values.sals[i]); /* Initialize to zeroes. */
+ init_sal (&values.sals[i]);
+ if (msym_arr[i])
+ {
+ struct symtabs_and_lines msal = minsym_found (funfirstline,
+ msym_arr[i]);
+ memcpy (&values.sals[i], &msal.sals[0],
+ sizeof (struct symtab_and_line));
+ if (values.sals[i].symtab)
+ printf_unfiltered ("[%d] %s at %s:%d\n",
+ (i + 2),
+ SYMBOL_PRINT_NAME (msym_arr[i]),
+ values.sals[i].symtab->filename,
+ values.sals[i].line);
+ else
+ printf_unfiltered ("[%d] %s at ?FILE:%d [No symtab? Probably broken debug info...]\n",
+ (i + 2),
+ SYMBOL_PRINT_NAME (msym_arr[i]),
+ values.sals[i].line);
+
+ }
+ else
+ printf_unfiltered ("?HERE\n");
+ i++;
+ }
+
+ prompt = getenv ("PS2");
+ if (prompt == NULL)
+ {
+ prompt = "> ";
+ }
+ args = command_line_input (prompt, 0, "overload-choice");
+
+ if (args == 0 || *args == 0)
+ error_no_arg ("one or more choice numbers");
+
+ i = 0;
+ while (*args)
+ {
+ int num;
+
+ arg1 = args;
+ while (*arg1 >= '0' && *arg1 <= '9')
+ arg1++;
+ if (*arg1 && *arg1 != ' ' && *arg1 != '\t')
+ error ("Arguments must be choice numbers.");
+
+ num = atoi (args);
+
+ if (num == 0)
+ error ("canceled");
+ else if (num == 1)
+ {
+ if (canonical_arr)
+ {
+ for (i = 0; i < nelts; i++)
+ {
+ if (canonical_arr[i] == NULL)
+ {
+ symname = SYMBOL_LINKAGE_NAME (msym_arr[i]);
+ canonical_arr[i] = savestring (symname, strlen (symname));
+ }
+ }
+ }
+ memcpy (return_values.sals, values.sals,
+ (nelts * sizeof (struct symtab_and_line)));
+ return_values.nelts = nelts;
+ discard_cleanups (old_chain);
+ return return_values;
+ }
+
+ if (num >= nelts + 2)
+ {
+ printf_unfiltered ("No choice number %d.\n", num);
+ }
+ else
+ {
+ num -= 2;
+ if (values.sals[num].pc)
+ {
+ if (canonical_arr)
+ {
+ symname = SYMBOL_LINKAGE_NAME (msym_arr[num]);
+ make_cleanup (xfree, symname);
+ canonical_arr[i] = savestring (symname, strlen (symname));
+ }
+ return_values.sals[i++] = values.sals[num];
+ values.sals[num].pc = 0;
+ }
+ else
+ {
+ printf_unfiltered ("duplicate request for %d ignored.\n", num);
+ }
+ }
+
+ args = arg1;
+ while (*args == ' ' || *args == '\t')
+ args++;
+ }
+ return_values.nelts = i;
+ discard_cleanups (old_chain);
+ return return_values;
+}
/* The parser of linespec itself. */
@@ -1438,35 +1682,47 @@ find_method (int funfirstline, char ***c
struct symbol **sym_arr = alloca (total_number_of_methods (t)
* sizeof (struct symbol *));
+ struct minimal_symbol **msym_arr = alloca (total_number_of_methods (t)
+ * sizeof (struct minimal_symbol *));
+
+ msym_arr[0] = NULL;
+
/* Find all methods with a matching name, and put them in
sym_arr. */
- i1 = collect_methods (copy, t, sym_class, sym_arr);
+ i1 = collect_methods (copy, t, sym_class, sym_arr, msym_arr);
if (i1 == 1)
{
/* There is exactly one field with that name. */
- sym = sym_arr[0];
-
- if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
- {
- values.sals = (struct symtab_and_line *)
- xmalloc (sizeof (struct symtab_and_line));
- values.nelts = 1;
- values.sals[0] = find_function_start_sal (sym,
- funfirstline);
- }
+ if (msym_arr[0] != NULL)
+ return minsym_found (funfirstline, msym_arr[0]);
else
{
- values.sals = NULL;
- values.nelts = 0;
+ sym = sym_arr[0];
+
+ if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
+ {
+ values.sals = (struct symtab_and_line *)
+ xmalloc (sizeof (struct symtab_and_line));
+ values.nelts = 1;
+ values.sals[0] = find_function_start_sal (sym,
+ funfirstline);
+ }
+ else
+ {
+ values.sals = NULL;
+ values.nelts = 0;
+ }
+ return values;
}
- return values;
}
if (i1 > 0)
{
/* There is more than one field with that name
(overloaded). Ask the user which one to use. */
+ if (msym_arr[0] != NULL)
+ return decode_line_3 (msym_arr, i1, funfirstline, canonical);
return decode_line_2 (sym_arr, i1, funfirstline, canonical);
}
else
@@ -1493,11 +1748,12 @@ find_method (int funfirstline, char ***c
}
/* Find all methods named COPY in the class whose type is T, and put
- them in SYM_ARR. Return the number of methods found. */
+ them in SYM_ARR or MSYM_ARR. Return the number of methods found. */
static int
collect_methods (char *copy, struct type *t,
- struct symbol *sym_class, struct symbol **sym_arr)
+ struct symbol *sym_class, struct symbol **sym_arr,
+ struct minimal_symbol **msym_arr)
{
int i1 = 0; /* Counter for the symbol array. */
@@ -1518,7 +1774,7 @@ collect_methods (char *copy, struct type
}
}
else
- i1 = find_methods (t, copy, SYMBOL_LANGUAGE (sym_class), sym_arr);
+ i1 = find_methods (t, copy, SYMBOL_LANGUAGE (sym_class), sym_arr, msym_arr);
return i1;
}
++++++ gdb-6.3-mapping-zero-inode-test.patch ++++++
--- /dev/null 2008-05-02 23:36:22.370004160 +0200
+++ gdb-6.8/gdb/testsuite/gdb.base/gcore-shmid0.exp 2008-05-03 22:36:56.000000000 +0200
@@ -0,0 +1,120 @@
+# Copyright 2007 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(a)prep.ai.mit.edu
+
+# Test GDB's handling of gcore for mapping with a name but zero inode.
+
+set testfile "gcore-shmid0"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested gcore.exp
+ return -1
+}
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Does this gdb support gcore?
+send_gdb "help gcore\n"
+gdb_expect {
+ -re "Undefined command: .gcore.*$gdb_prompt $" {
+ # gcore command not supported -- nothing to test here.
+ unsupported "gdb does not support gcore on this target"
+ return -1;
+ }
+ -re "Save a core file .*$gdb_prompt $" {
+ pass "help gcore"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "help gcore"
+ }
+ timeout {
+ fail "help gcore (timeout)"
+ }
+}
+
+if { ! [ runto_main ] } then {
+ untested gcore-shmid0.exp
+ return -1
+}
+
+gdb_breakpoint "initialized"
+gdb_breakpoint "unresolved"
+
+set test "Continue to initialized."
+gdb_test_multiple "continue" $test {
+ -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" {
+ unsupported $test
+ return -1
+ }
+}
+
+set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore-shmid0.test]
+
+set test "save a corefile"
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore-shmid0.test" $test {
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass $test
+ }
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
+ unsupported $test
+ }
+ eof {
+ fail $test
+ }
+}
+
+# Be sure to remove the handle first.
+# But it would get removed even on a kill by GDB as the handle is already
+# deleted, just it is still attached.
+gdb_continue_to_end "finish"
+
+set test "core-file command"
+gdb_test_multiple "core-file $objdir/$subdir/gcore-shmid0.test" $test {
+ -re ".* program is being debugged already.*y or n. $" {
+ # gdb_load may connect us to a gdbserver.
+ send_gdb "y\n"
+ exp_continue;
+ }
+ -re "Core was generated by .*\r\n\#0 .*\\\(\\\).*\r\n$gdb_prompt $" {
+ # The filename does not fit there anyway so do not check it.
+ pass $test
+ }
+ -re ".*registers from core file: File in wrong format.* $" {
+ fail "core-file command (could not read registers from core file)"
+ }
+}
+
+set test "backtrace"
+gdb_test_multiple "bt" $test {
+ -re "#0 *initialized \\\(\\\) at .*#1 .* main \\\(.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "#0 *initialized \\\(\\\) at .*Cannot access memory at address .*$gdb_prompt $" {
+ fail $test
+ }
+}
--- /dev/null 2008-05-02 23:36:22.370004160 +0200
+++ gdb-6.8/gdb/testsuite/gdb.base/gcore-shmid0.c 2008-05-03 22:39:10.000000000 +0200
@@ -0,0 +1,95 @@
+/* Copyright 2007 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ 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. */
+
+/*
+ * Test GDB's handling of gcore for mapping with a name but zero inode.
+ */
+
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <assert.h>
+
+/* We need a backtrace through the stack. */
+
+static void
+initialized (void)
+{
+}
+
+static void
+unresolved (void)
+{
+}
+
+int
+main (void)
+{
+ int sid;
+ unsigned int *addr = (void *) -1L;
+ int try;
+
+ /* The generated SID will cycle with an increment of 32768, try until it
+ * wraps to 0. */
+
+ for (try = 0; addr == (void *) -1L; try++)
+ {
+ /* At least kernel-2.6.25-8.fc9.x86_64 just never returns the value 0 by
+ shmget(2). */
+ if (try > 0x10000)
+ {
+ printf ("Problem no longer reproducible on this kernel (try %d)\n",
+ try);
+ unresolved ();
+ exit (1);
+ }
+
+ sid = shmget ((key_t) rand (), 0x1000, IPC_CREAT | IPC_EXCL | 0777);
+ if (sid == -1)
+ {
+ printf ("shmget (%d, 0x1000, IPC_CREAT): errno %d\n", 0, errno);
+ exit (1);
+ }
+
+ /* Use SID only if it is 0, retry it otherwise. */
+
+ if (sid == 0)
+ {
+ addr = shmat (sid, NULL, SHM_RND);
+ if (addr == (void *) -1L)
+ {
+ printf ("shmat (%d, NULL, SHM_RND): errno %d\n", sid,
+ errno);
+ exit (1);
+ }
+ }
+ if (shmctl (sid, IPC_RMID, NULL) != 0)
+ {
+ printf ("shmctl (%d, IPC_RMID, NULL): errno %d\n", sid, errno);
+ exit (1);
+ }
+ }
+
+ initialized ();
+
+ return 0;
+}
++++++ gdb-6.3-nonthreaded-wp-20050117.patch ++++++
[base]
2007-10-13 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* linux-nat.c (iterate_over_lwps): Fixed missing LWP initialization for
current INFERIOR_PTID.
2007-10-13 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.base/follow-child.exp, gdb.base/follow-child.c: New files.
2007-10-16 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
2008-02-24 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.8pre.
2008-08-25 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Remove the fix as causing an assertion failure for
gdb.base/checkpoint.exp and it is no longer needed for
gdb.base/follow-child.exp .
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.c 2008-02-22 08:14:04.000000000 +0100
@@ -0,0 +1,29 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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(a)prep.ai.mit.edu */
+
+#include <unistd.h>
+
+int main()
+{
+ fork ();
+ sleep (60);
+ return 0;
+}
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.exp 2008-02-22 08:14:17.000000000 +0100
@@ -0,0 +1,55 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile follow-child
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# For C programs, "start" should stop in main().
+
+gdb_test "set follow-fork-mode child" ""
+set test "started"
+# GDB_RUN_CMD already checks for `Starting program:'.
+gdb_run_cmd
+sleep 5
+send_gdb "\003"
+set test "break"
+gdb_test_multiple "" $test {
+ -re "Program received signal SIGINT.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "\\\[New process \[0-9\]+\\\]" {
+ fail $test
+ }
+}
++++++ gdb-6.3-pie-20050110.patch ++++++
++++ 1441 lines (skipped)
++++++ gdb-6.3-ppc64displaysymbol-20041124.patch ++++++
2004-11-24 Andrew Cagney <cagney(a)gnu.org>
* printcmd.c (build_address_symbolic): Find a section for the
address.
Index: gdb-6.8.50.20081128/gdb/printcmd.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/printcmd.c 2008-12-04 01:36:05.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/printcmd.c 2008-12-04 01:37:18.000000000 +0100
@@ -616,6 +616,14 @@ build_address_symbolic (CORE_ADDR addr,
addr = overlay_mapped_address (addr, section);
}
}
+ /* To ensure that the symbol returned belongs to the correct setion
+ (and that the last [random] symbol from the previous section
+ isn't returned) try to find the section containing PC. First try
+ the overlay code (which by default returns NULL); and second try
+ the normal section code (which almost always succeeds). */
+ section = find_pc_overlay (addr);
+ if (section == NULL)
+ section = find_pc_section (addr);
/* First try to find the address in the symbol table, then
in the minsyms. Take the closest one. */
++++++ gdb-6.3-ppc64syscall-20040622.patch ++++++
2004-06-22 Andrew Cagney <cagney(a)gnu.org>
* rs6000-tdep.c (struct rs6000_framedata): Add field "func_start".
(skip_prologue): Delete local variable "orig_pc", use
"func_start". Add local variable "num_skip_linux_syscall_insn",
use to skip over first half of a GNU/Linux syscall and update
"func_start".
Index: gdb-6.8/gdb/rs6000-tdep.c
===================================================================
--- gdb-6.8.orig/gdb/rs6000-tdep.c 2008-02-20 15:34:43.000000000 +0100
+++ gdb-6.8/gdb/rs6000-tdep.c 2008-07-14 10:25:29.000000000 +0200
@@ -124,6 +124,7 @@ static const char *powerpc_vector_abi_st
struct rs6000_framedata
{
+ CORE_ADDR func_start; /* True function start. */
int offset; /* total size of frame --- the distance
by which we decrement sp to allocate
the frame */
@@ -1262,7 +1263,6 @@ static CORE_ADDR
skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
struct rs6000_framedata *fdata)
{
- CORE_ADDR orig_pc = pc;
CORE_ADDR last_prologue_pc = pc;
CORE_ADDR li_found_pc = 0;
gdb_byte buf[4];
@@ -1280,11 +1280,13 @@ skip_prologue (struct gdbarch *gdbarch,
int minimal_toc_loaded = 0;
int prev_insn_was_prologue_insn = 1;
int num_skip_non_prologue_insns = 0;
+ int num_skip_ppc64_gnu_linux_syscall_insn = 0;
int r0_contains_arg = 0;
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
memset (fdata, 0, sizeof (struct rs6000_framedata));
+ fdata->func_start = pc;
fdata->saved_gpr = -1;
fdata->saved_fpr = -1;
fdata->saved_vr = -1;
@@ -1313,6 +1315,55 @@ skip_prologue (struct gdbarch *gdbarch,
break;
op = extract_unsigned_integer (buf, 4);
+ /* A PPC64 GNU/Linux system call function is split into two
+ sub-functions: a non-threaded fast-path (__NAME_nocancel)
+ which does not use a frame; and a threaded slow-path
+ (Lpseudo_cancel) that does create a frame. Ref:
+ nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
+
+ *INDENT-OFF*
+ NAME:
+ SINGLE_THREAD_P
+ bne- .Lpseudo_cancel
+ __NAME_nocancel:
+ li r0,162
+ sc
+ bnslr+
+ b 0x7fe014ef64 <.__syscall_error>
+ Lpseudo_cancel:
+ stdu r1,-128(r1)
+ ...
+ *INDENT-ON*
+
+ Unfortunatly, because the latter case uses a local label (not
+ in the symbol table) a PC in "Lpseudo_cancel" appears to be
+ in "__NAME_nocancel". The following code recognizes this,
+ adjusting FUNC_START to point to where "Lpseudo_cancel"
+ should be, and parsing the prologue sequence as if
+ "Lpseudo_cancel" was the entry point. */
+
+ if (((op & 0xffff0000) == 0x38000000 /* li r0,N */
+ && pc == fdata->func_start + 0
+ && num_skip_ppc64_gnu_linux_syscall_insn == 0)
+ || (op == 0x44000002 /* sc */
+ && pc == fdata->func_start + 4
+ && num_skip_ppc64_gnu_linux_syscall_insn == 1)
+ || (op == 0x4ca30020 /* bnslr+ */
+ && pc == fdata->func_start + 8
+ && num_skip_ppc64_gnu_linux_syscall_insn == 2))
+ {
+ num_skip_ppc64_gnu_linux_syscall_insn++;
+ continue;
+ }
+ else if ((op & 0xfc000003) == 0x48000000 /* b __syscall_error */
+ && pc == fdata->func_start + 12
+ && num_skip_ppc64_gnu_linux_syscall_insn == 3)
+ {
+ num_skip_ppc64_gnu_linux_syscall_insn = -1;
+ fdata->func_start = pc;
+ continue;
+ }
+
if ((op & 0xfc1fffff) == 0x7c0802a6)
{ /* mflr Rx */
/* Since shared library / PIC code, which needs to get its
@@ -1486,9 +1537,9 @@ skip_prologue (struct gdbarch *gdbarch,
we have no line table information or the line info tells
us that the subroutine call is not part of the line
associated with the prologue. */
- if ((pc - orig_pc) > 8)
+ if ((pc - fdata->func_start) > 8)
{
- struct symtab_and_line prologue_sal = find_pc_line (orig_pc, 0);
+ struct symtab_and_line prologue_sal = find_pc_line (fdata->func_start, 0);
struct symtab_and_line this_sal = find_pc_line (pc, 0);
if ((prologue_sal.line == 0) || (prologue_sal.line != this_sal.line))
++++++ gdb-6.3-ppcdotsolib-20041022.patch ++++++
2004-10-22 Andrew Cagney <cagney(a)gnu.org>
* solib-svr4.c (enable_break): Convert a symbol descriptor into
the corresponding function entry point.
(solib_break_names): Delete "._dl_debug_state", no longer needed.
2007-10-12 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/solib-svr4.c
===================================================================
--- gdb-6.7.orig/gdb/solib-svr4.c 2007-10-09 20:03:30.000000000 +0200
+++ gdb-6.7/gdb/solib-svr4.c 2007-10-12 22:34:03.000000000 +0200
@@ -1089,7 +1089,15 @@ enable_break (void)
{
sym_addr = bfd_lookup_symbol (tmp_bfd, *bkpt_namep);
if (sym_addr != 0)
- break;
+ {
+ /* The symbol might be a descriptor, convert to into the
+ corresponding code address. */
+ sym_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ sym_addr,
+ tmp_bfd_target);
+ if (sym_addr != 0)
+ break;
+ }
}
if (sym_addr != 0)
++++++ gdb-6.3-readnever-20050907.patch ++++++
2004-11-18 Andrew Cagney <cagney(a)gnu.org>
* dwarf2read.c: Include "top.c".
(dwarf2_has_info): Check for readnever_symbol_files.
* symfile.c (readnever_symbol_files): Define.
* top.h (readnever_symbol_files): Declare.
* main.c (captured_main): Add --readnever option.
(print_gdb_help): Ditto.
2004-11-18 Andrew Cagney <cagney(a)gnu.org>
* gdb.texinfo (File Options): Document --readnever.
Index: gdb-6.8.50.20090228/gdb/doc/gdb.texinfo
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/doc/gdb.texinfo 2009-03-02 01:01:15.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/doc/gdb.texinfo 2009-03-02 01:01:23.000000000 +0100
@@ -988,6 +988,12 @@ Read each symbol file's entire symbol ta
the default, which is to read it incrementally as it is needed.
This makes startup slower, but makes future operations faster.
+@item --readnever
+@cindex @code{--readnever}
+Do not read each symbol file's symbolic debug information. This makes
+startup faster but at the expense of not being able to perform
+symbolic debugging.
+
@end table
@node Mode Options
Index: gdb-6.8.50.20090228/gdb/main.c
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/main.c 2009-03-02 01:01:17.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/main.c 2009-03-02 01:01:23.000000000 +0100
@@ -427,6 +427,7 @@ captured_main (void *data)
{"xdb", no_argument, &xdb_commands, 1},
{"dbx", no_argument, &dbx_commands, 1},
{"readnow", no_argument, &readnow_symbol_files, 1},
+ {"readnever", no_argument, &readnever_symbol_files, 1},
{"r", no_argument, &readnow_symbol_files, 1},
{"quiet", no_argument, &quiet, 1},
{"q", no_argument, &quiet, 1},
@@ -1070,6 +1071,7 @@ Options:\n\n\
fputs_unfiltered (_("\
--quiet Do not print version number on startup.\n\
--readnow Fully read symbol files on first access.\n\
+ --readnever Do not read symbol files.\n\
"), stream);
fputs_unfiltered (_("\
--se=FILE Use FILE as symbol file and executable file.\n\
Index: gdb-6.8.50.20090228/gdb/symfile.c
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/symfile.c 2009-03-02 01:01:17.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/symfile.c 2009-03-02 01:01:23.000000000 +0100
@@ -77,6 +77,7 @@ static void clear_symtab_users_cleanup (
/* Global variables owned by this file */
int readnow_symbol_files; /* Read full symbols immediately */
+int readnever_symbol_files; /* Never read full symbols. */
/* External variables and functions referenced. */
Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/dwarf2read.c 2009-03-02 01:01:15.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/dwarf2read.c 2009-03-02 01:01:36.000000000 +0100
@@ -49,6 +49,7 @@
#include "f-lang.h"
#include "c-lang.h"
#include "typeprint.h"
+#include "top.h"
#include <fcntl.h>
#include "gdb_string.h"
@@ -1161,7 +1162,8 @@ dwarf2_has_info (struct objfile *objfile
dwarf_aranges_section = 0;
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, &update_sizes);
- return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
+ return !readnever_symbol_files
+ && dwarf_info_section != NULL && dwarf_abbrev_section != NULL;
}
/* When loading sections, we can either look for ".<name>", or for
Index: gdb-6.8.50.20090228/gdb/top.h
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/top.h 2009-01-03 06:57:53.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/top.h 2009-03-02 01:01:23.000000000 +0100
@@ -59,6 +59,7 @@ extern void set_prompt (char *);
/* From random places. */
extern int readnow_symbol_files;
+extern int readnever_symbol_files;
/* Perform _initialize initialization */
extern void gdb_init (char *);
++++++ gdb-6.3-removebp-20041130.patch ++++++
2004-11-30 Jeff Johnston <jjohnstn(a)redhat.com>
* breakpoint.c (remove_breakpoints): Continue removing breakpoints
even if an error occurs. Remove a failure code for the last failure
only.
--- gdb+dejagnu-20040607/gdb/breakpoint.c.fix2 Tue Nov 30 18:01:33 2004
+++ gdb+dejagnu-20040607/gdb/breakpoint.c Tue Nov 30 18:06:01 2004
@@ -1297,6 +1297,7 @@ remove_breakpoints (void)
{
struct bp_location *b;
int val;
+ int return_val = 0;
ALL_BP_LOCATIONS (b)
{
@@ -1304,10 +1305,10 @@ remove_breakpoints (void)
{
val = remove_breakpoint (b, mark_uninserted);
if (val != 0)
- return val;
+ return_val = val;
}
}
- return 0;
+ return return_val;
}
int
++++++ gdb-6.3-rh-dummykfail-20041202.patch ++++++
2003-07-11 Elena Zannoni <ezannoni(a)redhat.com>
* lib/gdb.exp (setup_kfail, kfail): Redefine procedures.
--- ./gdb/testsuite/lib/gdb.exp.1 2004-11-24 15:59:46.131394720 -0500
+++ ./gdb/testsuite/lib/gdb.exp 2004-11-24 16:01:06.304206600 -0500
@@ -63,6 +63,15 @@
### Only procedures should come after this point.
+if {![llength [info procs kfail]]} {
+ proc setup_kfail { args } {
+ #setup_xfail args
+ }
+ proc kfail { bugid message } {
+ fail $message
+ }
+}
+
#
# gdb_version -- extract and print the version number of GDB
#
++++++ gdb-6.3-rh-testlibunwind1fix-20041202.patch ++++++
2004-08-03 Jeff Johnston <jjohnstn(a)redhat.com>
* gdb.arch/ia64-libunwind.exp: Fix test string to match
current code base.
--- gdb+dejagnu-20040607/gdb/testsuite/gdb.arch/ia64-libunwind.exp.fix Tue Aug 3 18:29:22 2004
+++ gdb+dejagnu-20040607/gdb/testsuite/gdb.arch/ia64-libunwind.exp Tue Aug 3 18:41:01 2004
@@ -51,5 +51,5 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
send_gdb "set debug arch 1\n"
send_gdb "break main\n"
-gdb_test "run" ".*acquire_unwind_info.*"
+gdb_test "run" ".*ia64_find_proc_info_x.*"
++++++ gdb-6.3-rh-testlibunwind-20041202.patch ++++++
2003-11-17 Elena Zannoni <ezannoni(a)redhat.com>
From Jeff Johnston <jjohnstn(a)redhat.com>
* gdb.arch/ia64-libunwind.exp: New file.
* gdb.arch/ia64-libunwind.c: New file.
--- /dev/null Thu Apr 11 10:25:15 2002
+++ gdb+dejagnu-20040223/gdb/testsuite/gdb.arch/ia64-libunwind.exp Mon Nov 17 15:57:04 2003
@@ -0,0 +1,55 @@
+# Copyright 2003 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(a)prep.ai.mit.edu
+
+# This file was written by Jeff Johnston (jjohnstn(a)redhat.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+if ![istarget "ia64-*-*"] then {
+ return
+}
+
+set testfile "ia64-libunwind"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+send_gdb "set debug arch 1\n"
+send_gdb "break main\n"
+gdb_test "run" ".*acquire_unwind_info.*"
+
--- /dev/null Thu Apr 11 10:25:15 2002
+++ gdb+dejagnu-20040223/gdb/testsuite/gdb.arch/ia64-libunwind.c Mon Nov 17 15:58:27 2003
@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+int main()
+{
+ printf ("hello world\n");
+
+ return 0;
+}
+
++++++ gdb-6.3-rh-testversion-20041202.patch ++++++
2003-02-24 Elena Zannoni <ezannoni(a)redhat.com>
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
string.
Index: gdb-6.8/gdb/testsuite/gdb.gdb/selftest.exp
===================================================================
--- gdb-6.8.orig/gdb/testsuite/gdb.gdb/selftest.exp 2008-01-26 14:56:37.000000000 +0100
+++ gdb-6.8/gdb/testsuite/gdb.gdb/selftest.exp 2008-07-14 10:23:50.000000000 +0200
@@ -354,6 +354,9 @@ proc test_with_self { executable } {
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
pass "printed version with cast"
}
+ -re ".\[0-9\]+ = .Fedora \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
+ pass "printed version Fedora only"
+ }
-re ".*$gdb_prompt $" { fail "printed version" }
timeout { fail "(timeout) printed version" }
}
++++++ gdb-6.3-security-errata-20050610.patch ++++++
http://sourceware.org/ml/gdb-patches/2005-05/threads.html#00637
Proposed upstream but never committed upstream.
2005-06-09 Jeff Johnston <jjohnstn(a)redhat.com>
* gdb.base/gdbinit.exp: New testcase.
* gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp.
2005-06-08 Daniel Jacobowitz <dan(a)codesourcery.com>
Jeff Johnston <jjohnstn(a)redhat.com>
* 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 <fcntl.h>.
(source_command): Update documentation. Check permissions if
FROM_TTY is -1.
Index: gdb-6.8.50.20090226/gdb/cli/cli-cmds.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/cli/cli-cmds.c 2009-02-27 00:04:32.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/cli/cli-cmds.c 2009-02-28 07:17:49.000000000 +0100
@@ -36,6 +36,7 @@
#include "objfiles.h"
#include "source.h"
#include "disasm.h"
+#include "gdb_stat.h"
#include "ui-out.h"
@@ -466,7 +467,7 @@ source_script (char *file, int from_tty)
if (fd == -1)
{
- if (from_tty)
+ if (from_tty > 0)
perror_with_name (file);
else
{
@@ -475,6 +476,29 @@ source_script (char *file, int from_tty)
}
}
+#ifdef HAVE_GETUID
+ if (from_tty == -1)
+ {
+ struct stat statbuf;
+
+ if (fstat (fd, &statbuf) < 0)
+ {
+ close (fd);
+ /* Do not do_cleanups (old_cleanups) as FILE is allocated there.
+ perror_with_name calls error which should call the cleanups. */
+ perror_with_name (file);
+ }
+ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH))
+ {
+ /* FILE gets freed by do_cleanups (old_cleanups). */
+ warning (_("not using untrusted file \"%s\""), file);
+ close (fd);
+ do_cleanups (old_cleanups);
+ return;
+ }
+ }
+#endif
+
is_python = source_python;
if (strlen (file) > 3 && !strcmp (&file[strlen (file) - 3], ".py"))
is_python = 1;
@@ -486,6 +510,7 @@ source_script (char *file, int from_tty)
else
script_from_file (stream, file);
+ /* FILE gets freed by do_cleanups (old_cleanups). */
do_cleanups (old_cleanups);
}
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.base/gdbinit.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.base/gdbinit.exp 2009-02-28 07:15:57.000000000 +0100
@@ -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(a)prep.ai.mit.edu
+
+# This file was written by Jeff Johnston <jjohnstn(a)redhat.com>.
+
+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"
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.base/gdbinit.sample
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.base/gdbinit.sample 2009-02-28 07:15:57.000000000 +0100
@@ -0,0 +1 @@
+echo "\nin gdbinit"
Index: gdb-6.8.50.20090226/gdb/main.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/main.c 2009-02-27 00:04:32.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/main.c 2009-02-28 07:15:57.000000000 +0100
@@ -855,7 +855,7 @@ Excess command line arguments ignored. (
debugging or what directory you are in. */
if (home_gdbinit && !inhibit_gdbinit)
- catch_command_errors (source_script, home_gdbinit, 0, RETURN_MASK_ALL);
+ catch_command_errors (source_script, home_gdbinit, -1, RETURN_MASK_ALL);
/* Now perform all the actions indicated by the arguments. */
if (cdarg != NULL)
@@ -924,7 +924,7 @@ Can't attach to process and specify a co
/* Read the .gdbinit file in the current directory, *if* it isn't
the same as the $HOME/.gdbinit file (it should exist, also). */
if (local_gdbinit && !inhibit_gdbinit)
- catch_command_errors (source_script, local_gdbinit, 0, RETURN_MASK_ALL);
+ catch_command_errors (source_script, local_gdbinit, -1, RETURN_MASK_ALL);
for (i = 0; i < ncmd; i++)
{
++++++ gdb-6.3-sepcrc-20050402.patch ++++++
2005-04-02 Andrew Cagney <cagney(a)gnu.org>
* symfile.c (separate_debug_file_exists): When the CRCs mismatch
print a warning.
(find_separate_debug_file): Pass in the objfile's name.
Index: gdb-6.8.50.20081128/gdb/symfile.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/symfile.c 2008-10-03 18:36:10.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/symfile.c 2008-12-01 16:34:36.000000000 +0100
@@ -1296,7 +1296,8 @@ get_debug_link_info (struct objfile *obj
}
static int
-separate_debug_file_exists (const char *name, unsigned long crc)
+separate_debug_file_exists (const char *name, unsigned long crc,
+ const char *parent_name)
{
unsigned long file_crc = 0;
bfd *abfd;
@@ -1316,7 +1317,15 @@ separate_debug_file_exists (const char *
bfd_close (abfd);
- return crc == file_crc;
+ if (crc != file_crc)
+ {
+ warning (_("the debug information found in \"%s\""
+ " does not match \"%s\" (CRC mismatch).\n"),
+ name, parent_name);
+ return 0;
+ }
+
+ return 1;
}
char *debug_file_directory = NULL;
@@ -1368,6 +1377,8 @@ find_separate_debug_file (struct objfile
basename = get_debug_link_info (objfile, &crc32);
if (basename == NULL)
+ /* There's no separate debug info, hence there's no way we could
+ load it => no warning. */
return NULL;
dir = xstrdup (objfile->name);
@@ -1395,7 +1406,7 @@ find_separate_debug_file (struct objfile
strcpy (debugfile, dir);
strcat (debugfile, basename);
- if (separate_debug_file_exists (debugfile, crc32))
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{
xfree (basename);
xfree (dir);
@@ -1408,7 +1419,7 @@ find_separate_debug_file (struct objfile
strcat (debugfile, "/");
strcat (debugfile, basename);
- if (separate_debug_file_exists (debugfile, crc32))
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{
xfree (basename);
xfree (dir);
@@ -1421,7 +1432,7 @@ find_separate_debug_file (struct objfile
strcat (debugfile, dir);
strcat (debugfile, basename);
- if (separate_debug_file_exists (debugfile, crc32))
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{
xfree (basename);
xfree (dir);
@@ -1440,7 +1451,7 @@ find_separate_debug_file (struct objfile
strcat (debugfile, "/");
strcat (debugfile, basename);
- if (separate_debug_file_exists (debugfile, crc32))
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{
xfree (canon_name);
xfree (basename);
++++++ gdb-6.3-step-thread-exit-20050211-test.patch ++++++
2005-02-11 Jeff Johnston <jjohnstn(a)redhat.com>
* testsuite/gdb.threads/step-thread-exit.c: New testcase.
* testsuite/gdb.threads/step-thread-exit.exp: Ditto.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c 2008-12-08 22:21:26.000000000 +0100
@@ -0,0 +1,50 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ 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. */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+void *thread_function (void *ptr)
+{
+ int *x = (int *)ptr;
+ printf("In thread_function, *x is %d\n", *x);
+} /* thread_function_end */
+
+volatile int repeat = 0;
+
+main()
+{
+ int ret;
+ pthread_t th;
+ int i = 3;
+
+ ret = pthread_create (&th, NULL, thread_function, &i);
+ do
+ {
+ repeat = 0;
+ sleep (3); /* sleep */
+ }
+ while (repeat);
+ pthread_join (th, NULL);
+ return 0;
+}
+
+
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp 2008-12-08 22:22:14.000000000 +0100
@@ -0,0 +1,130 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# 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.
+
+# Check that GDB can step over a thread exit.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "step-thread-exit"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Reset the debug file directory so we can't debug within the C library
+gdb_test "set debug-file-directory ." "" ""
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+# FIXME: Currently the main thread will escape/exit before our thread finishes
+# without this setting.
+gdb_test "set scheduler-locking step"
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking first"
+
+set sleep_line [expr [gdb_get_line_number "sleep"]]
+set end_line [expr [gdb_get_line_number "thread_function_end"]]
+
+gdb_breakpoint "$end_line"
+gdb_test "continue" "Break.*thread_function.*" "continue to thread_function 1"
+
+# Keep nexting until we cause the thread to exit. We expect the main
+# thread to be stopped and a message printed to tell us we have stepped
+# over the thread exit.
+set test "step over thread exit 1"
+gdb_test_multiple "next" "$test" {
+ -re "\}.*$gdb_prompt $" {
+ send_gdb "next\n"
+ exp_continue
+ }
+ -re "\[Thread .* exited\].*Program received signal SIGSTOP.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "start_thread.*$gdb_prompt $" {
+ send_gdb "next\n"
+ exp_continue
+ }
+}
+
+# Without this fixup we could end up in:
+# #0 0x00110416 in __kernel_vsyscall ()
+# #1 0x0011de26 in __lll_unlock_wake_private () from /lib/libpthread.so.0
+# #2 0x001179f4 in _L_unlock_3164 () from /lib/libpthread.so.0
+# #3 0x00116f01 in pthread_create@@GLIBC_2.1 () from /lib/libpthread.so.0
+# #4 0x08048531 in main () at ../.././gdb/testsuite/gdb.threads/step-thread-exit.c:39
+gdb_breakpoint "$sleep_line"
+gdb_test "set repeat=1" "" "Get to the sleep function prepare 1"
+gdb_test "continue" "Break.*$sleep_line.*" "Get to the sleep function 1"
+
+gdb_test "bt" "main.*$sleep_line.*" "backtrace after step 1"
+
+runto_main
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking second"
+
+gdb_breakpoint "$sleep_line"
+gdb_breakpoint "$end_line"
+set test "continue to thread_function 2"
+gdb_test_multiple "continue" "$test" {
+ -re "Break.*thread_function.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Break.*$sleep_line.*$gdb_prompt $" {
+ gdb_test "set repeat=1" "" ""
+ send_gdb "continue\n"
+ exp_continue
+ }
+}
+
+# Keep nexting until we cause the thread to exit. In this case, we
+# expect the breakpoint in the main thread to have already triggered
+# and so we should stop there with a message that we stepped over
+# the thread exit.
+set test "step over thread exit 2"
+gdb_test_multiple "next" "$test" {
+ -re "\}.*$gdb_prompt $" {
+ send_gdb "next\n"
+ exp_continue
+ }
+ -re "\[Thread .* exited\].*Break.*$sleep_line.*$gdb_prompt $" {
+ pass "$test (breakpoint hit)"
+ }
+ -re "\[Thread .* exited\].*$gdb_prompt $" {
+ pass "$test (breakpoint not hit)"
+ }
+ -re "start_thread.*$gdb_prompt $" {
+ send_gdb "next\n"
+ exp_continue
+ }
+}
+
++++++ gdb-6.3-terminal-fix-20050214.patch ++++++
2005-02-14 Jeff Johnston <jjohnstn(a)redhat.com>
* top.c (gdb_readline_wrapper): Ensure terminal is gdb's before calling
readline.
2007-10-14 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/top.c
===================================================================
--- gdb-6.7.orig/gdb/top.c 2007-09-02 23:13:56.000000000 +0200
+++ gdb-6.7/gdb/top.c 2007-10-14 23:38:27.000000000 +0200
@@ -795,6 +795,14 @@ gdb_readline_wrapper (char *prompt)
back_to = make_cleanup (gdb_readline_wrapper_cleanup, cleanup);
+ /* Before calling readline, ensure we have the terminal. If we don't
+ have the terminal and call readline, we risk the possibility of
+ gdb being thrown into the background. This problem occurs when
+ we attach to a background process on the same terminal the background
+ process was started from and then perform some action which requires
+ a page break prompt. */
+ terminal_ours ();
+
/* Display our prompt and prevent double prompt display. */
display_gdb_prompt (prompt);
rl_already_prompted = 1;
++++++ gdb-6.3-test-dtorfix-20050121.patch ++++++
Index: gdb/testsuite/ChangeLog
2005-01-21 Jeff Johnston <jjohnstn(a)redhat.com>
* gdb.cp/constructortest.exp: New test.
* gdb.cp/constructortest.cc: Ditto.
* gdb.cp/templates.exp: Change break of dtor to be fully quoted.
2007-09-22 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.cp/constructortest.exp, gdb.cp/constructortest.cc: Test also the
`$delete' destructor variant.
2007-09-25 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.cp/constructortest.exp: Delete the FIXME workaround of restarting
the whole GDB.
2007-10-05 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.cp/constructortest.exp: Test BREAKPOINT_RE_SET for multiple PCs
by PIE.
* gdb.cp/constructortest.exp: Handle the change of settings breakpoints
always at all the ctor/dtor variants.
[ Removed the `gdb.cp/templates.exp' patch. ]
[ Updated the patch for "(X location") of GDB-6.8+. ]
--- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc.fix Fri Jan 21 17:06:56 2005
+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc Fri Jan 21 17:05:18 2005
@@ -0,0 +1,99 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ 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. */
+
+class A
+{
+ public:
+ A();
+ ~A();
+ int k;
+ private:
+ int x;
+};
+
+class B: public A
+{
+ public:
+ B();
+ private:
+ int y;
+};
+
+/* C and D are for the $delete destructor. */
+
+class C
+{
+ public:
+ C();
+ virtual ~C();
+ private:
+ int x;
+};
+
+class D: public C
+{
+ public:
+ D();
+ private:
+ int y;
+};
+
+int main(int argc, char *argv[])
+{
+ A* a = new A;
+ B* b = new B;
+ D* d = new D;
+ delete a;
+ delete b;
+ delete d;
+ return 0;
+}
+
+A::A() /* Constructor A */
+{
+ x = 1; /* First line A */
+ k = 4; /* Second line A */
+}
+
+A::~A() /* Destructor A */
+{
+ x = 3; /* First line ~A */
+ k = 6; /* Second line ~A */
+}
+
+B::B()
+{
+ y = 2; /* First line B */
+ k = 5;
+}
+
+C::C() /* Constructor C */
+{
+ x = 1; /* First line C */
+}
+
+C::~C() /* Destructor C */
+{
+ x = 3; /* First line ~C */
+}
+
+D::D()
+{
+ y = 2; /* First line D */
+}
--- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp.fix Fri Jan 21 17:07:02 2005
+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp Fri Jan 21 17:05:29 2005
@@ -0,0 +1,131 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005, 2007 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.
+
+# Check that GDB can break at multiple forms of constructors.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "constructortest"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+# PIE is required for testing proper BREAKPOINT_RE_SET of the multiple-PC
+# breakpoints.
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ "additional_flags=-fpie -pie"}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+# Break on the various forms of the A::A constructor
+gdb_test "break A\:\:A" "Breakpoint 2 at .* \\(2 locations\\)" "breaking on A::A"
+
+# Verify that we break for the A constructor two times
+# Once for new A and once for new B
+gdb_continue_to_breakpoint "First line A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A"
+gdb_continue_to_breakpoint "First line A"
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::A"
+
+# Now do the same for destructors
+gdb_test "break 'A::~A()'" ""
+
+# Verify that we break for the A destructor two times
+# Once for delete a and once for delete b
+gdb_continue_to_breakpoint "First line ~A"
+gdb_test "bt" "#0.*~A.*#1.*main.*" "Verify in in-charge A::~A"
+gdb_continue_to_breakpoint "First line ~A"
+gdb_test "bt" "#0.*~A.*#1.*~B.*#2.*main.*" "Verify in not-in-charge A::~A"
+
+
+# Verify that we can break by line number in a constructor and find
+# both occurrences
+runto_main
+gdb_test "break 'A::A()'" "" "break in constructor A 2"
+gdb_continue_to_breakpoint "First line A"
+set second_line [gdb_get_line_number "Second line A"]
+gdb_test "break $second_line" "Breakpoint .*, line $second_line. \\(2 locations\\)" "break by line in constructor"
+gdb_continue_to_breakpoint "Second line A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A second line"
+gdb_continue_to_breakpoint "Second line A"
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::A second line"
+
+# Verify that we can break by line number in a destructor and find
+# both occurrences
+gdb_test "break 'A::~A()'" "" "break in constructor ~A 2"
+gdb_continue_to_breakpoint "First line ~A"
+set second_line_dtor [gdb_get_line_number "Second line ~A"]
+gdb_test "break $second_line_dtor" "Breakpoint .*, line $second_line_dtor. \\(2 locations\\)" "break by line in destructor"
+gdb_continue_to_breakpoint "Second line ~A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::~A second line"
+# FIXME: Analyse this case better.
+gdb_continue_to_breakpoint "Second line ~A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in A::~A second line #2"
+gdb_continue_to_breakpoint "Second line ~A"
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::~A second line"
+
+
+# Test now the $delete destructors.
+
+gdb_load ${binfile}
+runto_main
+
+# Break on the various forms of the C::~C destructor
+gdb_test "break C\:\:~C" "Breakpoint .* \\(3 locations\\)" "breaking on C::~C"
+gdb_continue_to_breakpoint "First line ~C"
+
+# Verify that we can break by line number in a destructor and find
+# the $delete occurence
+
+gdb_load ${binfile}
+delete_breakpoints
+
+set first_line_dtor [gdb_get_line_number "First line ~C"]
+gdb_test "break $first_line_dtor" "Breakpoint .*, line $first_line_dtor. \\(3 locations\\)" "break by line in destructor"
+
+# Run to `main' where we begin our tests.
+# Set the breakpoints first to test PIE multiple-PC BREAKPOINT_RE_SET.
+# RUNTO_MAIN or RUNTO MAIN are not usable here as it runs DELETE_BREAKPOINTS.
+
+if ![gdb_breakpoint main] {
+ gdb_suppress_tests
+}
+gdb_run_cmd
+set test "running to main"
+gdb_test_multiple "" $test {
+ -re "Breakpoint \[0-9\]*, main .*$gdb_prompt $" {
+ pass $test
+ }
+}
+
+gdb_continue_to_breakpoint "First line ~C"
++++++ gdb-6.3-test-movedir-20050125.patch ++++++
2005-01-25 Elena Zannoni <ezannoni(a)redhat.com>
* gdb.base/move-dir.exp: New test.
* gdb.base/move-dir.c: Ditto.
* gdb.base/move-dir.h: Ditto.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c 2008-12-07 23:57:41.000000000 +0100
@@ -0,0 +1,10 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "move-dir.h"
+
+int main() {
+ const char* hw = "hello world.";
+ printf ("%s\n", hw);;
+ other();
+}
+
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp 2008-12-07 10:13:01.000000000 +0100
@@ -0,0 +1,67 @@
+# 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(a)prep.ai.mit.edu
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "move-dir"
+set srcfile ${testfile}.c
+set incfile ${testfile}.h
+set binfile ${objdir}/${subdir}/${testfile}
+
+set testdir "${objdir}/${subdir}/incdir"
+
+remote_exec build "mkdir $testdir"
+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}"
+remote_exec build "cp ${srcdir}/${subdir}/${incfile} ${testdir}"
+
+set additional_flags "additional_flags=-I${subdir}/incdir"
+
+if { [gdb_compile "${objdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+
+set oldtimeout $timeout
+set timeout [expr "$timeout + 60"]
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_test "cd ../.." "" ""
+gdb_load ${binfile}
+gdb_test "list main" ".*hw.*other.*" "found main"
+gdb_test "list other" ".*ostring.*" "found include file"
+
+
+set timeout $oldtimeout
+return 0
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h 2008-12-07 10:13:01.000000000 +0100
@@ -0,0 +1,7 @@
+#include <stdlib.h>
+
+void other() {
+ const char* ostring = "other";
+ printf ("%s\n", ostring);;
+}
+
++++++ gdb-6.3-test-pie-20050107.patch ++++++
++++ 2121 lines (skipped)
++++++ gdb-6.3-test-self-20050110.patch ++++++
2004-02-23 Elena Zannoni <ezannoni(a)redhat.com>
* gdb.gdb/selftest.exp: Make sure that the debug directory is
set up properly.
* gdb.gdb/complaints.exp: Ditto.
* gdb.gdb/xfullpath.exp: Ditto.
* gdb.gdb/observer.exp: Ditto.
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/complaints.exp
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/complaints.exp 2009-01-03 06:58:04.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/complaints.exp 2009-02-26 22:10:48.000000000 +0100
@@ -302,13 +302,13 @@ proc find_gdb { arg } {
set GDB_FULLPATH [find_gdb $GDB]
# Remove any old copy lying around.
-remote_file host delete x$tool
+#remote_file host delete x$tool
gdb_start
-set file [remote_download host $GDB_FULLPATH x$tool]
+#set file [remote_download host $GDB_FULLPATH x$tool]
-set setup_result [setup_test $file ]
+set setup_result [setup_test $GDB_FULLPATH ]
if {$setup_result <0} then {
return -1
}
@@ -319,4 +319,4 @@ test_short_complaints
test_empty_complaints
gdb_exit;
-catch "remote_file host delete $file";
+#catch "remote_file host delete $file";
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/observer.exp
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/observer.exp 2009-02-17 20:52:27.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/observer.exp 2009-02-26 22:11:40.000000000 +0100
@@ -258,13 +258,13 @@ proc find_gdb { arg } {
set GDB_FULLPATH [find_gdb $GDB]
# Remove any old copy lying around.
-remote_file host delete x$tool
+#remote_file host delete x$tool
gdb_start
-set file [remote_download host $GDB_FULLPATH x$tool]
-set result [test_observer $file];
+#set file [remote_download host $GDB_FULLPATH x$tool]
+set result [test_observer $GDB_FULLPATH];
gdb_exit;
-catch "remote_file host delete $file";
+#catch "remote_file host delete $file";
if {$result <0} then {
warning "Couldn't test self"
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/selftest.exp
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/selftest.exp 2009-02-26 22:09:59.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/selftest.exp 2009-02-26 22:10:48.000000000 +0100
@@ -551,13 +551,13 @@ proc find_gdb { arg } {
set GDB_FULLPATH [find_gdb $GDB]
# Remove any old copy lying around.
-remote_file host delete x$tool
+#remote_file host delete x$tool
gdb_start
-set file [remote_download host $GDB_FULLPATH x$tool]
-set result [test_with_self $file];
+#set file [remote_download host $GDB_FULLPATH x$tool]
+set result [test_with_self $GDB_FULLPATH];
gdb_exit;
-catch "remote_file host delete $file";
+#catch "remote_file host delete $file";
if {$result <0} then {
warning "Couldn't test self"
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/xfullpath.exp
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/xfullpath.exp 2009-01-03 06:58:04.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/xfullpath.exp 2009-02-26 22:10:48.000000000 +0100
@@ -179,13 +179,13 @@ proc find_gdb { arg } {
set GDB_FULLPATH [find_gdb $GDB]
# Remove any old copy lying around.
-remote_file host delete x$tool
+#remote_file host delete x$tool
gdb_start
-set file [remote_download host $GDB_FULLPATH x$tool]
-set result [test_with_self $file];
+#set file [remote_download host $GDB_FULLPATH x$tool]
+set result [test_with_self $GDB_FULLPATH];
gdb_exit;
-catch "remote_file host delete $file";
+#catch "remote_file host delete $file";
if {$result <0} then {
warning "Couldn't test self"
++++++ gdb-6.3-test-sepcrc-20050402.patch ++++++
Index: gdb-6.8/gdb/testsuite/gdb.base/sepdebug.exp
===================================================================
--- gdb-6.8.orig/gdb/testsuite/gdb.base/sepdebug.exp 2008-02-26 09:14:11.000000000 +0100
+++ gdb-6.8/gdb/testsuite/gdb.base/sepdebug.exp 2008-07-14 10:26:19.000000000 +0200
@@ -981,3 +981,40 @@ if ![string compare $build_id_debug_file
# Spare debug files may confuse testsuite runs in the future.
remote_exec build "rm -f ${objdir}/${subdir}/${build_id_debug_filename}"
}
+
+
+# Compile up a second, different, object file. Copy its debug info
+# over the top of the new debug info. Note that somewhere in the
+# above the "set debug-file-directory" variable is set to
+# ${objdir}/${subdir} so need to move things there.
+
+set existing_binfile $binfile
+set testfile "sepdebug2"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set corrupt_debug_file [separate_debug_filename $binfile]
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ return -1
+}
+if [gdb_gnu_strip_debug $binfile] {
+ # check that you have a recent version of strip and objcopy installed
+ unsupported "cannot produce separate debug info files"
+ return -1
+}
+remote_exec build "cp $corrupt_debug_file ${existing_binfile}.debug"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set test "A corrupt debug file gets a warning"
+gdb_test_multiple "file $existing_binfile" "$test" {
+ -re "warning:.*mismatch.*" {
+ pass "$test"
+ }
+ -re ".y or n. " {
+ send_gdb "y\n"
+ exp_continue
+ }
+}
Index: gdb-6.8/gdb/testsuite/gdb.base/sepdebug2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8/gdb/testsuite/gdb.base/sepdebug2.c 2008-07-14 10:26:19.000000000 +0200
@@ -0,0 +1,5 @@
+int
+main (int argc, char *argv[], char *envp[])
+{
+ return 0;
+}
++++++ gdb-6.3-threaded-watchpoints2-20050225.patch ++++++
2005-02-28 Jeff Johnston <jjohnstn(a)redhat.com>
* config/i386/nm-linux.h: Change dr register routines to
accept a ptid_t first argument. Change all calling macros
to default the inferior_ptid for the first argument.
(i386_linux_insert_watchpoint): New prototype.
(i386_linux_remove_watchpoint, i386_linux_insert_hw_breakpoint): Ditto.
(i386_linux_remove_hw_breakpoint): Ditto.
(target_insert_watchpoint, target_remove_watchpoint): Undef and
override.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Ditto.
* config/i386/nm-linux64.h: Ditto except add amd64 versions of
the watchpoint/hw-breakpoint insert/remove routines.
* i386-nat.c: Include "inferior.h" to define inferior_ptid.
* i386-linux-nat.c: Change all dr get/set routines to accept
ptid_t as first argument and to use this argument to determine
the tid for PTRACE.
(i386_linux_set_debug_regs_for_thread): New function.
(i386_linux_sync_debug_registers_callback): Ditto.
(i386_linux_sync_debug_registers_across_threads): Ditto.
(i386_linux_insert_watchpoint, i386_linux_remove_watchpoint): Ditto.
(i386_linux_hw_breakpoint, i386_linux_remove_hw_breakpoint): Ditto.
(i386_linux_new_thread): Ditto.
(_initialize_i386_linux_nat): Ditto.
* amd64-linux-nat.c: Change all dr get/set routines to accept
ptid_t as first argument and to use this argument to determine
the tid for PTRACE.
(amd64_linux_set_debug_regs_for_thread): New function.
(amd64_linux_sync_debug_registers_callback): Ditto.
(amd64_linux_sync_debug_registers_across_threads): Ditto.
(amd64_linux_insert_watchpoint, amd64_linux_remove_watchpoint): Ditto.
(amd64_linux_hw_breakpoint, amd64_linux_remove_hw_breakpoint): Ditto.
(amd64_linux_new_thread): Ditto.
(_initialize_amd64_linux_nat): Register linux new thread observer.
* testsuite/gdb.threads/watchthreads2.c: New test case.
* testsuite/gdb.threads/watchthreads2.exp: Ditto.
[ With recent upstream GDB (6.8) reduced only to the testcase. ]
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c 2006-07-12 01:54:29.000000000 -0300
@@ -0,0 +1,66 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2003, 2004, 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.
+
+ This file is copied from schedlock.c. */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+void *thread_function(void *arg); /* Pointer to function executed by each thread */
+
+#define NUM 5
+
+unsigned int args[NUM+1];
+
+int main() {
+ int res;
+ pthread_t threads[NUM];
+ void *thread_result;
+ long i;
+
+ for (i = 0; i < NUM; i++)
+ {
+ args[i] = 1; /* Init value. */
+ res = pthread_create(&threads[i],
+ NULL,
+ thread_function,
+ (void *) i);
+ }
+
+ args[i] = 1;
+ thread_function ((void *) i);
+
+ exit(EXIT_SUCCESS);
+}
+
+void *thread_function(void *arg) {
+ int my_number = (long) arg;
+ int *myp = (int *) &args[my_number];
+
+ /* Don't run forever. Run just short of it :) */
+ while (*myp > 0)
+ {
+ (*myp) ++; usleep (1); /* Loop increment. */
+ }
+
+ pthread_exit(NULL);
+}
+
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp 2006-07-12 01:54:29.000000000 -0300
@@ -0,0 +1,133 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# 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.
+
+# Check that GDB can support multiple watchpoints across threads.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# This test verifies that a watchpoint is detected in the proper thread
+# so the test is only meaningful on a system with hardware watchpoints.
+if [target_info exists gdb,no_hardware_watchpoints] {
+ return 0;
+}
+
+set testfile "watchthreads2"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set can-use-hw-watchpoints 1" "" ""
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+set args_2 0
+set args_3 0
+
+gdb_breakpoint "thread_function"
+gdb_continue_to_breakpoint "thread_function"
+gdb_test "disable 2" ""
+
+gdb_test_multiple "p args\[2\]" "get initial args2" {
+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" {
+ set init_args_2 $expect_out(1,string)
+ pass "get initial args2"
+ }
+}
+
+gdb_test_multiple "p args\[3\]" "get initial args3" {
+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" {
+ set init_args_3 $expect_out(1,string)
+ pass "get initial args3"
+ }
+}
+
+set args_2 $init_args_2
+set args_3 $init_args_3
+
+# Watch values that will be modified by distinct threads.
+gdb_test "watch args\[2\]" "Hardware watchpoint 3: args\\\[2\\\]"
+gdb_test "watch args\[3\]" "Hardware watchpoint 4: args\\\[3\\\]"
+
+set init_line [expr [gdb_get_line_number "Init value"]+1]
+set inc_line [gdb_get_line_number "Loop increment"]
+
+# Loop and continue to allow both watchpoints to be triggered.
+for {set i 0} {$i < 30} {incr i} {
+ set test_flag 0
+ gdb_test_multiple "continue" "threaded watch loop" {
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads2.c:$init_line.*$gdb_prompt $"
+ { set args_2 1; set test_flag 1 }
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads2.c:$init_line.*$gdb_prompt $"
+ { set args_3 1; set test_flag 1 }
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*in thread_function \\\(arg=0x2\\\) at .*watchthreads2.c:$inc_line.*$gdb_prompt $"
+ { set args_2 [expr $args_2+1]; set test_flag 1 }
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = $args_3.*New value = [expr $args_3+1].*in thread_function \\\(arg=0x3\\\) at .*watchthreads2.c:$inc_line.*$gdb_prompt $"
+ { set args_3 [expr $args_3+1]; set test_flag 1 }
+ }
+ # If we fail above, don't bother continuing loop
+ if { $test_flag == 0 } {
+ set i 30;
+ }
+}
+
+# Print success message if loop succeeded.
+if { $test_flag == 1 } {
+ pass "threaded watch loop"
+}
+
+# Verify that we hit first watchpoint in child thread.
+set message "watchpoint on args\[2\] hit in thread"
+if { $args_2 > 1 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that we hit second watchpoint in child thread.
+set message "watchpoint on args\[3\] hit in thread"
+if { $args_3 > 1 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that all watchpoint hits are accounted for.
+set message "combination of threaded watchpoints = 30 + initial values"
+if { [expr $args_2+$args_3] == [expr [expr 30+$init_args_2]+$init_args_3] } {
+ pass $message
+} else {
+ fail $message
+}
++++++ gdb-6.3-watchpoint-cond-gone-test.patch ++++++
--- /dev/null 2008-04-03 00:39:30.714021604 +0200
+++ gdb-6.3/gdb/testsuite/gdb.base/watchpoint-cond-gone-stripped.c 2008-04-05 20:26:29.000000000 +0200
@@ -0,0 +1,23 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2008 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. */
+
+void
+jumper (void (*jumpto) (void))
+{
+ (*jumpto) ();
+}
--- /dev/null 2008-04-03 00:39:30.714021604 +0200
+++ gdb-6.3/gdb/testsuite/gdb.base/watchpoint-cond-gone.c 2008-04-05 20:26:48.000000000 +0200
@@ -0,0 +1,37 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2008 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. */
+
+extern void jumper (void (*jumpto) (void));
+
+void
+func ()
+{
+ int a, b, c;
+
+ a = b = c = 5;
+ a = b = c = 10; /* watchpoint-here */
+ c = a + b;
+}
+
+int
+main ()
+{
+ jumper (func);
+
+ return 0;
+}
--- /dev/null 2008-04-03 00:39:30.714021604 +0200
+++ gdb-6.3/gdb/testsuite/gdb.base/watchpoint-cond-gone.exp 2008-04-05 20:33:19.000000000 +0200
@@ -0,0 +1,59 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "watchpoint-cond-gone"
+set srcfile ${testfile}.c
+set srcfilestripped ${testfile}-stripped.c
+set objfilestripped ${objdir}/${subdir}/${testfile}-stripped.o
+set binfile ${objdir}/${subdir}/${testfile}
+
+# We need to generate a function without DWARF to crash older GDB.
+# Stepping into a dynamic function trampoline or stepping out of MAIN may work
+# but it is not a reliable FAIL case.
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfilestripped}" "${objfilestripped}" object {}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${objfilestripped}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Problem does not occur otherwise.
+gdb_test "set can-use-hw-watchpoints 0"
+
+runto_main
+gdb_breakpoint [gdb_get_line_number "watchpoint-here"]
+gdb_continue_to_breakpoint "Place to set the watchpoint"
+
+# The condition `c == 30' is the tested culprit.
+gdb_test "watch c if c == 30" "" "Place the watchpoint"
+
+# No functionality, just to check the state.
+gdb_test "backtrace"
+
+gdb_test "finish" \
+ "Watchpoint .* deleted because the program has left the block in.*which its expression is valid..*in (jumper|func).*" \
+ "Catch the no longer valid watchpoint"
++++++ gdb-6.5-BEA-testsuite.patch ++++++
++++ 938 lines (skipped)
++++++ gdb-6.5-bz109921-DW_AT_decl_file-test.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
It is duplicite to its upstream variant:
http://sourceware.org/ml/gdb-cvs/2007-01/msg00157.html
http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
2007-01-21 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Daniel Jacobowitz <dan(a)codesourcery.com>
* gdb.base/included.c, gdb.base/included.exp,
gdb.base/included.h: New files.
------------------------------------------------------------------------------
2007-01-09 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
gdb.dwarf2/dw2-included.h: New files.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.c 2 Jan 2007 00:20:27 -0000
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#include "dw2-included.h"
+
+int
+main()
+{
+ return 0;
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.exp 2 Jan 2007 00:20:27 -0000
@@ -0,0 +1,47 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Minimal DWARF-2 unit test
+
+# This test can only be run on targets which support DWARF-2.
+# For now pick a sampling of likely targets.
+if {![istarget *-*-linux*]
+ && ![istarget *-*-gnu*]
+ && ![istarget *-*-elf*]
+ && ![istarget *-*-openbsd*]
+ && ![istarget arm-*-eabi*]
+ && ![istarget powerpc-*-eabi*]} {
+ return 0
+}
+
+set testfile "dw2-included"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set listsize 1" ""
+gdb_test "list integer" "int integer;\r"
+gdb_test "ptype integer" "type = int\r"
+# Path varies depending on the build location.
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\nint integer;\r"
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.h 2 Jan 2007 00:20:27 -0000
@@ -0,0 +1,20 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+int integer;
++++++ gdb-6.5-bz181390-memory-address-width.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=181390
2006-09-28 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb/utils.c (paddress): Disable cutting of the printed addresses
to the target's address bit size; user wants to see everything.
* gdb/value.c (value_as_address1): Original `value_as_address'.
(value_as_address): New `value_as_address' wrapper - cut memory address
to the target's address bit size, bugreport by John Reiser.
2008-03-02 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.8pre.
New testcase `gdb.arch/amd64-i386-address.exp'.
Index: gdb-6.7.50.20080227/gdb/utils.c
===================================================================
--- gdb-6.7.50.20080227.orig/gdb/utils.c 2008-03-02 14:28:44.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/utils.c 2008-03-02 14:35:09.000000000 +0100
@@ -2540,6 +2540,14 @@ paddr_nz (CORE_ADDR addr)
const char *
paddress (CORE_ADDR addr)
{
+ /* Do not cut the address as the user should see all the information
+ available. Otherwise 64-bit gdb debugging 32-bit inferior would
+ report for `x/x 0xffffffffffffce70' error
+ `Cannot access memory at 0xffffce70' while the error occured just
+ because of the higher order bits 0xffffffff00000000 there.
+ This specific error no longer occurs as the address is now cut
+ during execution by `value_as_address'. */
+#if 0
/* Truncate address to the size of a target address, avoiding shifts
larger or equal than the width of a CORE_ADDR. The local
variable ADDR_BIT stops the compiler reporting a shift overflow
@@ -2553,6 +2561,8 @@ paddress (CORE_ADDR addr)
if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
+#endif
+
return hex_string (addr);
}
Index: gdb-6.7.50.20080227/gdb/value.c
===================================================================
--- gdb-6.7.50.20080227.orig/gdb/value.c 2008-01-18 18:07:40.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/value.c 2008-03-02 14:36:38.000000000 +0100
@@ -983,11 +983,9 @@ value_as_double (struct value *val)
return foo;
}
-/* Extract a value as a C pointer. Does not deallocate the value.
- Note that val's type may not actually be a pointer; value_as_long
- handles all the cases. */
-CORE_ADDR
-value_as_address (struct value *val)
+/* See `value_as_address' below - core of value to C pointer extraction. */
+static CORE_ADDR
+value_as_address1 (struct value *val)
{
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
whether we want this to be true eventually. */
@@ -1087,6 +1085,34 @@ value_as_address (struct value *val)
return unpack_long (value_type (val), value_contents (val));
#endif
}
+
+/* Extract a value as a C pointer. Does not deallocate the value.
+ Note that val's type may not actually be a pointer; value_as_long
+ handles all the cases. */
+CORE_ADDR
+value_as_address (struct value *val)
+{
+ CORE_ADDR addr;
+ int addr_bit;
+
+ addr = value_as_address1 (val);
+
+ /* Truncate address to the size of a target address, avoiding shifts
+ larger or equal than the width of a CORE_ADDR. The local
+ variable ADDR_BIT stops the compiler reporting a shift overflow
+ when it won't occur. */
+ /* NOTE: This assumes that the significant address information is
+ kept in the least significant bits of ADDR - the upper bits were
+ either zero or sign extended. Should ADDRESS_TO_POINTER() or
+ some ADDRESS_TO_PRINTABLE() be used to do the conversion? */
+
+ addr_bit = gdbarch_addr_bit (current_gdbarch);
+
+ if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
+ addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
+
+ return addr;
+}
/* Unpack raw data (copied from debugee, target byte order) at VALADDR
as a long, or as a double, assuming the raw data is described
--- /dev/null 2008-03-01 10:30:54.797374318 +0100
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.arch/amd64-i386-address.S 2008-03-02 12:47:06.000000000 +0100
@@ -0,0 +1,32 @@
+/* Copyright 2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb(a)gnu.org
+
+ This file is part of the gdb testsuite.
+
+ Test UNsigned extension of the 32-bit inferior address on a 64-bit host.
+ This file is based on the work by John Reiser.
+ This file was created by Jan Kratochvil <jan.kratochvil(a)redhat.com>.
+ https://bugzilla.redhat.com/show_bug.cgi?id=181390 */
+
+_start: .globl _start
+ nop
+ int3
+ movl %esp,%ebx
+ int3 # examining memory from $ebx fails, from $esp succeeds
+ nop
+ nop
--- /dev/null 2008-03-01 10:30:54.797374318 +0100
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.arch/amd64-i386-address.exp 2008-03-02 12:57:11.000000000 +0100
@@ -0,0 +1,62 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb(a)gnu.org
+
+# This file is part of the gdb testsuite.
+
+# Test UNsigned extension of the 32-bit inferior address on a 64-bit host.
+# This file is based on the work by John Reiser.
+# This file was created by Jan Kratochvil <jan.kratochvil(a)redhat.com>.
+# https://bugzilla.redhat.com/show_bug.cgi?id=181390
+
+if {![istarget "x86_64-*-*"]} then {
+ verbose "Skipping amd64->i386 adress test."
+ return
+}
+
+set testfile "amd64-i386-address"
+set srcfile ${testfile}.S
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-m32 -nostdlib"]] != "" } {
+ untested amd64-i386-address.exp
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_run_cmd
+
+set test "trap stop"
+gdb_test_multiple "" $test {
+ -re "Program received signal SIGTRAP,.*_start .*$gdb_prompt $" {
+ pass $test
+ }
+}
+
+gdb_test "stepi" ".*_start .*int3.*"
+
+gdb_test "x/x \$esp" "0x\[0-9a-f\]*:\t0x0*1"
+
+# Failure case would be:
+# 0xff8d7f00: Cannot access memory at address 0xff8d7f00
+gdb_test "x/x \$ebx" "0x\[0-9a-f\]*:\t0x0*1"
++++++ gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337
2008-02-24 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.8pre.
currently for trivial nonthreaded helloworld with no debug info up to -ggdb2 you
will get:
(gdb) p errno
[some error]
* with -ggdb2 and less "errno" in fact does not exist anywhere as it was
compiled to "(*__errno_location ())" and the macro definition is not present.
Unfortunately gdb will find the TLS symbol and it will try to access it but
as the program has been compiled without -lpthread the TLS base register
(%gs on i386) is not setup and it will result in:
Cannot access memory at address 0x8
Attached suggestion patch how to deal with the most common "errno" symbol
for the most common under-ggdb3 compiled programs.
2007-11-03 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* ./gdb/dwarf2read.c (read_partial_die, dwarf2_linkage_name): Prefer
DW_AT_MIPS_linkage_name over DW_AT_name now only for non-C.
glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
Index: gdb-6.8.50.20090228/gdb/gdbtypes.c
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/gdbtypes.c 2009-03-02 01:01:15.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/gdbtypes.c 2009-03-02 01:01:53.000000000 +0100
@@ -3633,6 +3633,8 @@ gdbtypes_post_init (struct gdbarch *gdba
init_type (TYPE_CODE_INT,
gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
0, "int", OBJFILE_INTERNAL);
+ builtin_type->builtin_int_ptr =
+ make_pointer_type (builtin_type->builtin_int, NULL);
builtin_type->builtin_unsigned_int =
init_type (TYPE_CODE_INT,
gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
@@ -3742,6 +3744,12 @@ gdbtypes_post_init (struct gdbarch *gdba
"<text variable, no debug info>", OBJFILE_INTERNAL);
TYPE_TARGET_TYPE (builtin_type->nodebug_text_symbol) =
builtin_type->builtin_int;
+ builtin_type->nodebug_text_symbol_errno_location =
+ init_type (TYPE_CODE_FUNC, 1, 0,
+ "<text variable for __errno_location, no debug info>",
+ OBJFILE_INTERNAL);
+ TYPE_TARGET_TYPE (builtin_type->nodebug_text_symbol_errno_location) =
+ builtin_type->builtin_int_ptr;
builtin_type->nodebug_data_symbol =
init_type (TYPE_CODE_INT,
gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0,
Index: gdb-6.8.50.20090228/gdb/gdbtypes.h
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/gdbtypes.h 2009-03-02 01:01:15.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/gdbtypes.h 2009-03-02 01:01:53.000000000 +0100
@@ -1053,6 +1053,7 @@ struct builtin_type
/* Types used for symbols with no debug information. */
struct type *nodebug_text_symbol;
+ struct type *nodebug_text_symbol_errno_location;
struct type *nodebug_data_symbol;
struct type *nodebug_unknown_symbol;
struct type *nodebug_tls_symbol;
@@ -1065,6 +1066,7 @@ struct builtin_type
struct type *builtin_char;
struct type *builtin_short;
struct type *builtin_int;
+ struct type *builtin_int_ptr;
struct type *builtin_long;
struct type *builtin_signed_char;
struct type *builtin_unsigned_char;
Index: gdb-6.8.50.20090228/gdb/parse.c
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/parse.c 2009-03-02 01:01:15.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/parse.c 2009-03-02 01:01:53.000000000 +0100
@@ -508,7 +508,12 @@ write_exp_msymbol (struct minimal_symbol
case mst_text:
case mst_file_text:
case mst_solib_trampoline:
- write_exp_elt_type (builtin_type (gdbarch)->nodebug_text_symbol);
+ if (builtin_type (gdbarch)->nodebug_text_symbol_errno_location != NULL
+ && strcmp (SYMBOL_LINKAGE_NAME (msymbol), "__errno_location") == 0)
+ write_exp_elt_type (builtin_type (gdbarch)
+ ->nodebug_text_symbol_errno_location);
+ else
+ write_exp_elt_type (builtin_type (gdbarch)->nodebug_text_symbol);
break;
case mst_data:
Index: gdb-6.8.50.20090228/gdb/target.c
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/target.c 2009-03-02 01:01:44.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/target.c 2009-03-02 01:01:53.000000000 +0100
@@ -827,6 +827,25 @@ pop_all_targets (int quitting)
pop_all_targets_above (dummy_stratum, quitting);
}
+static int
+resolve_errno (void *arg)
+{
+ CORE_ADDR *arg_addr = arg;
+ struct expression *expr;
+ struct cleanup *old_chain = 0;
+ struct value *val;
+
+ expr = parse_expression ("__errno_location()");
+ old_chain = make_cleanup (free_current_contents, &expr);
+ val = evaluate_expression (expr);
+ *arg_addr = value_as_address (val);
+ release_value (val);
+ value_free (val);
+ do_cleanups (old_chain);
+
+ return 1;
+}
+
/* Using the objfile specified in OBJFILE, find the address for the
current thread's thread-local storage with offset OFFSET. */
CORE_ADDR
@@ -917,7 +936,28 @@ target_translate_tls_address (struct obj
/* It wouldn't be wrong here to try a gdbarch method, too; finding
TLS is an ABI-specific thing. But we don't do that yet. */
else
- error (_("Cannot find thread-local variables on this target"));
+ {
+ struct minimal_symbol *msymbol;
+
+ msymbol = lookup_minimal_symbol ("errno", NULL, NULL);
+ if (msymbol != NULL
+ && SYMBOL_VALUE_ADDRESS (msymbol) == offset
+ && (SYMBOL_OBJ_SECTION (msymbol)->objfile == objfile
+ || (objfile->separate_debug_objfile != NULL
+ && SYMBOL_OBJ_SECTION (msymbol)->objfile
+ == objfile->separate_debug_objfile)
+ || (objfile->separate_debug_objfile_backlink != NULL
+ && SYMBOL_OBJ_SECTION (msymbol)->objfile
+ == objfile->separate_debug_objfile_backlink)))
+ {
+ if (!catch_errors (resolve_errno, (void *) &addr, "",
+ RETURN_MASK_ALL))
+ error (_("TLS symbol `errno' not resolved for non-TLS program."
+ " You should compile the program with `gcc -pthread'."));
+ }
+ else
+ error (_("Cannot find thread-local variables on this target"));
+ }
return addr;
}
Index: gdb-6.8.50.20090228/gdb/testsuite/gdb.dwarf2/dw2-errno.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090228/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2009-03-02 01:01:53.000000000 +0100
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2005, 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb(a)prep.ai.mit.edu */
+
+#include <errno.h>
+
+int main()
+{
+ errno = 42;
+
+ return 0; /* breakpoint */
+}
Index: gdb-6.8.50.20090228/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090228/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2009-03-02 01:01:53.000000000 +0100
@@ -0,0 +1,67 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile dw2-errno
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+proc prep {} {
+ global srcdir subdir binfile
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ runto_main
+
+ gdb_breakpoint [gdb_get_line_number "breakpoint"]
+ gdb_continue_to_breakpoint "breakpoint"
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+prep
+gdb_test "print errno" ".* = 42" "errno with macros=N threads=N"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+prep
+gdb_test "print errno" ".* = 42" "errno with macros=Y threads=N"
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } {
+ return -1
+}
+prep
+gdb_test "print errno" ".* = 42" "errno with macros=N threads=Y"
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } {
+ return -1
+}
+prep
+gdb_test "print errno" ".* = 42" "errno with macros=Y threads=Y"
+
+# TODO: Test the error on resolving ERRNO with only libc loaded.
+# Just how to find the current libc filename?
++++++ gdb-6.5-bz190810-gdbserver-arch-advice.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190810
2006-09-26 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* remote.c (remote_wait): Suggestion on crash due to nonmatching target.
(remote_async_wait): Likewise.
Index: gdb-6.8.50.20081128/gdb/remote.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/remote.c 2008-12-09 16:59:51.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/remote.c 2008-12-09 17:00:04.000000000 +0100
@@ -4329,8 +4329,13 @@ Packet: '%s'\n"),
VEC_safe_push (cached_reg_t, event->regcache, &cached_reg);
}
- if (*p != ';')
- error (_("Remote register badly formatted: %s\nhere: %s"),
+ /* It may also occur on amd64 which defaults to 32-bit i386
+ target. gdbserver(1) is not aware of the `set architecture'
+ name itself as it is not using libbfd. */
+ if (*p != ';')
+ error (_("Remote register badly formatted: %s\nhere: %s"
+ "\nTry to load the executable by `file' first,"
+ "\nyou may also check `set/show architecture'."),
buf, p);
++p;
}
++++++ gdb-6.5-bz203661-emit-relocs.patch ++++++
Index: gdb-6.5/gdb/symfile.c
===================================================================
--- gdb-6.5.orig/gdb/symfile.c 2006-08-24 02:56:02.000000000 -0300
+++ gdb-6.5/gdb/symfile.c 2006-08-24 02:56:36.000000000 -0300
@@ -3739,6 +3739,12 @@ symfile_dummy_outputs (bfd *abfd, asecti
bfd_byte *
symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf)
{
+ /* Executable files have all the relocations already resolved.
+ * Handle files linked with --emit-relocs.
+ * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */
+ if ((abfd->flags & EXEC_P) != 0)
+ return NULL;
+
/* We're only interested in debugging sections with relocation
information. */
if ((sectp->flags & SEC_RELOC) == 0)
++++++ gdb-6.5-bz216711-clone-is-outermost.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
FIXME: This workaround should be dropped and
glibc/sysdeps/unix/sysv/linux/x86_64/clone.S should get CFI for the child
instead.
2006-12-17 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb/amd64-linux-tdep.c (linux_clone_code): New variable.
(LINUX_CLONE_LEN): New definition.
(amd64_linux_clone_running, amd64_linux_outermost_frame): New function.
(amd64_linux_init_abi): Initialize `outermost_frame_p'.
* gdb/i386-tdep.c (i386_gdbarch_init): Likewise.
* gdb/i386-tdep.h (gdbarch_tdep): Add `outermost_frame_p' member.
* gdb/amd64-tdep.c (amd64_frame_this_id): Call `outermost_frame_p'.
2006-12-17 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.threads/bt-clone-stop.exp, gdb.threads/bt-clone-stop.c:
New file.
2007-10-16 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
Index: gdb-6.8.50.20081128/gdb/amd64-linux-tdep.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/amd64-linux-tdep.c 2008-12-08 10:56:17.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/amd64-linux-tdep.c 2008-12-08 21:11:08.000000000 +0100
@@ -234,6 +234,80 @@ amd64_linux_register_reggroup_p (struct
/* Set the program counter for process PTID to PC. */
+/* Detect the outermost frame; during unwind of
+ #5 0x000000305cec68c3 in clone () from /lib64/tls/libc.so.6
+ avoid the additional bogus frame
+ #6 0x0000000000000000 in ??
+ We compare if the `linux_clone_code' block is _before_ unwound PC. */
+
+static const unsigned char linux_clone_code[] =
+{
+/* libc/sysdeps/unix/sysv/linux/x86_64/clone.S */
+/* #ifdef RESET_PID */
+/* ... */
+/* mov $SYS_ify(getpid), %eax */
+/* 0xb8, 0x27, 0x00, 0x00, 0x00 */
+/* OR */
+/* mov $SYS_ify(getpid), %rax */
+/* 0x48, 0xc7, 0xc0, 0x27, 0x00, 0x00, 0x00 */
+/* so just: */
+ 0x27, 0x00, 0x00, 0x00,
+/* syscall */
+ 0x0f, 0x05,
+/* movl %eax, %fs:PID */
+ 0x64, 0x89, 0x04, 0x25, 0x94, 0x00, 0x00, 0x00,
+/* movl %eax, %fs:TID */
+ 0x64, 0x89, 0x04, 0x25, 0x90, 0x00, 0x00, 0x00,
+/* #endif */
+/* |* Set up arguments for the function call. *| */
+/* popq %rax |* Function to call. *| */
+ 0x58,
+/* popq %rdi |* Argument. *| */
+ 0x5f,
+/* call *%rax$ */
+ 0xff, 0xd0
+};
+
+#define LINUX_CLONE_LEN (sizeof linux_clone_code)
+
+static int
+amd64_linux_clone_running (struct frame_info *this_frame)
+{
+ CORE_ADDR pc = get_frame_pc (this_frame);
+ unsigned char buf[LINUX_CLONE_LEN];
+
+ if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_LEN, buf,
+ LINUX_CLONE_LEN))
+ return 0;
+
+ if (memcmp (buf, linux_clone_code, LINUX_CLONE_LEN) != 0)
+ return 0;
+
+ return 1;
+}
+
+static int
+amd64_linux_outermost_frame (struct frame_info *this_frame)
+{
+ CORE_ADDR pc = get_frame_pc (this_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+
+ /* If we have NAME, we can optimize the search.
+ `clone' NAME still needs to have the code checked as its name may be
+ present in the user code.
+ `__clone' NAME should not be present in the user code but in the initial
+ parts of the `__clone' implementation the unwind still makes sense.
+ More detailed unwinding decision would be too much sensitive to possible
+ subtle changes in specific glibc revisions. */
+ if (name == NULL || strcmp (name, "clone") == 0
+ || strcmp ("__clone", name) == 0)
+ return (amd64_linux_clone_running (this_frame) != 0);
+
+ return 0;
+}
+
static void
amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
@@ -272,6 +346,8 @@ amd64_linux_init_abi (struct gdbarch_inf
tdep->sc_reg_offset = amd64_linux_sc_reg_offset;
tdep->sc_num_regs = ARRAY_SIZE (amd64_linux_sc_reg_offset);
+ tdep->outermost_frame_p = amd64_linux_outermost_frame;
+
/* GNU/Linux uses SVR4-style shared libraries. */
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_lp64_fetch_link_map_offsets);
Index: gdb-6.8.50.20081128/gdb/amd64-tdep.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/amd64-tdep.c 2008-12-08 10:56:17.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/amd64-tdep.c 2008-12-08 21:05:12.000000000 +0100
@@ -1044,11 +1044,16 @@ amd64_frame_this_id (struct frame_info *
{
struct amd64_frame_cache *cache =
amd64_frame_cache (this_frame, this_cache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
/* This marks the outermost frame. */
if (cache->base == 0)
return;
+ /* Detect OS dependent outermost frames; such as `clone'. */
+ if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
+ return;
+
(*this_id) = frame_id_build (cache->base + 16, cache->pc);
}
Index: gdb-6.8.50.20081128/gdb/i386-tdep.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/i386-tdep.c 2008-12-08 10:56:17.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/i386-tdep.c 2008-12-08 11:00:43.000000000 +0100
@@ -2698,6 +2698,9 @@ i386_gdbarch_init (struct gdbarch_info i
tdep->sc_pc_offset = -1;
tdep->sc_sp_offset = -1;
+ /* Unwinding stops on i386 automatically. */
+ tdep->outermost_frame_p = NULL;
+
/* The format used for `long double' on almost all i386 targets is
the i387 extended floating-point format. In fact, of all targets
in the GCC 2.95 tree, only OSF/1 does it different, and insists
Index: gdb-6.8.50.20081128/gdb/i386-tdep.h
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/i386-tdep.h 2008-12-08 10:56:17.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/i386-tdep.h 2008-12-08 21:07:47.000000000 +0100
@@ -106,6 +106,9 @@ struct gdbarch_tdep
/* ISA-specific data types. */
struct type *i386_mmx_type;
struct type *i386_sse_type;
+
+ /* Detect OS dependent outermost frames; such as `clone'. */
+ int (*outermost_frame_p) (struct frame_info *this_frame);
};
/* Floating-point registers. */
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.c 2008-12-08 11:00:43.000000000 +0100
@@ -0,0 +1,39 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+
+#include <pthread.h>
+#include <unistd.h>
+#include <assert.h>
+
+
+void *threader (void *arg)
+{
+ assert (0);
+ return NULL;
+}
+
+int main (void)
+{
+ pthread_t t1;
+
+ pthread_create (&t1, NULL, threader, (void *) NULL);
+ for (;;)
+ pause();
+}
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2008-12-08 11:00:43.000000000 +0100
@@ -0,0 +1,61 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Backtraced `clone' must not have `PC == 0' as its previous frame.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile bt-clone-stop
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# threader: threader.c:8: threader: Assertion `0' failed.
+# Program received signal SIGABRT, Aborted.
+
+gdb_test "run" \
+ "Program received signal SIGABRT.*" \
+ "run"
+
+# Former gdb unwind (the first function is `clone'):
+# #5 0x0000003421ecd62d in ?? () from /lib64/libc.so.6
+# #6 0x0000000000000000 in ?? ()
+# (gdb)
+# Tested `amd64_linux_outermost_frame' functionality should omit the line `#6'.
+#
+# Two `-re' cases below must be in this order (1st is a subset of the 2nd one).
+# Unhandled case below should not happen and it is fortunately handled by
+# `amd64_linux_outermost_frame' as FAIL (and result `0x0 entry output invalid').
+gdb_test_multiple "bt" "0x0 entry output invalid" {
+ -re "in threader \\(.*\n#\[0-9\]* *0x0* in .*$gdb_prompt $" {
+ fail "0x0 entry found"
+ }
+ -re "in threader \\(.*$gdb_prompt $" {
+ pass "0x0 entry not found"
+ }
+}
++++++ gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
Index: gdb-6.8.50.20081128/gdb/minsyms.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/minsyms.c 2008-10-01 18:56:52.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/minsyms.c 2008-12-02 23:24:27.000000000 +0100
@@ -544,6 +544,11 @@ lookup_minimal_symbol_by_pc_section_1 (C
don't fill the bfd_section member, so don't
throw away symbols on those platforms. */
&& SYMBOL_OBJ_SECTION (&msymbol[hi]) != NULL
+ /* Don't ignore symbols for solib trampolines.
+ Limit its sideeffects - only for non-0 sized trampolines.
+ Red Hat Bug 200533 with its regression Bug 218379. */
+ && (MSYMBOL_TYPE (&msymbol[hi]) != mst_solib_trampoline
+ || MSYMBOL_SIZE (&msymbol[hi]))
&& (!matching_obj_sections
(SYMBOL_OBJ_SECTION (&msymbol[hi]), section)))
{
++++++ gdb-6.5-bz218379-ppc-solib-trampoline-test.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
--- /dev/null 2006-12-17 14:18:21.881669220 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.exp 2006-12-17 16:52:51.000000000 -0500
@@ -0,0 +1,54 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile step-over-trampoline
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# For C programs, "start" should stop in main().
+
+gdb_test "start" \
+ "main \\(\\) at .*$srcfile.*" \
+ "start"
+
+# main () at hello2.c:5
+# 5 puts("hello world\n");
+# (gdb) next
+# 0x100007e0 in call___do_global_ctors_aux ()
+
+gdb_test_multiple "next" "invalid `next' output" {
+ -re "\nhello world.*return 0;.*" {
+ pass "stepped over"
+ }
+ -re " in call___do_global_ctors_aux \\(\\).*" {
+ fail "stepped into trampoline"
+ }
+}
--- /dev/null 2006-12-17 14:18:21.881669220 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.c 2006-12-17 16:18:12.000000000 -0500
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb(a)prep.ai.mit.edu */
+
+#include <stdio.h>
+
+int main (void)
+{
+ puts ("hello world");
+ return 0;
+}
++++++ gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
Index: gdb-6.8/gdb/symtab.c
===================================================================
--- gdb-6.8.orig/gdb/symtab.c 2008-02-05 23:17:40.000000000 +0100
+++ gdb-6.8/gdb/symtab.c 2008-07-14 10:27:32.000000000 +0200
@@ -2132,6 +2132,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
/* See above comment about why warning is commented out */
/* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
/* fall through */
+ /* `msymbol' trampoline may be located before its .text symbol
+ but this text symbol may be the address we were looking for.
+ Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
+ Red Hat Bug 218379. */
+ else if (SYMBOL_VALUE (mfunsym) == pc)
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol), paddr (pc));
+ /* fall through */
else
return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0);
}
++++++ gdb-6.5-bz243845-stale-testing-zombie-test.patch ++++++
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp
--- gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp 2007-07-31 13:04:12.000000000 -0400
@@ -0,0 +1,82 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# are we on a target board
+if [is_remote target] then {
+ return 0
+}
+
+# Start the program running and then wait for a bit, to be sure
+# that it can be attached to.
+
+gdb_exit
+gdb_start
+gdb_load sleep
+
+set gdb_pid [exp_pid -i [board_info host fileid]]
+set test "identified the child GDB"
+if {$gdb_pid != "" && $gdb_pid > 0} {
+ pass $test
+ verbose -log "Child GDB PID $gdb_pid"
+} else {
+ fail $test
+}
+
+set testpid [eval exec sleep 10 &]
+exec sleep 2
+
+set test "attach"
+gdb_test_multiple "attach $testpid" "$test" {
+ -re "Attaching to program.*`?.*'?, process $testpid..*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "Attaching to program.*`?.*\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" {
+ # Response expected on Cygwin
+ pass "$test"
+ }
+}
+
+# Some time to let GDB spawn its testing child.
+exec sleep 2
+
+set found none
+foreach procpid [glob -directory /proc -type d {[0-9]*}] {
+ if {[catch {open $procpid/status} statusfi]} {
+ continue
+ }
+ set status [read $statusfi]
+ close $statusfi
+ if {1
+ && [regexp -line {^Name:\tgdb$} $status]
+ && [regexp -line {^PPid:\t1$} $status]
+ && [regexp -line "^TracerPid:\t$gdb_pid$" $status]} {
+ set found $procpid
+ verbose -log "Found linux_test_for_tracefork zombie PID $procpid"
+ }
+}
+set test "linux_test_for_tracefork leaves no zombie"
+if {$found eq {none}} {
+ pass $test
+} else {
+ fail $test
+}
++++++ gdb-6.5-dwarf-stack-overflow.patch ++++++
for gdb/ChangeLog:
2006-08-22 Will Drewry <wad(a)google.com>
Tavis Ormandy <taviso(a)google.com>
* dwarf2read.c (decode_locdesc): Enforce location description stack
boundaries.
* dwarfread.c (locval): Likewise.
2007-10-15 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/dwarf2read.c
===================================================================
--- gdb-6.7.orig/gdb/dwarf2read.c 2007-10-15 00:08:30.000000000 +0200
+++ gdb-6.7/gdb/dwarf2read.c 2007-10-15 21:42:43.000000000 +0200
@@ -9070,8 +9070,7 @@ dwarf2_fundamental_type (struct objfile
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)
@@ -9088,7 +9087,7 @@ decode_locdesc (struct dwarf_block *blk,
i = 0;
stacki = 0;
- stack[stacki] = 0;
+ stack[++stacki] = 0;
while (i < size)
{
@@ -9270,6 +9269,16 @@ decode_locdesc (struct dwarf_block *blk,
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(a)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]);
}
++++++ gdb-6.5-gcore-buffer-limit-test.patch ++++++
diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.c gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.c
--- gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.c 1970-01-01 01:00:00.000000000 +0100
+++ gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.c 2008-01-08 11:25:45.000000000 +0100
@@ -0,0 +1,37 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2008 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(a)prep.ai.mit.edu */
+
+#include <unistd.h>
+#include <stdlib.h>
+
+#define MEGS 64
+
+int main()
+{
+ void *mem;
+
+ mem = malloc (MEGS * 1024ULL * 1024ULL);
+
+ for (;;)
+ sleep (1);
+
+ return 0;
+}
diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.exp gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
--- gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 1970-01-01 01:00:00.000000000 +0100
+++ gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 2008-01-08 11:47:32.000000000 +0100
@@ -0,0 +1,101 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile gcore-excessive-memory
+set srcfile ${testfile}.c
+set shfile ${objdir}/${subdir}/${testfile}-gdb.sh
+set corefile ${objdir}/${subdir}/${testfile}.core
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+set f [open "|getconf PAGESIZE" "r"]
+gets $f pagesize
+close $f
+
+set pid_of_bin [eval exec $binfile &]
+sleep 2
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set pid_of_gdb [exp_pid -i [board_info host fileid]]
+
+gdb_test "attach $pid_of_bin" "Attaching to .*" "attach"
+gdb_test "up 99" "in main .*" "verify we can get to main"
+
+proc memory_v_pages_get {} {
+ global pid_of_gdb pagesize
+ set fd [open "/proc/$pid_of_gdb/statm"]
+ gets $fd line
+ close $fd
+ # number of pages of virtual memory
+ scan $line "%d" drs
+ return $drs
+}
+
+set pages_found [memory_v_pages_get]
+
+# It must be definitely less than `MEGS' of `gcore-excessive-memory.c'.
+set mb_gcore_reserve 4
+verbose -log "pages_found = $pages_found, mb_gcore_reserve = $mb_gcore_reserve"
+set kb_found [expr $pages_found * $pagesize / 1024]
+set kb_permit [expr $kb_found + 1 * 1024 + $mb_gcore_reserve * 1024]
+verbose -log "kb_found = $kb_found, kb_permit = $kb_permit"
+
+# Create the ulimit wrapper.
+set f [open $shfile "w"]
+puts $f "#! /bin/sh"
+puts $f "ulimit -v $kb_permit"
+puts $f "exec $GDB \"\$@\""
+close $f
+remote_exec host "chmod +x $shfile"
+
+gdb_exit
+set GDBold $GDB
+set GDB "$shfile"
+gdb_start
+set GDB $GDBold
+
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set pid_of_gdb [exp_pid -i [board_info host fileid]]
+
+gdb_test "attach $pid_of_bin" "Attaching to .*" "attach"
+gdb_test "up 99" "in main .*" "verify we can get to main"
+
+verbose -log "kb_found before gcore = [expr [memory_v_pages_get] * $pagesize / 1024]"
+
+gdb_test "gcore $corefile" "Saved corefile \[^\n\r\]*" "Save the core file"
+
+verbose -log "kb_found after gcore = [expr [memory_v_pages_get] * $pagesize / 1024]"
+
+# Cleanup.
+exec kill -9 $pid_of_bin
++++++ gdb-6.5-gcore-i386-on-amd64.patch ++++++
++++ 847 lines (skipped)
++++++ gdb-6.5-ia64-libunwind-leak-test.patch ++++++
diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c
--- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 15:12:55.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 13:55:22.000000000 -0500
@@ -0,0 +1,29 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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(a)prep.ai.mit.edu */
+
+#include <unistd.h>
+
+int main()
+{
+ for (;;)
+ alarm (0);
+ return 0;
+}
diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp
--- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:12:53.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:11:35.000000000 -0500
@@ -0,0 +1,90 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile unwind-leak
+set srcfile ${testfile}.c
+set shfile ${objdir}/${subdir}/${testfile}-gdb.sh
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set pid [exp_pid -i [board_info host fileid]]
+
+# For C programs, "start" should stop in main().
+
+gdb_test "start" \
+ "main \\(\\) at .*$srcfile.*" \
+ "start"
+
+set loc [gdb_get_line_number "alarm"]
+gdb_breakpoint $loc
+
+proc memory_get {} {
+ global pid
+ set fd [open "/proc/$pid/statm"]
+ gets $fd line
+ close $fd
+ # number of pages of data/stack
+ scan $line "%*d%*d%*d%*d%*d%d" drs
+ return $drs
+}
+
+set cycles 100
+# For 100 cycles it was 1308: from = 363 KB, to = 1671 KB
+set permit_kb 100
+verbose -log "cycles = $cycles, permit_kb = $permit_kb"
+
+set fail 0
+set test "breakpoint stop/continue cycles"
+for {set i $cycles} {$i > 0} {set i [expr {$i - 1}]} {
+ gdb_test_multiple "continue" $test {
+ -re "Breakpoint 2, main .*alarm .*.*${gdb_prompt} $" {
+ }
+ -re "Segmentation fault" {
+ fail $test
+ set i 0
+ set fail 1
+ }
+ }
+ if ![info exists from] {
+ set from [memory_get]
+ }
+}
+set to [memory_get]
+if {!$fail} {
+ verbose -log "from = $from KB, to = $to KB"
+ if {$from > 0 && $to > 10 && $to < $from + $permit_kb} {
+ pass $test
+ } else {
+ fail $test
+ }
+}
++++++ gdb-6.5-last-address-space-byte-test.patch ++++++
Index: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
===================================================================
RCS file: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
diff -N ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp 15 Nov 2006 21:43:24 -0000
@@ -0,0 +1,49 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+
+# i386 (32-bit) only: gdb with Red Hat largecore patch did lock up:
+# https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=…
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=210614
+
+# i386: Bug exists when the `target_xfer_memory' condition
+# `(memaddr + len < region->hi)' operates on 64-bit operands on
+# largecore-patched with 32-bit addresses and so it can get `false' with
+# arbitrary `len'.
+
+# x86_64: The bug is not present as the operands and calculations have the same
+# bit size. Would would still need to pass there the highest address
+# (`memaddr == 0xffffffffffffffff') but we would need to pass `len == 0'
+# to make the condition `(memaddr + len < region->hi)' false.
+# `len == 0' would get caught eariler.
+
+# Error in the success case is immediate.
+set timeoutold ${timeout}
+set timeout 10
+
+gdb_test "x/xb 0xffffffff" \
+ "Cannot access memory at address 0xffffffff" \
+ "Read the last address space byte"
+
+set timeout ${timeoutold}
++++++ gdb-6.5-missed-trap-on-step-test.patch ++++++
Fix has been committed to:
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
--- /dev/null 2007-12-14 20:45:09.113039517 +0100
+++ gdb-6.5/gdb/testsuite/gdb.base/watchpoint-during-step.exp 2007-12-24 19:42:00.000000000 +0100
@@ -0,0 +1,51 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile watchpoint-during-step
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+runto_main
+
+gdb_breakpoint [gdb_get_line_number "var = 2"]
+gdb_continue_to_breakpoint "Find the first var set"
+
+gdb_test "step" ".*var = 3;" "Step to the next var set"
+
+gdb_test "watch var" "atchpoint .*: var" "Set the watchpoint"
+
+# Here is the target point. Be careful to not have breakpoint set on the line
+# we step from as in this case it is a valid upstream KFAIL gdb/38
+
+gdb_test "step" ".*Old value = 2.*New value = 3.*" "Catch the watchpoint"
--- /dev/null 2007-12-14 20:45:09.113039517 +0100
+++ gdb-6.5/gdb/testsuite/gdb.base/watchpoint-during-step.c 2007-12-24 19:38:10.000000000 +0100
@@ -0,0 +1,30 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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(a)prep.ai.mit.edu */
+
+static int var;
+
+int main()
+{
+ var = 1;
+ var = 2;
+ var = 3;
+ return 0;
+}
++++++ gdb-6.5-readline-long-line-crash.patch ++++++
Fix Valgrind paste of >= 256 * (screen width) characters (as 130001).
Invalid write of size 4
at 0x8203BD9: rl_redisplay (display.c:812)
by 0x81F5130: _rl_internal_char_cleanup (readline.c:427)
by 0x81F52B3: readline_internal_char (readline.c:508)
by 0x8209817: rl_callback_read_char (callback.c:184)
by 0x8135312: rl_callback_read_char_wrapper (event-top.c:179)
by 0x8135B7B: stdin_event_handler (event-top.c:432)
by 0x81349F2: handle_file_event (event-loop.c:730)
by 0x81342AB: process_event (event-loop.c:343)
by 0x81342F4: gdb_do_one_event (event-loop.c:380)
by 0x81313AC: catch_errors (exceptions.c:515)
by 0x80CE8CA: tui_command_loop (tui-interp.c:151)
by 0x81318B9: current_interp_command_loop (interps.c:278)
Address 0x43DCEB8 is 0 bytes after a block of size 1,024 alloc'd
at 0x4005400: malloc (vg_replace_malloc.c:149)
by 0x8087084: xmalloc (utils.c:959)
by 0x8202CA7: init_line_structures (display.c:440)
by 0x8202D14: rl_redisplay (display.c:471)
by 0x81F4F53: readline_internal_setup (readline.c:363)
by 0x820958C: _rl_callback_newline (callback.c:89)
by 0x82095BB: rl_callback_handler_install (callback.c:101)
by 0x80CE896: tui_command_loop (tui-interp.c:138)
by 0x81318B9: current_interp_command_loop (interps.c:278)
by 0x807E69A: captured_command_loop (main.c:101)
by 0x81313AC: catch_errors (exceptions.c:515)
by 0x807F55A: captured_main (main.c:826)
2006-11-08 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* readline/display.c (line_state, line_state_array, line_state_visible,
line_state_invisible): Encapsulate _rl_wrapped_line, inv_lbreaks,
inv_lbsize, vis_lbreaks, vis_lbsize, visible_line, invisible_line.
(init_line_structures): Initialize both _rl_wrapped_line ones now.
(rl_redisplay): Fix _rl_wrapped_line handling by using its own size.
Swap whole `line_state_visible' / `line_state_invisible' structures.
(update_line): Update for new `_rl_wrapped_line'.
Index: ./readline/display.c
===================================================================
--- ./readline/display.c 5 May 2006 18:26:12 -0000 1.11
+++ ./readline/display.c 8 Nov 2006 18:23:33 -0000
@@ -73,15 +73,31 @@ static void delete_chars PARAMS((int));
static void insert_some_chars PARAMS((char *, int, int));
static void cr PARAMS((void));
+struct line_state
+ {
+ char *line;
+ int *lbreaks;
+ int lbreaks_size;
+#if defined (HANDLE_MULTIBYTE)
+ int *wrapped_line;
+ int wrapped_line_size;
+#endif
+ };
+static struct line_state line_state_array[2];
+static struct line_state *line_state_visible = &line_state_array[0];
+static struct line_state *line_state_invisible = &line_state_array[1];
+
#if defined (HANDLE_MULTIBYTE)
static int _rl_col_width PARAMS((const char *, int, int));
-static int *_rl_wrapped_line;
#else
# define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s))
#endif
-static int *inv_lbreaks, *vis_lbreaks;
-static int inv_lbsize, vis_lbsize;
+/* FIXME: Backward compatible naming. */
+#define inv_lbreaks (line_state_invisible->lbreaks)
+#define inv_lbsize (line_state_invisible->lbreaks_size)
+#define vis_lbreaks (line_state_visible->lbreaks)
+#define vis_lbsize (line_state_visible->lbreaks_size)
/* Heuristic used to decide whether it is faster to move from CUR to NEW
by backing up or outputting a carriage return and moving forward. */
@@ -150,8 +166,9 @@ static int last_lmargin;
/* The line display buffers. One is the line currently displayed on
the screen. The other is the line about to be displayed. */
-static char *visible_line = (char *)NULL;
-static char *invisible_line = (char *)NULL;
+/* FIXME: Backward compatible naming. */
+#define visible_line (line_state_visible->line)
+#define invisible_line (line_state_invisible->line)
/* A buffer for `modeline' messages. */
static char msg_buf[128];
@@ -437,7 +454,10 @@ init_line_structures (minsize)
inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int));
vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int));
#if defined (HANDLE_MULTIBYTE)
- _rl_wrapped_line = (int *)xmalloc (vis_lbsize * sizeof (int));
+ line_state_visible->wrapped_line_size = vis_lbsize;
+ line_state_visible->wrapped_line = (int *)xmalloc (line_state_visible->wrapped_line_size * sizeof (int));
+ line_state_invisible->wrapped_line_size = inv_lbsize;
+ line_state_invisible->wrapped_line = (int *)xmalloc (line_state_invisible->wrapped_line_size * sizeof (int));
#endif
inv_lbreaks[0] = vis_lbreaks[0] = 0;
}
@@ -572,10 +592,15 @@ rl_redisplay ()
{ \
inv_lbsize *= 2; \
inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
- _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \
} \
inv_lbreaks[++newlines] = out; \
- _rl_wrapped_line[newlines] = _rl_wrapped_multicolumn; \
+ if (newlines >= (line_state_invisible->wrapped_line_size - 1)) \
+ { \
+ line_state_invisible->wrapped_line_size *= 2; \
+ line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, \
+ line_state_invisible->wrapped_line_size * sizeof (int)); \
+ } \
+ line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; \
lpos = 0; \
} \
} while (0)
@@ -605,7 +630,7 @@ rl_redisplay ()
#endif
#if defined (HANDLE_MULTIBYTE)
- memset (_rl_wrapped_line, 0, vis_lbsize);
+ memset (line_state_invisible->wrapped_line, 0, line_state_invisible->wrapped_line_size * sizeof (int));
num = 0;
#endif
@@ -1118,17 +1143,10 @@ rl_redisplay ()
/* Swap visible and non-visible lines. */
{
- char *vtemp = visible_line;
- int *itemp = vis_lbreaks, ntemp = vis_lbsize;
-
- visible_line = invisible_line;
- invisible_line = vtemp;
-
- vis_lbreaks = inv_lbreaks;
- inv_lbreaks = itemp;
-
- vis_lbsize = inv_lbsize;
- inv_lbsize = ntemp;
+ struct line_state *line_state_temp = line_state_visible;
+
+ line_state_visible = line_state_invisible;
+ line_state_invisible = line_state_temp;
rl_display_fixed = 0;
/* If we are displaying on a single line, and last_lmargin is > 0, we
@@ -1194,8 +1212,9 @@ update_line (old, new, current_line, oma
/* This fixes only double-column characters, but if the wrapped
character comsumes more than three columns, spaces will be
inserted in the string buffer. */
- if (_rl_wrapped_line[current_line] > 0)
- _rl_clear_to_eol (_rl_wrapped_line[current_line]);
+ if (current_line < line_state_visible->wrapped_line_size
+ && line_state_visible->wrapped_line[current_line] > 0)
+ _rl_clear_to_eol (line_state_visible->wrapped_line[current_line]);
memset (&ps, 0, sizeof (mbstate_t));
ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps);
++++++ gdb-6.5-readline-long-line-crash-test.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
Index: ./gdb/testsuite/gdb.base/readline-overflow.exp
===================================================================
RCS file: ./gdb/testsuite/gdb.base/readline-overflow.exp
diff -N ./gdb/testsuite/gdb.base/readline-overflow.exp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/readline-overflow.exp 13 Nov 2006 23:42:50 -0000
@@ -0,0 +1,125 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb(a)prep.ai.mit.edu
+
+# This file was written by Jan Kratochvil <jan.kratochvil(a)redhat.com>
+
+# This file is part of the gdb testsuite.
+
+#
+# Tests for readline buffer overflow.
+#
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Don't let a .inputrc file or an existing setting of INPUTRC mess up
+# the test results. Even if /dev/null doesn't exist on the particular
+# platform, the readline library will use the default setting just by
+# failing to open the file. OTOH, opening /dev/null successfully will
+# also result in the default settings being used since nothing will be
+# read from this file.
+global env
+if [info exists env(INPUTRC)] {
+ set old_inputrc $env(INPUTRC)
+}
+set env(INPUTRC) "/dev/null"
+
+set oldtimeout1 $timeout
+set timeout 600
+
+if [info exists env(GDBHISTFILE)] {
+ set old_gdbhistfile $env(GDBHISTFILE)
+}
+if [info exists env(HISTSIZE)] {
+ set old_histsize $env(HISTSIZE)
+}
+set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
+set env(HISTSIZE) "10"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+
+set width 11
+gdb_test "set width $width" \
+ "" \
+ "Setting width to $width."
+#gdb_test "set height 1" \
+# "" \
+# "Setting height to 1."
+send_gdb "run X"
+set i 0
+# It crashes using `set width 7' on `set total 3560'.
+# Sometimes it corrupts screen on `set width 7'.
+# Bugreport used `set total 130001':
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
+# Check also `timeout' above.
+set total 4200
+gdb_expect {
+ -re X {
+ incr i
+ if {$i <= $total} {
+ send_gdb "X"
+ exp_continue
+ }
+ }
+ -re "\[ \b\r\n\]" {
+ exp_continue
+ }
+ eof {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters, reason: EOF"
+ gdb_clear_suppressed
+ }
+ timeout {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters (timeout $timeout), reason: TIMEOUT"
+ gdb_clear_suppressed
+ }
+ default {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters, reason: 0=\[$expect_out(0,string)\] buffer=\[$expect_out(buffer)\]"
+ gdb_clear_suppressed
+ }
+}
+gdb_test "\r" \
+ "No executable file specified..*" \
+ "All the characters transferred"
+
+
+# Restore globals modified in this test...
+if [info exists old_inputrc] {
+ set env(INPUTRC) $old_inputrc
+} else {
+ unset env(INPUTRC)
+}
+if [info exists old_gdbhistfile] {
+ set env(GDBHISTFILE) $old_gdbhistfile
+} else {
+ unset env(GDBHISTFILE)
+}
+if [info exists old_histsize] {
+ set env(HISTSIZE) $old_histsize
+} else {
+ unset env(HISTSIZE)
+}
+set timeout $oldtimeout1
+
+return 0
++++++ gdb-6.5-section-num-fixup-test.patch ++++++
diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c
--- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c 2008-05-29 13:51:50.000000000 -0400
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2008 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(a)prep.ai.mit.edu */
+
+int var;
diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c
--- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c 2008-05-29 13:51:39.000000000 -0400
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2008 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(a)prep.ai.mit.edu */
+
+int
+main (void)
+{
+ return 0;
+}
diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp gdb-6.5/gdb/testsuite/gdb.base/datalib.exp
--- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/datalib.exp 2008-05-29 14:58:33.000000000 -0400
@@ -0,0 +1,51 @@
+# Copyright 2008 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.
+
+set testfile datalib
+set srcfilemain ${testfile}-main.c
+set srcfilelib ${testfile}-lib.c
+set libfile ${objdir}/${subdir}/${testfile}-lib.so
+set binfile ${objdir}/${subdir}/${testfile}-main
+if { [gdb_compile "${srcdir}/${subdir}/${srcfilelib}" "${libfile}" executable [list debug {additional_flags=-shared -nostdlib}]] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfilemain}" "${binfile} ${libfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# We must use a separate library as the main executable is compiled to the
+# address 0 by default and it would get fixed up already at the end of
+# INIT_OBJFILE_SECT_INDICES. We also cannot PRELINK it as PRELINK is missing
+# on ia64. The library must be NOSTDLIB as otherwise some stub code would
+# create the `.text' section there. Also DEBUG option is useful as some of
+# the crashes occur in dwarf2read.c.
+
+# FAIL case:
+# ../../gdb/ia64-tdep.c:2838: internal-error: sect_index_text not initialized
+# A problem internal to GDB has been detected,
+
+gdb_test "start" \
+ "main \\(\\) at .*${srcfilemain}.*" \
+ "start"
++++++ gdb-6.5-sharedlibrary-path.patch ++++++
If you provided some relative path to the shared library, such as with
export LD_LIBRARY_PATH=.
then gdb would fail to match the shared library name during the TLS lookup.
Dropped the workaround/fix for gdb-6.8.50.20081128 - is it still needed?
The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'.
The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
2006-09-01 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* solib-svr4.c (svr4_fetch_objfile_link_map): Match even absolute
requested pathnames to the internal loaded relative pathnames.
2007-10-16 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
2008-02-27 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to gdb-6.7.50.20080227.
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c 2008-02-27 09:00:15.000000000 +0100
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb(a)prep.ai.mit.edu */
+
+int main()
+{
+ return 0;
+}
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c 2008-02-27 09:00:15.000000000 +0100
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb(a)prep.ai.mit.edu */
+
+__thread int var = 42;
--- /dev/null 2009-02-10 00:19:00.494289687 +0100
+++ gdb-6.8.50.20090209-x/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2009-02-10 00:49:38.000000000 +0100
@@ -0,0 +1,86 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile tls-sepdebug
+set srcmainfile ${testfile}-main.c
+set srcsharedfile ${testfile}-shared.c
+
+set binmainfile ${objdir}/${subdir}/${testfile}-main
+set binsharedbase ${testfile}-shared.so
+set binsharedfile ${objdir}/${subdir}/${binsharedbase}
+set binshareddebugfile ${objdir}/${subdir}/${binsharedbase}.debug
+
+# Use explicit -soname as otherwise the full path to the library would get
+# encoded into ${binmainfile} making LD_LIBRARY_PATH tests useless.
+
+# FIXME: gcc dependency (-Wl,-soname).
+
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } {
+ untested "Couldn't compile test library"
+ return -1
+}
+
+# eu-strip(1) works fine but it is a part of `elfutils', not `binutils'.
+if 0 then {
+ remote_exec build "eu-strip -f ${binshareddebugfile} ${binsharedfile}"
+} else {
+ remote_exec build "objcopy --only-keep-debug ${binsharedfile} ${binshareddebugfile}"
+ remote_exec build "objcopy --strip-debug ${binsharedfile}"
+ remote_exec build "objcopy --add-gnu-debuglink=${binshareddebugfile} ${binsharedfile}"
+}
+
+# Do not use `shlib=' as it will automatically add also -rpath for gcc.
+
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcmainfile} ${binsharedfile}" "${binmainfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+# Test also the proper resolving of relative library names to absolute ones.
+# \$PWD is easy - it is the absolute way
+# ${subdir} would fail on "print var"
+
+foreach ld_library_path [list [pwd]/${subdir} ./${subdir}] name { absolute relative } {
+
+ gdb_exit
+ gdb_start
+ ###gdb_reinitialize_dir $srcdir/$subdir
+
+ gdb_test "set env LD_LIBRARY_PATH=$ld_library_path" \
+ "" \
+ "set env LD_LIBRARY_PATH is $name"
+
+ gdb_load ${binmainfile}
+
+ # For C programs, "start" should stop in main().
+
+ gdb_test "start" \
+ "main \\(\\) at .*${srcmainfile}.*" \
+ "start"
+
+ # Check for: Cannot find shared library `/usr/lib/debug/lib/libc-2.4.90.so.debug' in dynamic linker's load module list
+ # as happens with TLS variables and `separate_debug_objfile_backlink'.
+
+ gdb_test "print var" \
+ "\\\$1 = \[0-9\].*" \
+ "print TLS variable from a shared library with $name-directory separate debug info file"
+}
++++++ gdb-6.5-tls-of-separate-debuginfo.patch ++++++
Dependency on: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
2006-09-01 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* target.c (target_translate_tls_address): Fix for separate debuginfo.
diff -rup gdb-6.5.orig/gdb/target.c gdb-6.5/gdb/target.c
--- gdb-6.5.orig/gdb/target.c 2006-09-20 17:13:35.000000000 -0400
+++ gdb-6.5/gdb/target.c 2006-09-20 17:15:53.000000000 -0400
@@ -769,6 +769,12 @@ target_translate_tls_address (struct obj
ptid_t ptid = inferior_ptid;
volatile struct gdb_exception ex;
+ /* Resolve: Cannot find shared library
+ `/usr/lib/debug/lib/lib....so.debug' in dynamic linker's load
+ module list */
+ if (objfile->separate_debug_objfile_backlink != NULL)
+ objfile = objfile->separate_debug_objfile_backlink;
+
TRY_CATCH (ex, RETURN_MASK_ALL)
{
CORE_ADDR lm_addr;
++++++ gdb-6.6-buildid-locate.patch ++++++
++++ 1006 lines (skipped)
++++++ gdb-6.6-buildid-locate-rpm.patch ++++++
++++ 1671 lines (skipped)
++++++ gdb-6.6-bz225783-gdb-debuginfo-paths.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
Index: gdb-6.8.50.20081128/gdb/Makefile.in
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/Makefile.in 2008-12-02 23:06:16.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/Makefile.in 2008-12-02 23:28:02.000000000 +0100
@@ -1490,8 +1490,10 @@ po/$(PACKAGE).pot: force
.SUFFIXES: .y .l
.y.c:
- $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS)
- -sed -e '/extern.*malloc/d' \
+ rm -f $@ $@.tmp
+ $(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \
+ || (rm -f $@; false)
+ sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e '/include.*malloc.h/d' \
@@ -1500,9 +1502,9 @@ po/$(PACKAGE).pot: force
-e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
-e '/^#line.*y.tab.c/d' \
- < $@.tmp > $@.new
- -rm $@.tmp
- mv $@.new ./$*.c
+ -e "s/^\(#line.*\)`basename $<`/\1`echo $<|sed 's/\//\\\\\//g'`/" \
+ < $@.tmp > $@
+ rm -f $@.tmp
.l.c:
if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
$(FLEX) -o$@ $< && \
++++++ gdb-6.6-bz225783-prelink-path.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
--- gdb-6.8/gdb/testsuite/gdb.base/prelink.exp.orig 2008-07-12 08:56:43.000000000 +0200
+++ gdb-6.8/gdb/testsuite/gdb.base/prelink.exp 2008-07-12 08:59:59.000000000 +0200
@@ -55,7 +55,7 @@ if { [gdb_compile "${srcdir}/${subdir}/$
# single new unprelinked library address without wasting the first one/two
# memory areas. We do not care of the efficiency of loading such resulting
# exec-shield unfriendly prelinked library.
-if {[catch "system \"prelink -qNR --no-exec-shield ${libfile}\""] != 0} {
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${libfile}\""] != 0} {
# Maybe we don't have prelink.
return -1
}
@@ -96,11 +96,11 @@ if { $found == 0 } {
return 0
}
-if {[catch "system \"prelink -uN ${libfile}\""] != 0} {
+if {[catch "system \"/usr/sbin/prelink -uN ${libfile}\""] != 0} {
untested "${testfile}.so was not prelinked, maybe system libraries are not prelinked?"
return 0
}
-catch "system \"prelink -qNR --no-exec-shield ${libfile}\""
+catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${libfile}\""
# Start with a fresh gdb
++++++ gdb-6.6-bz229517-gcore-without-terminal.patch ++++++
2007-04-22 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb_gcore.sh: Redirect GDB from `</dev/null'.
2007-04-22 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
--- gdb-6.6-orig/gdb/gdb_gcore.sh 2005-12-17 17:33:59.000000000 -0500
+++ gdb-6.6/gdb/gdb_gcore.sh 2007-04-22 05:42:50.000000000 -0400
@@ -71,7 +71,9 @@
quit
EOF
- gdb -x $tmpfile -batch
+ # `</dev/null' to avoid touching interactive terminal if it is
+ # available but not accessible (SIGTTIN risk)
+ gdb -x $tmpfile -batch </dev/null
if [ -r $name.$pid ] ; then
rc=0
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/gcorebg.c 25 Feb 2007 12:21:20 -0000
@@ -0,0 +1,43 @@
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <signal.h>
+
+int main (int argc, char **argv)
+{
+ pid_t pid = 0;
+ pid_t ppid;
+ char buf[256];
+
+ if (argc != 4)
+ {
+ fprintf (stderr, "Syntax: %s {standard|detached} <gcore command> <core output file>\n",
+ argv[0]);
+ exit (1);
+ }
+
+ pid = fork ();
+
+ switch (pid)
+ {
+ case 0:
+ if (strcmp (argv[1], "detached") == 0)
+ setpgrp ();
+ ppid = getppid ();
+ sprintf (buf, "sh %s -o %s %d", argv[2], argv[3], (int) ppid);
+ system (buf);
+ kill (ppid, SIGTERM);
+ break;
+
+ case -1:
+ perror ("fork err\n");
+ exit (1);
+ break;
+
+ default:
+ sleep (60);
+ }
+
+ return 0;
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/gcorebg.exp 25 Feb 2007 12:21:20 -0000
@@ -0,0 +1,120 @@
+# Copyright 2007 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(a)prep.ai.mit.edu
+
+# This file was written by Jan Kratochvil <jan.kratochvil(a)redhat.com>.
+# This is a test for `gdb_gcore.sh' functionality.
+# It also tests a regression with `gdb_gcore.sh' being run without its
+# accessible terminal.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+if ![info exists GCORE] {
+ set GCORE "${srcdir}/../gdb_gcore.sh"
+}
+verbose "using GCORE = $GCORE" 2
+
+set testfile "gcorebg"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set corefile ${objdir}/${subdir}/${testfile}.test
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested gcorebg.exp
+ return -1
+}
+
+# Cleanup.
+
+proc core_clean {} {
+ global corefile
+
+ foreach file [glob -nocomplain [join [list $corefile *] ""]] {
+ verbose "Delete file $file" 1
+ remote_file target delete $file
+ }
+}
+core_clean
+remote_file target delete "./gdb"
+
+# Generate the core file.
+
+# Provide `./gdb' for `gdb_gcore.sh' running it as a bare `gdb' command.
+# Setup also `$PATH' appropriately.
+# If GDB was not found let `gdb_gcore.sh' to find the system GDB by `$PATH'.
+if {$GDB != "gdb"} {
+ file link ./gdb $GDB
+}
+global env
+set oldpath $env(PATH)
+set env(PATH) [join [list . $env(PATH)] ":"]
+verbose "PATH = $env(PATH)" 2
+
+# Test file body.
+# $detached == "standard" || $detached == "detached"
+
+proc test_body { detached } {
+ global binfile
+ global GCORE
+ global corefile
+
+ set res [remote_spawn target "$binfile $detached $GCORE $corefile"]
+ if { $res < 0 || $res == "" } {
+ fail "Spawning $detached gcore"
+ return 1
+ }
+ pass "Spawning $detached gcore"
+ remote_expect target 20 {
+ timeout {
+ fail "Spawned $detached gcore finished"
+ remote_exec target "kill -9 -[exp_pid -i $res]"
+ return 1
+ }
+ eof {
+ pass "Spawned $detached gcore finished"
+ remote_wait target 20
+ }
+ }
+
+ if {1 == [llength [glob -nocomplain [join [list $corefile *] ""]]]} {
+ pass "Core file generated by $detached gcore"
+ } else {
+ fail "Core file generated by $detached gcore"
+ }
+ core_clean
+}
+
+# First a general `gdb_gcore.sh' spawn with its controlling terminal available.
+
+test_body standard
+
+# And now `gdb_gcore.sh' spawn without its controlling terminal available.
+# It is spawned through `gcorebg.c' using setpgrp ().
+
+test_body detached
+
+
+# Cleanup.
+
+set env(PATH) $oldpath
+remote_file target delete "./gdb"
++++++ gdb-6.6-bz230000-power6-disassembly-test.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000
The original testcase
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
requires too recent GCC.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.exp 25 Feb 2007 18:27:39 -0000
@@ -0,0 +1,54 @@
+# Copyright 2007 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.
+
+# Test PowerPC Power6 instructions disassembly.
+
+if {![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC Power6 instructions disassembly."
+ return
+}
+
+set testfile "powerpc-power6"
+set srcfile ${testfile}.s
+set objfile ${objdir}/${subdir}/${testfile}.o
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ untested "PowerPC prologue tests"
+ return -1
+}
+
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${objfile}
+
+# Disassemble the function.
+
+gdb_test "disass func" ":\tblr\r\n.*" "Basic disassembly"
+
+gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power5 disassembly dcbzl"
+gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power5 disassembly frsqrtes"
+gdb_test "disass func" ":\tdadd *f1,f2,f1\r\n.*" "Power6 disassembly dadd"
+gdb_test "disass func" ":\tdaddq *f1,f2,f1\r\n.*" "Power6 disassembly daddq"
+gdb_test "disass func" ":\tdsub *f1,f2,f1\r\n.*" "Power6 disassembly dsub"
+gdb_test "disass func" ":\tdsubq *f1,f2,f1\r\n.*" "Power6 disassembly dsubq"
+gdb_test "disass func" ":\tdmul *f1,f2,f1\r\n.*" "Power6 disassembly dmul"
+gdb_test "disass func" ":\tdmulq *f1,f2,f1\r\n.*" "Power6 disassembly dmulq"
+gdb_test "disass func" ":\tddiv *f1,f2,f1\r\n.*" "Power6 disassembly ddiv"
+gdb_test "disass func" ":\tddivq *f1,f2,f1\r\n.*" "Power6 disassembly ddivq"
+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpuq"
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.s 25 Feb 2007 18:27:39 -0000
@@ -0,0 +1,16 @@
+ .text
+ .globl func
+func:
+ blr
+ .long 0x7c284fec /* dcbzl r8,r9 */
+ .long 0xed405834 /* frsqrtes f10,f11 */
+ .long 0xec220804 /* dadd f1,f2,f1 */
+ .long 0xfc220804 /* daddq f1,f2,f1 */
+ .long 0xec220c04 /* dsub f1,f2,f1 */
+ .long 0xfc220c04 /* dsubq f1,f2,f1 */
+ .long 0xec220844 /* dmul f1,f2,f1 */
+ .long 0xfc220844 /* dmulq f1,f2,f1 */
+ .long 0xec220c44 /* ddiv f1,f2,f1 */
+ .long 0xfc220c44 /* ddivq f1,f2,f1 */
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
+ .long 0xfc820d04 /* dcmpuq cr1,f2,f1 */
++++++ gdb-6.6-bz235197-fork-detach-info.patch ++++++
2008-03-01 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.8pre.
Remove the `[' character from the GDB-6.8 default message.
Index: gdb-6.7.50.20080227/gdb/linux-nat.c
===================================================================
--- gdb-6.7.50.20080227.orig/gdb/linux-nat.c 2008-03-01 10:30:48.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/linux-nat.c 2008-03-01 10:48:25.000000000 +0100
@@ -415,7 +415,7 @@ linux_child_follow_fork (struct target_o
/* Detach new forked process? */
if (detach_fork)
{
- if (info_verbose || debug_linux_nat)
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_linux_nat)
{
target_terminal_ours ();
fprintf_filtered (gdb_stdlog,
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.c 2008-03-01 10:30:49.000000000 +0100
@@ -0,0 +1,57 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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(a)prep.ai.mit.edu */
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <assert.h>
+#include <stdlib.h>
+
+static void func (void)
+{
+}
+
+int main (void)
+{
+ pid_t child;
+
+ child = fork ();
+ switch (child)
+ {
+ case -1:
+ abort ();
+ case 0:
+ func ();
+ break;
+ default:
+ {
+/* We do not test the switching to the other fork by GDB `fork 1'. */
+#if 0
+ pid_t got;
+
+ got = waitpid (child, NULL, 0);
+ assert (got == child);
+#endif
+ break;
+ }
+ }
+ return 0;
+}
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.exp 2008-03-01 10:49:36.000000000 +0100
@@ -0,0 +1,43 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile fork-detach
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_run_cmd
+# `Starting program: .*' prefix is available since gdb-6.7.
+gdb_test "" \
+ "Detaching after fork from child process.*Program exited normally\\..*" \
+ "Info message caught"
++++++ gdb-6.6-bz237572-ppc-atomic-sequence-test.patch ++++++
2007-06-25 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.threads/atomic-seq-threaded.c,
gdb.threads/atomic-seq-threaded.exp: New files.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c 2008-12-08 22:27:01.000000000 +0100
@@ -0,0 +1,171 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+/* Test stepping over RISC atomic sequences.
+ This variant testcases the code for stepping another thread while skipping
+ over the atomic sequence in the former thread
+ (STEPPING_PAST_SINGLESTEP_BREAKPOINT).
+ Code comes from gcc/testsuite/gcc.dg/sync-2.c */
+
+/* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */
+
+/* Test functionality of the intrinsics for 'short' and 'char'. */
+
+#include <stdlib.h>
+#include <string.h>
+#include <pthread.h>
+#include <assert.h>
+#include <unistd.h>
+
+#define LOOPS 2
+
+static int unused;
+
+static char AI[18];
+static char init_qi[18] = { 3,5,7,9,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0 };
+static char test_qi[18] = { 3,5,7,9,1,4,22,-12,7,8,9,7,1,-12,7,8,9,7 };
+
+static void
+do_qi (void)
+{
+ if (__sync_fetch_and_add(AI+4, 1) != 0)
+ abort ();
+ if (__sync_fetch_and_add(AI+5, 4) != 0)
+ abort ();
+ if (__sync_fetch_and_add(AI+6, 22) != 0)
+ abort ();
+ if (__sync_fetch_and_sub(AI+7, 12) != 0)
+ abort ();
+ if (__sync_fetch_and_and(AI+8, 7) != (char)-1)
+ abort ();
+ if (__sync_fetch_and_or(AI+9, 8) != 0)
+ abort ();
+ if (__sync_fetch_and_xor(AI+10, 9) != 0)
+ abort ();
+ if (__sync_fetch_and_nand(AI+11, 7) != 0)
+ abort ();
+
+ if (__sync_add_and_fetch(AI+12, 1) != 1)
+ abort ();
+ if (__sync_sub_and_fetch(AI+13, 12) != (char)-12)
+ abort ();
+ if (__sync_and_and_fetch(AI+14, 7) != 7)
+ abort ();
+ if (__sync_or_and_fetch(AI+15, 8) != 8)
+ abort ();
+ if (__sync_xor_and_fetch(AI+16, 9) != 9)
+ abort ();
+ if (__sync_nand_and_fetch(AI+17, 7) != 7)
+ abort ();
+}
+
+static short AL[18];
+static short init_hi[18] = { 3,5,7,9,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0 };
+static short test_hi[18] = { 3,5,7,9,1,4,22,-12,7,8,9,7,1,-12,7,8,9,7 };
+
+static void
+do_hi (void)
+{
+ if (__sync_fetch_and_add(AL+4, 1) != 0)
+ abort ();
+ if (__sync_fetch_and_add(AL+5, 4) != 0)
+ abort ();
+ if (__sync_fetch_and_add(AL+6, 22) != 0)
+ abort ();
+ if (__sync_fetch_and_sub(AL+7, 12) != 0)
+ abort ();
+ if (__sync_fetch_and_and(AL+8, 7) != -1)
+ abort ();
+ if (__sync_fetch_and_or(AL+9, 8) != 0)
+ abort ();
+ if (__sync_fetch_and_xor(AL+10, 9) != 0)
+ abort ();
+ if (__sync_fetch_and_nand(AL+11, 7) != 0)
+ abort ();
+
+ if (__sync_add_and_fetch(AL+12, 1) != 1)
+ abort ();
+ if (__sync_sub_and_fetch(AL+13, 12) != -12)
+ abort ();
+ if (__sync_and_and_fetch(AL+14, 7) != 7)
+ abort ();
+ if (__sync_or_and_fetch(AL+15, 8) != 8)
+ abort ();
+ if (__sync_xor_and_fetch(AL+16, 9) != 9)
+ abort ();
+ if (__sync_nand_and_fetch(AL+17, 7) != 7)
+ abort ();
+}
+
+static void *
+start1 (void *arg)
+{
+ unsigned loop;
+ sleep(1);
+
+ for (loop = 0; loop < LOOPS; loop++)
+ {
+ memcpy(AI, init_qi, sizeof(init_qi));
+
+ do_qi ();
+
+ if (memcmp (AI, test_qi, sizeof(test_qi)))
+ abort ();
+ }
+
+ return arg; /* _delete1_ */
+}
+
+static void *
+start2 (void *arg)
+{
+ unsigned loop;
+
+ for (loop = 0; loop < LOOPS; loop++)
+ {
+ memcpy(AL, init_hi, sizeof(init_hi));
+
+ do_hi ();
+
+ if (memcmp (AL, test_hi, sizeof(test_hi)))
+ abort ();
+ }
+
+ return arg; /* _delete2_ */
+}
+
+int
+main (int argc, char **argv)
+{
+ pthread_t thread;
+ int i;
+
+ i = pthread_create (&thread, NULL, start1, NULL); /* _create_ */
+ assert (i == 0); /* _create_after_ */
+
+ sleep (1);
+
+ start2 (NULL);
+
+ i = pthread_join (thread, NULL); /* _delete_ */
+ assert (i == 0);
+
+ return 0; /* _exit_ */
+}
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp 2008-12-08 22:31:01.000000000 +0100
@@ -0,0 +1,84 @@
+# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs.
+# This variant testcases the code for stepping another thread while skipping
+# over the atomic sequence in the former thread
+# (STEPPING_PAST_SINGLESTEP_BREAKPOINT).
+# Copyright (C) 2007 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(a)prep.ai.mit.edu
+
+set testfile atomic-seq-threaded
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+foreach opts {{} {compiler=gcc4} {FAIL}} {
+ if {$opts eq "FAIL"} {
+ return -1
+ }
+ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $opts]] eq "" } {
+ break
+ }
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 0
+}
+
+# pthread_create () will not pass even on x86_64 with software watchpoint.
+# Pass after pthread_create () without any watchpoint active.
+set line [gdb_get_line_number "_create_after_"]
+gdb_test "tbreak $line" \
+ "reakpoint (\[0-9\]+) at .*$srcfile, line $line\..*" \
+ "set breakpoint after pthread_create ()"
+gdb_test "c" \
+ ".*/\\* _create_after_ \\*/.*" \
+ "run till after pthread_create ()"
+
+# Without a watchpoint being software no single-stepping would be used.
+set test "Start (software) watchpoint"
+gdb_test_multiple "watch unused" $test {
+ -re "Watchpoint \[0-9\]+: unused.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Hardware watchpoint \[0-9\]+: unused.*$gdb_prompt $" {
+ # We do not test the goal but still the whole testcase should pass.
+ unsupported $test
+ }
+}
+
+# More thorough testing of the scheduling logic.
+gdb_test "set scheduler-locking step" ""
+
+# Critical code path is stepped through at this point.
+set line [gdb_get_line_number "_exit_"]
+gdb_test "tbreak $line" \
+ "reakpoint \[0-9\]+ at .*$srcfile, line $line\..*" \
+ "set breakpoint at _exit_"
+gdb_test "c" \
+ ".*/\\* _exit_ \\*/.*" \
+ "run till _exit_"
+
+# Just a nonproblematic program exit.
+gdb_test "c" \
+ ".*Program exited normally\\..*" \
+ "run till program exit"
++++++ gdb-6.6-bz247354-leader-exit-fix.patch ++++++
2007-07-08 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* linux-nat.c (linux_lwp_is_zombie): New function.
(wait_lwp): Fix lockup on exit of the thread group leader.
(linux_xfer_partial): Renamed to ...
(linux_xfer_partial_lwp): ... here.
(linux_xfer_partial): New function wrapping LINUX_XFER_PARTIAL_LWP.
2008-02-24 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.8pre.
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:27:34.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:28:14.000000000 +0100
@@ -1981,6 +1981,31 @@ linux_handle_extended_wait (struct lwp_i
_("unknown ptrace event %d"), event);
}
+static int
+linux_lwp_is_zombie (long lwp)
+{
+ char buffer[MAXPATHLEN];
+ FILE *procfile;
+ int retval = 0;
+
+ sprintf (buffer, "/proc/%ld/status", lwp);
+ procfile = fopen (buffer, "r");
+ if (procfile == NULL)
+ {
+ warning (_("unable to open /proc file '%s'"), buffer);
+ return 0;
+ }
+ while (fgets (buffer, sizeof (buffer), procfile) != NULL)
+ if (strcmp (buffer, "State:\tZ (zombie)\n") == 0)
+ {
+ retval = 1;
+ break;
+ }
+ fclose (procfile);
+
+ return retval;
+}
+
/* Wait for LP to stop. Returns the wait status, or 0 if the LWP has
exited. */
@@ -1988,16 +2013,31 @@ static int
wait_lwp (struct lwp_info *lp)
{
pid_t pid;
- int status;
+ int status = 0;
int thread_dead = 0;
gdb_assert (!lp->stopped);
gdb_assert (lp->status == 0);
- pid = my_waitpid (GET_LWP (lp->ptid), &status, 0);
- if (pid == -1 && errno == ECHILD)
+ /* Thread group leader may have exited but we would lock up by WAITPID as it
+ waits on all its threads; __WCLONE is not applicable for the leader.
+ The thread leader restrictions is only a performance optimization here.
+ LINUX_NAT_THREAD_ALIVE cannot be used here as it requires a STOPPED
+ process; it gets ESRCH both for the zombie and for running processes. */
+ if (is_lwp (lp->ptid) && GET_PID (lp->ptid) == GET_LWP (lp->ptid)
+ && linux_lwp_is_zombie (GET_LWP (lp->ptid)))
+ {
+ thread_dead = 1;
+ if (debug_linux_nat)
+ fprintf_unfiltered (gdb_stdlog, "WL: Threads leader %s vanished.\n",
+ target_pid_to_str (lp->ptid));
+ }
+
+ if (!thread_dead)
{
- pid = my_waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
+ pid = my_waitpid (GET_LWP (lp->ptid), &status, 0);
+ if (pid == -1 && errno == ECHILD)
+ pid = my_waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
if (pid == -1 && errno == ECHILD)
{
/* The thread has previously exited. We need to delete it
@@ -4153,8 +4193,10 @@ linux_nat_xfer_osdata (struct target_ops
return len;
}
+/* Transfer from the specific LWP currently set by PID of INFERIOR_PTID. */
+
static LONGEST
-linux_xfer_partial (struct target_ops *ops, enum target_object object,
+linux_xfer_partial_lwp (struct target_ops *ops, enum target_object object,
const char *annex, gdb_byte *readbuf,
const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
{
@@ -4201,6 +4243,45 @@ linux_xfer_partial (struct target_ops *o
offset, len);
}
+/* nptl_db expects being able to transfer memory just by specifying PID.
+ After the thread group leader exists the Linux kernel turns the task
+ into zombie no longer permitting accesses to its memory.
+ Transfer the memory from an arbitrary LWP_LIST entry in such case. */
+
+static LONGEST
+linux_xfer_partial (struct target_ops *ops, enum target_object object,
+ const char *annex, gdb_byte *readbuf,
+ const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+{
+ LONGEST xfer;
+ struct lwp_info *lp;
+ /* Not using SAVE_INFERIOR_PTID already here for better performance. */
+ struct cleanup *old_chain = NULL;
+ ptid_t inferior_ptid_orig = inferior_ptid;
+
+ errno = 0;
+ xfer = linux_xfer_partial_lwp (ops, object, annex, readbuf, writebuf,
+ offset, len);
+
+ for (lp = lwp_list; xfer == 0 && (errno == EACCES || errno == ESRCH)
+ && lp != NULL; lp = lp->next)
+ {
+ if (!is_lwp (lp->ptid) || ptid_equal (lp->ptid, inferior_ptid_orig))
+ continue;
+
+ if (old_chain == NULL)
+ old_chain = save_inferior_ptid ();
+ inferior_ptid = BUILD_LWP (GET_LWP (lp->ptid), GET_LWP (lp->ptid));
+ errno = 0;
+ xfer = linux_xfer_partial_lwp (ops, object, annex, readbuf, writebuf,
+ offset, len);
+ }
+
+ if (old_chain != NULL)
+ do_cleanups (old_chain);
+ return xfer;
+}
+
/* Create a prototype generic GNU/Linux target. The client can override
it with local methods. */
++++++ gdb-6.6-bz247354-leader-exit-test.patch ++++++
2007-07-07 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.threads/leader-exit.c, gdb.threads/leader-exit.exp: New files.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/leader-exit.c 7 Jul 2007 15:21:57 -0000
@@ -0,0 +1,47 @@
+/* Clean exit of the thread group leader should not break GDB.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ 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. */
+
+#include <pthread.h>
+#include <assert.h>
+#include <unistd.h>
+
+static void *start (void *arg)
+{
+ for (;;)
+ pause ();
+ /* NOTREACHED */
+ assert (0);
+ return arg;
+}
+
+int main (void)
+{
+ pthread_t thread;
+ int i;
+
+ i = pthread_create (&thread, NULL, start, NULL); /* create1 */
+ assert (i == 0);
+
+ pthread_exit (NULL);
+ /* NOTREACHED */
+ assert (0);
+ return 0;
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/leader-exit.exp 7 Jul 2007 15:21:57 -0000
@@ -0,0 +1,64 @@
+# Copyright (C) 2007 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.
+
+# Exit of the thread group leader should not break GDB.
+
+# This file was written by Jan Kratochvil <jan.kratochvil(a)redhat.com>.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "leader-exit"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_run_cmd
+
+proc stop_process { description } {
+ global gdb_prompt
+
+ # For this to work we must be sure to consume the "Continuing."
+ # message first, or GDB's signal handler may not be in place.
+ after 1000 {send_gdb "\003"}
+ gdb_expect {
+ -re "Program received signal SIGINT.*$gdb_prompt $"
+ {
+ pass $description
+ }
+ timeout
+ {
+ fail "$description (timeout)"
+ }
+ }
+}
+
+# Prevent races.
+sleep 8
+
+stop_process "Threads could be stopped"
+
+gdb_test "info threads" \
+ "\\* 2 Thread \[^\r\n\]* in \[^\r\n\]*" \
+ "Single thread has been left"
++++++ gdb-6.6-gcore32-test.patch ++++++
Test GCORE on 32bit inferiors on 64bit platforms.
UNSUPPORTED results are valid for `-m64' on 32bit targets.
Index: gdb-6.8/gdb/testsuite/gdb.base/gcore.exp
===================================================================
--- gdb-6.8.orig/gdb/testsuite/gdb.base/gcore.exp 2008-01-01 23:53:19.000000000 +0100
+++ gdb-6.8/gdb/testsuite/gdb.base/gcore.exp 2008-07-14 10:28:05.000000000 +0200
@@ -30,9 +30,14 @@ set testfile "gcore"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested gcore.exp
- return -1
+# `-static-libgcc' to avoid dependency on `libgcc.{i386,ppc}'.
+foreach additional_flags {{} {-m32 -static-libgcc} {-m64 -static-libgcc}} {
+
+set prefix "arch{$additional_flags}:"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=$additional_flags]] != "" } {
+ unsupported "${prefix} gcore.exp"
+ continue
}
# Start with a fresh gdb.
@@ -47,23 +52,23 @@ send_gdb "help gcore\n"
gdb_expect {
-re "Undefined command: .gcore.*$gdb_prompt $" {
# gcore command not supported -- nothing to test here.
- unsupported "gdb does not support gcore on this target"
- return -1;
+ unsupported "${prefix} gdb does not support gcore on this target"
+ continue
}
-re "Save a core file .*$gdb_prompt $" {
- pass "help gcore"
+ pass "${prefix} help gcore"
}
-re ".*$gdb_prompt $" {
- fail "help gcore"
+ fail "${prefix} help gcore"
}
timeout {
- fail "help gcore (timeout)"
+ fail "${prefix} help gcore (timeout)"
}
}
if { ! [ runto_main ] } then {
- untested gcore.exp
- return -1
+ untested "${prefix} gcore.exp"
+ continue
}
proc capture_command_output { command prefix } {
@@ -77,7 +82,7 @@ proc capture_command_output { command pr
set output_string $expect_out(1,string)
}
default {
- fail "capture_command_output failed on $command."
+ fail "${prefix} capture_command_output failed on $command."
}
}
return $output_string
@@ -109,22 +114,22 @@ set escapedfilename [string_to_regexp ${
set core_supported 0
gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
- "save a corefile" \
+ "${prefix} save a corefile" \
{
-re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
- pass "save a corefile"
+ pass "${prefix} save a corefile"
global core_supported
set core_supported 1
}
-re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
- unsupported "save a corefile"
+ unsupported "${prefix} save a corefile"
global core_supported
set core_supported 0
}
}
if {!$core_supported} {
- return -1
+ continue
}
# Now restart gdb and load the corefile.
@@ -136,31 +141,31 @@ gdb_load ${binfile}
send_gdb "core ${objdir}/${subdir}/gcore.test\n"
gdb_expect {
-re ".* is not a core dump:.*$gdb_prompt $" {
- fail "re-load generated corefile (bad file format)"
+ fail "${prefix} re-load generated corefile (bad file format)"
# No use proceeding from here.
- return;
+ continue
}
-re ".*: No such file or directory.*$gdb_prompt $" {
- fail "re-load generated corefile (file not found)"
+ fail "${prefix} re-load generated corefile (file not found)"
# No use proceeding from here.
- return;
+ continue
}
-re ".*Couldn't find .* registers in core file.*$gdb_prompt $" {
- fail "re-load generated corefile (incomplete note section)"
+ fail "${prefix} re-load generated corefile (incomplete note section)"
}
-re "Core was generated by .*$gdb_prompt $" {
- pass "re-load generated corefile"
+ pass "${prefix} re-load generated corefile"
}
-re ".*$gdb_prompt $" {
- fail "re-load generated corefile"
+ fail "${prefix} re-load generated corefile"
}
timeout {
- fail "re-load generated corefile (timeout)"
+ fail "${prefix} re-load generated corefile (timeout)"
}
}
send_gdb "where\n"
-gdb_expect_list "where in corefile" ".*$gdb_prompt $" {
+gdb_expect_list "${prefix} where in corefile" ".*$gdb_prompt $" {
".*\[\r\n\]+#0 .* terminal_func \\(\\) at "
".*\[\r\n\]+#1 .* array_func \\(\\) at "
".*\[\r\n\]+#2 .* factorial_func \\(value=1\\) at "
@@ -174,61 +179,64 @@ gdb_expect_list "where in corefile" ".*$
set post_corefile_regs [capture_command_output "info registers" ""]
if ![string compare $pre_corefile_regs $post_corefile_regs] then {
- pass "corefile restored general registers"
+ pass "${prefix} corefile restored general registers"
} else {
- fail "corefile restored general registers"
+ fail "${prefix} corefile restored general registers"
}
set post_corefile_allregs [capture_command_output "info all-reg" ""]
if ![string compare $pre_corefile_allregs $post_corefile_allregs] then {
- pass "corefile restored all registers"
+ pass "${prefix} corefile restored all registers"
} else {
- fail "corefile restored all registers"
+ fail "${prefix} corefile restored all registers"
}
set post_corefile_extern_array \
[capture_command_output "print extern_array" "$print_prefix"]
if ![string compare $pre_corefile_extern_array $post_corefile_extern_array] {
- pass "corefile restored extern array"
+ pass "${prefix} corefile restored extern array"
} else {
- fail "corefile restored extern array"
+ fail "${prefix} corefile restored extern array"
}
set post_corefile_static_array \
[capture_command_output "print static_array" "$print_prefix"]
if ![string compare $pre_corefile_static_array $post_corefile_static_array] {
- pass "corefile restored static array"
+ pass "${prefix} corefile restored static array"
} else {
- fail "corefile restored static array"
+ fail "${prefix} corefile restored static array"
}
set post_corefile_uninit_array \
[capture_command_output "print un_initialized_array" "$print_prefix"]
if ![string compare $pre_corefile_uninit_array $post_corefile_uninit_array] {
- pass "corefile restored un-initialized array"
+ pass "${prefix} corefile restored un-initialized array"
} else {
- fail "corefile restored un-initialized array"
+ fail "${prefix} corefile restored un-initialized array"
}
set post_corefile_heap_string \
[capture_command_output "print heap_string" "$print_prefix"]
if ![string compare $pre_corefile_heap_string $post_corefile_heap_string] {
- pass "corefile restored heap array"
+ pass "${prefix} corefile restored heap array"
} else {
- fail "corefile restored heap array"
+ fail "${prefix} corefile restored heap array"
}
set post_corefile_local_array \
[capture_command_output "print array_func::local_array" "$print_prefix"]
if ![string compare $pre_corefile_local_array $post_corefile_local_array] {
- pass "corefile restored stack array"
+ pass "${prefix} corefile restored stack array"
} else {
- fail "corefile restored stack array"
+ fail "${prefix} corefile restored stack array"
}
set post_corefile_backtrace [capture_command_output "backtrace" ""]
if ![string compare $pre_corefile_backtrace $post_corefile_backtrace] {
- pass "corefile restored backtrace"
+ pass "${prefix} corefile restored backtrace"
} else {
- fail "corefile restored backtrace"
+ fail "${prefix} corefile restored backtrace"
+}
+
+# $additional_flags:
}
++++++ gdb-6.6-multifork-debugreg.patch ++++++
++++ 1337 lines (skipped)
++++++ gdb-6.6-readline-system.patch ++++++
2007-10-16 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/doc/Makefile.in
===================================================================
--- gdb-6.7.orig/gdb/doc/Makefile.in 2007-07-26 12:34:00.000000000 +0200
+++ gdb-6.7/gdb/doc/Makefile.in 2007-10-16 16:31:08.000000000 +0200
@@ -109,9 +109,7 @@ DVIPS = dvips
GDB_DOC_SOURCE_INCLUDES = \
$(srcdir)/fdl.texi \
$(srcdir)/gpl.texi \
- $(srcdir)/agentexpr.texi \
- $(READLINE_DIR)/rluser.texi \
- $(READLINE_DIR)/inc-hist.texinfo
+ $(srcdir)/agentexpr.texi
GDB_DOC_BUILD_INCLUDES = \
gdb-cfg.texi \
GDBvn.texi
Index: gdb-6.7/gdb/doc/gdb.texinfo
===================================================================
--- gdb-6.7.orig/gdb/doc/gdb.texinfo 2007-10-16 16:19:19.000000000 +0200
+++ gdb-6.7/gdb/doc/gdb.texinfo 2007-10-16 16:32:10.000000000 +0200
@@ -158,8 +158,8 @@ software in general. We will miss him.
* GDB Bugs:: Reporting bugs in @value{GDBN}
-* Command Line Editing:: Command Line Editing
-* Using History Interactively:: Using History Interactively
+* Command Line Editing: (rluserman). Command Line Editing
+* Using History Interactively: (history). Using History Interactively
* Formatting Documentation:: How to format and print @value{GDBN} documentation
* Installing GDB:: Installing GDB
* Maintenance Commands:: Maintenance Commands
@@ -15533,7 +15533,7 @@ Disable command line editing.
Show whether command line editing is enabled.
@end table
-@xref{Command Line Editing}, for more details about the Readline
+@xref{Command Line Editing, , , rluserman, GNU Readline Library}, for more details about the Readline
interface. Users unfamiliar with @sc{gnu} Emacs or @code{vi} are
encouraged to read that chapter.
@@ -15548,7 +15548,8 @@ history facility.
@value{GDBN} uses the @sc{gnu} History library, a part of the Readline
package, to provide the history facility. @xref{Using History
-Interactively}, for the detailed description of the History library.
+Interactively, , , history, GNU History Library}, for the detailed description
+of the History library.
To issue a command to @value{GDBN} without affecting certain aspects of
the state which is seen by users, prefix it with @samp{server }
@@ -15600,7 +15601,7 @@ This defaults to the value of the enviro
@end table
History expansion assigns special meaning to the character @kbd{!}.
-@xref{Event Designators}, for more details.
+@xref{Event Designators, , , history, GNU History Library}, for more details.
@cindex history expansion, turn on/off
Since @kbd{!} is also the logical not operator in C, history expansion
@@ -16660,7 +16661,8 @@ Indicates the current program counter ad
@cindex TUI key bindings
The TUI installs several key bindings in the readline keymaps
-(@pxref{Command Line Editing}). The following key bindings
+(@pxref{Command Line Editing, , , rluserman, GNU Readline Library}).
+The following key bindings
are installed for both TUI mode and the @value{GDBN} standard mode.
@table @kbd
@@ -21937,15 +21939,6 @@ Such guesses are usually wrong. Even we
things without first using the debugger to find the facts.
@end itemize
-@c The readline documentation is distributed with the readline code
-@c and consists of the two following files:
-@c rluser.texinfo
-@c inc-hist.texinfo
-@c Use -I with makeinfo to point to the appropriate directory,
-@c environment var TEXINPUTS with TeX.
-@include rluser.texi
-@include inc-hist.texinfo
-
@node Formatting Documentation
@appendix Formatting Documentation
@@ -22115,9 +22108,6 @@ source for the @samp{-liberty} free soft
@item gdb-@value{GDBVN}/opcodes
source for the library of opcode tables and disassemblers
-@item gdb-@value{GDBVN}/readline
-source for the @sc{gnu} command-line interface
-
@item gdb-@value{GDBVN}/glob
source for the @sc{gnu} filename pattern-matching subroutine
@@ -22149,7 +22139,7 @@ where @var{host} is an identifier such a
correct value by examining your system.)
Running @samp{configure @var{host}} and then running @code{make} builds the
-@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
+@file{bfd}, @file{mmalloc}, and @file{libiberty}
libraries, then @code{gdb} itself. The configured source files, and the
binaries, are left in the corresponding source directories.
@@ -22175,7 +22165,7 @@ source tree, the @file{gdb-@var{version-
that subdirectory. That is usually not what you want. In particular,
if you run the first @file{configure} from the @file{gdb} subdirectory
of the @file{gdb-@var{version-number}} directory, you will omit the
-configuration of @file{bfd}, @file{readline}, and other sibling
+configuration of @file{bfd}, and other sibling
directories of the @file{gdb} subdirectory. This leads to build errors
about missing include files such as @file{bfd/bfd.h}.
++++++ gdb-6.6-scheduler_locking-step-is-default.patch ++++++
Index: gdb-6.8.50.20081128/gdb/infrun.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/infrun.c 2008-12-09 15:56:16.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/infrun.c 2008-12-09 15:56:59.000000000 +0100
@@ -931,7 +931,7 @@ static const char *scheduler_enums[] = {
schedlock_step,
NULL
};
-static const char *scheduler_mode = schedlock_off;
+static const char *scheduler_mode = schedlock_step;
static void
show_scheduler_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi-console.exp
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.mi/mi-console.exp 2008-08-06 14:52:08.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi-console.exp 2008-12-09 15:59:34.000000000 +0100
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
mi_run_to_main
+# thread-id=\"all\" vs. thread-id=\"1\" below:
+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
+
# Next over the hello() call which will produce lots of output
mi_gdb_test "220-exec-next" \
"220\\^running(\r\n\\*running,thread-id=\"all\")?" \
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi2-console.exp
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2008-08-06 14:52:08.000000000 +0200
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.mi/mi2-console.exp 2008-12-09 16:00:33.000000000 +0100
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
mi_run_to_main
+# thread-id=\"all\" vs. thread-id=\"1\" below:
+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
+
# Next over the hello() call which will produce lots of output
send_gdb "220-exec-next\n"
gdb_expect {
++++++ gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch ++++++
2007-06-25 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* inferior.h (enum resume_step): New definition.
(resume): Change STEP parameter type to ENUM RESUME_STEP.
* infrun.c (resume): Likewise. Extend debug printing of the STEP
parameter. Lock the scheduler only for intentional stepping.
(proceed): Replace the variable ONESTEP with tristate RESUME_STEP.
Set the third RESUME_STEP state according to BPSTAT_SHOULD_STEP.
(currently_stepping): Change the return type to ENUM RESUME_STEP.
Return RESUME_STEP_NEEDED if it is just due to BPSTAT_SHOULD_STEP.
* linux-nat.c (select_singlestep_lwp_callback): Do not focus on
the software watchpoint events.
* linux-nat.h (struct lwp_info): Redeclare STEP as ENUM RESUME_STEP.
2007-10-19 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* infrun.c (proceed): RESUME_STEP initialized for non-stepping.
RESUME_STEP set according to STEP only at the end of the function.
2008-02-24 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.8pre.
Index: gdb-6.8.50.20081209/gdb/inferior.h
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/inferior.h 2008-11-20 01:35:23.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/inferior.h 2008-12-10 01:22:23.000000000 +0100
@@ -168,7 +168,15 @@ extern void reopen_exec_file (void);
/* The `resume' routine should only be called in special circumstances.
Normally, use `proceed', which handles a lot of bookkeeping. */
-extern void resume (int, enum target_signal);
+enum resume_step
+ {
+ /* currently_stepping () should return non-zero for non-continue. */
+ RESUME_STEP_CONTINUE = 0,
+ RESUME_STEP_USER, /* Stepping is intentional by the user. */
+ RESUME_STEP_NEEDED /* Stepping only for software watchpoints. */
+ };
+
+extern void resume (enum resume_step, enum target_signal);
/* From misc files */
Index: gdb-6.8.50.20081209/gdb/infrun.c
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/infrun.c 2008-12-02 20:20:23.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/infrun.c 2008-12-10 01:23:46.000000000 +0100
@@ -73,7 +73,7 @@ static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
-static int currently_stepping (struct thread_info *tp);
+static enum resume_step currently_stepping (struct thread_info *tp);
static int currently_stepping_callback (struct thread_info *tp, void *data);
@@ -961,7 +961,7 @@ set_schedlock_func (char *args, int from
STEP nonzero if we should step (zero to continue instead).
SIG is the signal to give the inferior (zero for none). */
void
-resume (int step, enum target_signal sig)
+resume (enum resume_step step, enum target_signal sig)
{
int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
@@ -975,10 +975,12 @@ resume (int step, enum target_signal sig
QUIT;
if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog,
- "infrun: resume (step=%d, signal=%d), "
- "trap_expected=%d\n",
- step, sig, tp->trap_expected);
+ fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%s, signal=%d), "
+ "trap_expected=%d\n",
+ (step == RESUME_STEP_CONTINUE ? "RESUME_STEP_CONTINUE"
+ : (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
+ : "RESUME_STEP_NEEDED")),
+ sig, tp->trap_expected);
/* Some targets (e.g. Solaris x86) have a kernel bug when stepping
over an instruction that causes a page fault without triggering
@@ -1127,9 +1129,10 @@ a command like `return' or `jump' to con
individually. */
resume_ptid = inferior_ptid;
}
- else if ((scheduler_mode == schedlock_on)
+ else if (scheduler_mode == schedlock_on
|| (scheduler_mode == schedlock_step
- && (step || singlestep_breakpoints_inserted_p)))
+ && (step == RESUME_STEP_USER
+ || singlestep_breakpoints_inserted_p)))
{
/* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid;
@@ -1302,7 +1305,7 @@ proceed (CORE_ADDR addr, enum target_sig
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct thread_info *tp;
CORE_ADDR pc = regcache_read_pc (regcache);
- int oneproc = 0;
+ enum resume_step resume_step = RESUME_STEP_CONTINUE;
if (step > 0)
step_start_function = find_pc_function (pc);
@@ -1322,13 +1325,13 @@ proceed (CORE_ADDR addr, enum target_sig
actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */
- oneproc = 1;
+ resume_step = RESUME_STEP_USER;
else if (gdbarch_single_step_through_delay_p (gdbarch)
&& gdbarch_single_step_through_delay (gdbarch,
get_current_frame ()))
/* We stepped onto an instruction that needs to be stepped
again before re-inserting the breakpoint, do so. */
- oneproc = 1;
+ resume_step = RESUME_STEP_USER;
}
else
{
@@ -1359,13 +1362,13 @@ proceed (CORE_ADDR addr, enum target_sig
is required it returns TRUE and sets the current thread to
the old thread. */
if (prepare_to_proceed (step))
- oneproc = 1;
+ resume_step = RESUME_STEP_USER;
}
/* prepare_to_proceed may change the current thread. */
tp = inferior_thread ();
- if (oneproc)
+ if (resume_step == RESUME_STEP_USER)
{
tp->trap_expected = 1;
/* If displaced stepping is enabled, we can step over the
@@ -1451,8 +1454,13 @@ proceed (CORE_ADDR addr, enum target_sig
/* Reset to normal state. */
init_infwait_state ();
+ if (step)
+ resume_step = RESUME_STEP_USER;
+ if (resume_step == RESUME_STEP_CONTINUE && bpstat_should_step ())
+ resume_step = RESUME_STEP_NEEDED;
+
/* Resume inferior. */
- resume (oneproc || step || bpstat_should_step (), tp->stop_signal);
+ resume (resume_step, tp->stop_signal);
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
@@ -3690,10 +3698,16 @@ currently_stepping_callback (struct thre
return tp != data && currently_stepping_thread (tp);
}
-static int
+static enum resume_step
currently_stepping (struct thread_info *tp)
{
- return currently_stepping_thread (tp) || bpstat_should_step ();
+ if (currently_stepping_thread (tp))
+ return RESUME_STEP_USER;
+
+ if (bpstat_should_step ())
+ return RESUME_STEP_NEEDED;
+
+ return RESUME_STEP_CONTINUE;
}
/* Inferior has stepped into a subroutine call with source code that
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-02 08:57:36.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:22:23.000000000 +0100
@@ -2343,7 +2343,10 @@ count_events_callback (struct lwp_info *
static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{
- if (lp->step && lp->status != 0)
+ /* We do not focus on software watchpoints as we would not catch
+ STEPPING_PAST_SINGLESTEP_BREAKPOINT breakpoints in some other thread
+ as they would remain pending due to `Push back breakpoint for %s'. */
+ if (lp->step == RESUME_STEP_USER && lp->status != 0)
return 1;
else
return 0;
Index: gdb-6.8.50.20081209/gdb/linux-nat.h
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.h 2008-07-27 23:12:40.000000000 +0200
+++ gdb-6.8.50.20081209/gdb/linux-nat.h 2008-12-10 01:22:23.000000000 +0100
@@ -55,8 +55,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */
int status;
- /* Non-zero if we were stepping this LWP. */
- int step;
+ /* The kind of stepping of this LWP. */
+ enum resume_step step;
/* Non-zero si_signo if this LWP stopped with a trap. si_addr may
be the address of a hardware watchpoint. */
++++++ gdb-6.6-step-thread-exit.patch ++++++
Index: gdb-6.8.50.20090226/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/linux-nat.c 2009-02-27 00:04:35.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/linux-nat.c 2009-02-27 07:51:44.000000000 +0100
@@ -1790,15 +1790,17 @@ resume_set_callback (struct lwp_info *lp
static void
linux_nat_resume (struct target_ops *ops,
- ptid_t ptid, int step, enum target_signal signo)
+ ptid_t ptid, int step_int, enum target_signal signo)
{
struct lwp_info *lp;
int resume_all;
+ enum resume_step step = step_int;
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LLR: Preparing to %s %s, %s, inferior_ptid %s\n",
- step ? "step" : "resume",
+ (step == RESUME_STEP_NEEDED
+ ? "needed" : (step ? "step" : "resume")),
target_pid_to_str (ptid),
signo ? strsignal (signo) : "0",
target_pid_to_str (inferior_ptid));
@@ -2740,6 +2742,9 @@ linux_nat_filter_event (int lwpid, int s
/* Check if the thread has exited. */
if ((WIFEXITED (status) || WIFSIGNALED (status)) && num_lwps > 1)
{
+ enum resume_step step = lp->step;
+ pid_t pid = GET_PID (lp->ptid);
+
/* If this is the main thread, we must stop all threads and
verify if they are still alive. This is because in the nptl
thread model, there is no signal issued for exiting LWPs
@@ -2763,6 +2768,26 @@ linux_nat_filter_event (int lwpid, int s
exit_lwp (lp);
+ if (step == RESUME_STEP_USER)
+ {
+ /* Now stop the closest LWP's ... */
+ lp = find_lwp_pid (pid_to_ptid (pid));
+ if (!lp)
+ lp = lwp_list;
+ gdb_assert (lp != NULL);
+ errno = 0;
+ ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
+ (void *) (unsigned long) SIGSTOP);
+ if (debug_linux_nat)
+ fprintf_unfiltered (gdb_stdlog,
+ "PTRACE_CONT %s, 0, 0 (%s)\n",
+ target_pid_to_str (lp->ptid),
+ errno ? safe_strerror (errno)
+ : "OK");
+ /* Avoid the silent `delayed SIGSTOP' handling. */
+ lp->signalled = 0;
+ }
+
/* If there is at least one more LWP, then the exit signal was
not the end of the debugged application and should be
ignored. */
++++++ gdb-6.6-testsuite-timeouts.patch ++++++
--- ./gdb/testsuite/gdb.base/annota1.exp 10 Jan 2007 03:23:04 -0000 1.23
+++ ./gdb/testsuite/gdb.base/annota1.exp 10 May 2007 12:54:11 -0000
@@ -57,6 +57,8 @@ if [target_info exists gdb_stub] {
gdb_step_for_stub;
}
+gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions"
+
#
# the line at which break main will put the breakpoint
#
--- ./gdb/testsuite/gdb.base/annota3.exp 9 Jan 2007 17:59:09 -0000 1.12
+++ ./gdb/testsuite/gdb.base/annota3.exp 10 May 2007 12:54:11 -0000
@@ -56,6 +56,8 @@ if [target_info exists gdb_stub] {
gdb_step_for_stub;
}
+gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions"
+
#
# the line at which break main will put the breakpoint
#
--- gdb-6.6/gdb/testsuite/gdb.threads/step-thread-exit.exp-orig 2007-05-10 15:03:15.000000000 +0200
+++ gdb-6.6/gdb/testsuite/gdb.threads/step-thread-exit.exp 2007-05-10 15:04:24.000000000 +0200
@@ -58,6 +58,9 @@ gdb_test "continue" "Break.*thread_funct
# thread to be stopped and a message printed to tell us we have stepped
# over the thread exit.
set test "step over thread exit 1"
+# ppc64 is currently failing:
+set timeout_old $timeout
+set timeout 60
gdb_test_multiple "next" "$test" {
-re "\}.*$gdb_prompt $" {
send_gdb "next\n"
@@ -71,6 +74,7 @@ gdb_test_multiple "next" "$test" {
exp_continue
}
}
+set timeout $timeout_old
# Without this fixup we could end up in:
# #0 0x00110416 in __kernel_vsyscall ()
++++++ gdb-6.6-threads-static-test.patch ++++++
--- gdb-6.6/gdb/testsuite/gdb.threads/staticthreads.exp-orig 2005-04-30 21:56:47.000000000 +0200
+++ gdb-6.6/gdb/testsuite/gdb.threads/staticthreads.exp 2008-01-11 14:30:15.000000000 +0100
@@ -44,9 +44,21 @@ gdb_load ${binfile}
gdb_test "set print sevenbit-strings" ""
+runto_main
+
+# See if we get excessive LWP there (patched glibc with unpatched GDB):
+# * 2 Thread 135661664 (LWP 3856) main () at threadloop.c:41
+# 1 process 3856 main () at threadloop.c:41
+
+set test "info threads on start"
+gdb_test_multiple "info threads" "$test" {
+ -re "^info threads\r?\n\[^\r\n\]* Thread \[^\r\n\]*\r?\n$gdb_prompt" {
+ pass "$test"
+ }
+}
+
# See if the static multi-threaded program runs.
-runto_main
gdb_test "break sem_post"
set test "Continue to main's call of sem_post"
gdb_test_multiple "continue" "$test" {
++++++ gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch ++++++
Original patch was:
http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html
http://sourceware.org/ml/gdb-cvs/2007-12/msg00123.html
extended for the RHEL safety:
2007-12-28 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* dwarf2read.c (fixup_partial_die): Provide full
`DW_TAG_class_type'-type backing for `DW_TAG_interface_type', even for
namespaces which should not apply for Java `DW_TAG_interface_type'.
2008-02-24 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.8pre.
Index: ./gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.245
diff -u -p -r1.245 dwarf2read.c
--- ./gdb/dwarf2read.c 26 Dec 2007 12:36:18 -0000 1.245
+++ ./gdb/dwarf2read.c 27 Dec 2007 23:25:49 -0000
@@ -5887,7 +5887,8 @@ fixup_partial_die (struct partial_die_in
/* Set default names for some unnamed DIEs. */
if (part_die->name == NULL && (part_die->tag == DW_TAG_structure_type
- || part_die->tag == DW_TAG_class_type))
+ || part_die->tag == DW_TAG_class_type
+ || part_die->tag == DW_TAG_interface_type))
part_die->name = "(anonymous class)";
if (part_die->name == NULL && part_die->tag == DW_TAG_namespace)
@@ -5895,6 +5896,7 @@ fixup_partial_die (struct partial_die_in
if (part_die->tag == DW_TAG_structure_type
|| part_die->tag == DW_TAG_class_type
+ || part_die->tag == DW_TAG_interface_type
|| part_die->tag == DW_TAG_union_type)
guess_structure_name (part_die, cu);
}
++++++ gdb-6.7-bz426600-DW_TAG_interface_type-test.patch ++++++
++++ 710 lines (skipped)
++++++ gdb-6.7-charsign-test.patch ++++++
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
2007-01-25 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.base/charsign.exp, gdb.base/charsign.c: New files.
[ stripped ]
2007-10-19 Jan Kratochvil <jan.kratochvil(a)redhat.com>
Port to GDB-6.7 - only the testcase left, patch has been reverted,
char-vectors restricted.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/charsign.c 26 Jan 2007 10:32:00 -0000
@@ -0,0 +1,37 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 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(a)prep.ai.mit.edu */
+
+int main()
+{
+ return 0;
+}
+
+char n[]="A";
+signed char s[]="A";
+unsigned char u[]="A";
+
+typedef char char_n;
+typedef signed char char_s;
+typedef unsigned char char_u;
+
+char_n n_typed[]="A";
+char_s s_typed[]="A";
+char_u u_typed[]="A";
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/charsign.exp 26 Jan 2007 10:32:00 -0000
@@ -0,0 +1,70 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile charsign
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+proc do_test { cflags } {
+ global srcdir
+ global binfile
+ global subdir
+ global srcfile
+ global gdb_prompt
+
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=$cflags]] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+ }
+
+ # Get things started.
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ # For C programs, "start" should stop in main().
+
+ gdb_test "p n" \
+ "= \"A\""
+ gdb_test "p s" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+ gdb_test "p u" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+ gdb_test "p n_typed" \
+ "= \"A\""
+ gdb_test "p s_typed" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+ gdb_test "p u_typed" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+}
+
+# The string identification works despite the compiler flags below due to
+# gdbtypes.c:
+# if (name && strcmp (name, "char") == 0)
+# TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN;
+
+do_test {}
+do_test {-fsigned-char}
+do_test {-funsigned-char}
++++++ gdb-6.7-kernel-headers-compat.patch ++++++
kernel-headers-2.6.25-0.40.rc1.git2.fc9.x86_64
In file included from /usr/include/asm/ptrace.h:4,
from ../../gdb/amd64-linux-nat.c:44:
/usr/include/asm/ptrace-abi.h:92: error: expected specifier-qualifier-list before ‘u32’
--- gdb-6.7.1-13.fc9.x86_64/gdb/amd64-linux-nat.c-orig 2008-02-15 15:37:28.000000000 -0500
+++ gdb-6.7.1-13.fc9.x86_64/gdb/amd64-linux-nat.c 2008-02-15 15:40:13.000000000 -0500
@@ -35,13 +35,13 @@
#include <sys/procfs.h>
#include <asm/prctl.h>
/* FIXME ezannoni-2003-07-09: we need <sys/reg.h> to be included after
- <asm/ptrace.h> because the latter redefines FS and GS for no apparent
+ <sys/ptrace.h> because the latter redefines FS and GS for no apparent
reason, and those definitions don't match the ones that libpthread_db
uses, which come from <sys/reg.h>. */
/* ezannoni-2003-07-09: I think this is fixed. The extraneous defs have
been removed from ptrace.h in the kernel. However, better safe than
sorry. */
-#include <asm/ptrace.h>
+#include <sys/ptrace.h>
#include <sys/reg.h>
#include "gdb_proc_service.h"
++++++ gdb-6.7-ppc-clobbered-registers-O2-test.patch ++++++
2007-11-04 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.arch/ppc-clobbered-registers-O2.exp: `powerpc64' changed to
`powerpc*'.
Testcase for:
http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
2007-10-21 Luis Machado <luisgpm(a)br.ibm.com>
* rs6000-tdep.c (ppc_dwarf2_frame_init_reg): New function.
* (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as
default dwarf2_frame_set_init_reg function.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c 3 Nov 2007 22:22:28 -0000
@@ -0,0 +1,21 @@
+
+unsigned * __attribute__((noinline))
+start_sequence (unsigned * x, unsigned * y)
+{
+ return (unsigned *)0xdeadbeef;
+};
+
+unsigned __attribute__((noinline))
+gen_movsd (unsigned * operand0, unsigned * operand1)
+{
+ return *start_sequence(operand0, operand1);
+}
+
+int main(void)
+{
+ unsigned x, y;
+
+ x = 13;
+ y = 14;
+ return (int)gen_movsd (&x, &y);
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp 3 Nov 2007 22:22:28 -0000
@@ -0,0 +1,61 @@
+# Copyright 2006 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test displaying call clobbered registers in optimized binaries for ppc.
+# GDB should not show incorrect values.
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "powerpc*-*"] then {
+ verbose "Skipping powerpc* call clobbered registers testing."
+ return
+}
+
+set testfile "ppc-clobbered-registers-O2"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set compile_flags "debug additional_flags=-O2"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${compile_flags}] != "" } {
+ unsupported "Testcase compile failed."
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "Couldn't run to breakpoint"
+ continue
+}
+
+gdb_test "b start_sequence" ".*Breakpoint 2 at.*line 6.*" \
+ "Insert breakpoint at problematic function"
+
+gdb_test continue ".*Breakpoint 2.*in start_sequence.*" \
+ "Run until problematic function"
+
+gdb_test backtrace ".*operand0=<value optimized out>.*operand1=<value optimized out>.*" \
+ "Check value of call clobbered registers"
++++++ gdb-6.7-testsuite-stable-results.patch ++++++
gdb/testsuite/gdb.base/fileio.c:
gdb/testsuite/gdb.base/fileio.exp:
2007-12-08 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.base/fileio.c (ROOTSUBDIR): New macro.
(main): CHDIR into ROOTSUBDIR. CHOWN ROOTSUBDIR and CHDIR into
ROOTSUBDIR if we are being run as root.
* gdb.base/fileio.exp: Change the startup and finish cleanup.
Change the test file reference to be into the `fileio.dir' directory.
sources/gdb/testsuite/gdb.base/dump.exp:
Found on RHEL-5.s390x.
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/auxv.exp:
random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp:
frames-invalid can happen asynchronously.
--- ./gdb/testsuite/gdb.base/fileio.c 13 Jun 2006 08:55:22 -0000 1.10
+++ ./gdb/testsuite/gdb.base/fileio.c 8 Dec 2007 16:04:10 -0000
@@ -58,6 +58,8 @@ system (const char * string);
1) Invalid string/command. - returns 127. */
static const char *strerrno (int err);
+#define ROOTSUBDIR "fileio.dir"
+
#define FILENAME "foo.fileio.test"
#define RENAMED "bar.fileio.test"
#define NONEXISTANT "nofoo.fileio.test"
@@ -542,6 +544,37 @@ strerrno (int err)
int
main ()
{
+ /* ROOTSUBDIR is already prepared by fileio.exp. We use it for easy cleanup
+ (by fileio.exp) if we are run by multiple users in the same directory. */
+
+ if (chdir (ROOTSUBDIR) != 0)
+ {
+ printf ("chdir " ROOTSUBDIR ": %s\n", strerror (errno));
+ exit (1);
+ }
+
+ /* These tests
+ Open for write but no write permission returns EACCES
+ Unlinking a file in a directory w/o write access returns EACCES
+ fail if we are being run as root - drop the privileges here. */
+
+ if (geteuid () == 0)
+ {
+ uid_t uid = 99;
+
+ if (chown (".", uid, uid) != 0)
+ {
+ printf ("chown %d.%d " ROOTSUBDIR ": %s\n", (int) uid, (int) uid,
+ strerror (errno));
+ exit (1);
+ }
+ if (setuid (uid) || geteuid () == 0)
+ {
+ printf ("setuid %d: %s\n", (int) uid, strerror (errno));
+ exit (1);
+ }
+ }
+
/* Don't change the order of the calls. They partly depend on each other */
test_open ();
test_write ();
--- ./gdb/testsuite/gdb.base/fileio.exp 23 Aug 2007 18:14:16 -0000 1.12
+++ ./gdb/testsuite/gdb.base/fileio.exp 8 Dec 2007 16:04:10 -0000
@@ -46,8 +46,8 @@ if [get_compiler_info ${binfile}] {
return -1;
}
-remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test}
-remote_exec build {sh -xc rm\ -rf\ *.fileio.test}
+remote_exec build {sh -xc rm\ -rf\ fileio.dir}
+remote_exec build {sh -xc mkdir\ -m777\ fileio.dir}
set oldtimeout $timeout
set timeout [expr "$timeout + 60"]
@@ -88,7 +88,7 @@ gdb_test continue \
"Opening nonexistant file returns ENOENT"
send_gdb "continue\n" ; gdb_expect -re "$gdb_prompt $"
-catch "system \"chmod -f -w nowrt.fileio.test\""
+catch "system \"chmod -f -w fileio.dir/nowrt.fileio.test\""
gdb_test continue \
"Continuing\\..*open 5:.*EACCES$stop_msg" \
@@ -252,8 +252,8 @@ gdb_test continue \
send_gdb "quit\n"
send_gdb "y\n"
-remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test}
-remote_exec build {sh -xc rm\ -rf\ *.fileio.test}
+remote_exec build {sh -xc test\ -r\ fileio.dir/dir2.fileio.test\ &&\ chmod\ -f\ +w\ fileio.dir/dir2.fileio.test}
+remote_exec build {sh -xc rm\ -rf\ fileio.dir}
set timeout $oldtimeout
return 0
--- sources/gdb/testsuite/gdb.base/dump.exp-orig 2008-08-28 11:44:40.000000000 +0200
+++ sources/gdb/testsuite/gdb.base/dump.exp 2008-08-28 11:44:49.000000000 +0200
@@ -493,8 +493,10 @@ if ![string compare $is64bitonly "no"] t
gdb_test "print zero_all ()" "" ""
# restore with expressions
+ # Address may fit in int32 but its negative result would be 0xffffxxxx for
+ # 64-bit LONGEST addresses.
test_restore_saved_value \
- "intarr3.srec ${array2_start}-${array_start} &intarray\[3\] &intarray\[4\]" \
+ "intarr3.srec (long)${array2_start}-${array_start} &intarray\[3\] &intarray\[4\]" \
"array partial with expressions" 4 "intarray2\[3\]"
gdb_test "print intarray2\[2\] == 0" " = 1" "element 2 not changed, == 4"
--- gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp-orig 2009-02-09 16:31:11.000000000 +0100
+++ gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp 2009-02-09 21:27:38.000000000 +0100
@@ -286,7 +286,7 @@ if [target_info exists gdb,nosignals] {
} else {
send_gdb "signal SIGUSR1\n"
gdb_expect {
- -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${escapedsrcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n(\r\n\032\032frames-invalid\r\n)*\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${escapedsrcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
{ pass "send SIGUSR1" }
-re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
{ setup_xfail "*-*-*" 1270
--- ./gdb/testsuite/gdb.base/auxv.exp 2009-02-11 00:54:54.000000000 +0100
+++ ./gdb/testsuite/gdb.base/auxv.exp 2009-02-11 00:51:30.000000000 +0100
@@ -78,8 +78,10 @@ proc fetch_auxv {test} {
set auxv_lines {}
set bad -1
+ # Former trailing `\[\r\n\]+' may eat just \r leaving \n in the buffer
+ # corrupting the next matches.
if {[gdb_test_multiple "info auxv" $test {
- -re "info auxv\[\r\n\]+" {
+ -re "info auxv\r\n" {
exp_continue
}
-ex "The program has no auxiliary information now" {
@@ -94,20 +96,20 @@ proc fetch_auxv {test} {
set bad 1
exp_continue
}
- -re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\[\r\n\]+" {
+ -re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\r\n" {
lappend auxv_lines $expect_out(0,string)
exp_continue
}
- -re "^\[0-9\]+\[ \t\]+\\?\\?\\?\[^\r\n\]+\[\r\n\]+" {
+ -re "^\[0-9\]+\[ \t\]+\\?\\?\\?\[^\r\n\]+\r\n" {
warning "Unrecognized tag value: $expect_out(0,string)"
set bad 1
lappend auxv_lines $expect_out(0,string)
exp_continue
}
- -re ".*$gdb_prompt $" {
+ -re "$gdb_prompt $" {
incr bad
}
- -re "^\[^\r\n\]+\[\r\n\]+" {
+ -re "^\[^\r\n\]+\r\n" {
if {!$bad} {
warning "Unrecognized output: $expect_out(0,string)"
set bad 1
--- ./gdb/testsuite/gdb.base/callfuncs.exp 2009-01-03 06:58:03.000000000 +0100
+++ ./gdb/testsuite/gdb.base/callfuncs.exp 2009-02-11 00:51:42.000000000 +0100
@@ -249,15 +249,17 @@ proc fetch_all_registers {test} {
set all_registers_lines {}
set bad -1
+ # Former trailing `\[\r\n\]+' may eat just \r leaving \n in the buffer
+ # corrupting the next matches.
if {[gdb_test_multiple "info all-registers" $test {
- -re "info all-registers\[\r\n\]+" {
+ -re "info all-registers\r\n" {
exp_continue
}
-ex "The program has no registers now" {
set bad 1
exp_continue
}
- -re "^bspstore\[ \t\]+\[^\r\n\]+\[\r\n\]+" {
+ -re "^bspstore\[ \t\]+\[^\r\n\]+\r\n" {
if [istarget "ia64-*-*"] {
# Filter out bspstore which is specially tied to bsp,
# giving spurious differences.
@@ -266,14 +268,14 @@ proc fetch_all_registers {test} {
}
exp_continue
}
- -re "^\[^ \t\]+\[ \t\]+\[^\r\n\]+\[\r\n\]+" {
+ -re "^\[^ \t\]+\[ \t\]+\[^\r\n\]+\r\n" {
lappend all_registers_lines $expect_out(0,string)
exp_continue
}
- -re ".*$gdb_prompt $" {
+ -re "$gdb_prompt $" {
incr bad
}
- -re "^\[^\r\n\]+\[\r\n\]+" {
+ -re "^\[^\r\n\]+\r\n" {
if {!$bad} {
warning "Unrecognized output: $expect_out(0,string)"
set bad 1
++++++ gdb-6.8.50.20090216-cvs.tar.bz2 -> gdb-6.8.50.20090302.tar.bz2 ++++++
gdb/gdb-6.8.50.20090216-cvs.tar.bz2 /mounts/work_src_done/STABLE/gdb/gdb-6.8.50.20090302.tar.bz2 differ: byte 11, line 1
++++++ gdb-6.8-attach-signalled-detach-stopped.patch ++++++
Index: gdb-6.8.50.20090209/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090209.orig/gdb/linux-nat.c 2009-02-09 16:12:23.000000000 +0100
+++ gdb-6.8.50.20090209/gdb/linux-nat.c 2009-02-09 16:15:30.000000000 +0100
@@ -204,6 +204,9 @@ blocked. */
static struct target_ops *linux_ops;
static struct target_ops linux_ops_saved;
+/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */
+static pid_t pid_was_stopped;
+
/* The method to call, if any, when a new thread is attached. */
static void (*linux_nat_new_thread) (ptid_t);
@@ -902,7 +905,14 @@ linux_child_follow_fork (struct target_o
fork_save_infrun_state (fp, 0);
}
else
- target_detach (NULL, 0);
+ {
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
+ In this point of code it cannot be 1 as we would not get FORK
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
+ We would have to first TARGET_STOP and WAITPID it as with running
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
+ target_detach (NULL, 0);
+ }
inferior_ptid = ptid_build (child_pid, child_pid, 0);
@@ -1229,6 +1239,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LNPAW: Attaching to a stopped process\n");
+ pid_was_stopped = GET_PID (ptid);
/* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED /
@@ -1561,6 +1572,9 @@ GPT: lwp %s had signal %s, but it is in
*status = lp->status;
}
+ if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
+ *status = W_STOPCODE (SIGSTOP);
+
return 0;
}
@@ -1671,6 +1685,8 @@ linux_nat_detach (struct target_ops *ops
}
else
linux_ops->to_detach (ops, args, from_tty);
+
+ pid_was_stopped = 0;
}
/* Resume LP. */
@@ -1825,6 +1841,14 @@ linux_nat_resume (ptid_t ptid, int step_
resume_callback. */
lp->stopped = 0;
+ /* At this point, we are going to resume the inferior and if we
+ have attached to a stopped process, we no longer should leave
+ it as stopped if the user detaches. PTID variable has PID set to LWP
+ while we need to check the real PID here. */
+
+ if (!step && lp && pid_was_stopped == GET_PID (lp->ptid))
+ pid_was_stopped = 0;
+
if (resume_all)
iterate_over_lwps (resume_callback, NULL);
@@ -3316,6 +3340,8 @@ linux_nat_mourn_inferior (struct target_
there are other viable forks to debug. Delete the exiting
one and context-switch to the first available. */
linux_fork_mourn_inferior ();
+
+ pid_was_stopped = 0;
}
/* Convert a native/host siginfo object, into/from the siginfo in the
Index: gdb-6.8.50.20090209/gdb/testsuite/gdb.threads/attach-stopped.exp
===================================================================
--- gdb-6.8.50.20090209.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2009-01-03 06:58:07.000000000 +0100
+++ gdb-6.8.50.20090209/gdb/testsuite/gdb.threads/attach-stopped.exp 2009-02-09 16:12:41.000000000 +0100
@@ -62,7 +62,65 @@ proc corefunc { threadtype } {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
- # Verify that we can attach to the stopped process.
+ # Verify that we can attach to the process by first giving its
+ # executable name via the file command, and using attach with the
+ # process ID.
+
+ set test "$threadtype: set file, before attach1 to stopped process"
+ gdb_test_multiple "file $binfile" "$test" {
+ -re "Load new symbol table from.*y or n. $" {
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
+ "$test (re-read)"
+ }
+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ set test "$threadtype: attach1 to stopped, after setting file"
+ gdb_test_multiple "attach $testpid" "$test" {
+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ # ".*sleep.*clone.*" would fail on s390x as bt stops at START_THREAD there.
+ if {[string equal $threadtype threaded]} {
+ gdb_test "thread apply all bt" ".*sleep.*start_thread.*" "$threadtype: attach1 to stopped bt"
+ } else {
+ gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach1 to stopped bt"
+ }
+
+ # Exit and detach the process.
+
+ gdb_exit
+
+ # Avoid some race:
+ sleep 2
+
+ if [catch {open /proc/${testpid}/status r} fileid] {
+ set line2 "NOTFOUND"
+ } else {
+ gets $fileid line1;
+ gets $fileid line2;
+ close $fileid;
+ }
+
+ set test "$threadtype: attach1, exit leaves process stopped"
+ if {[string match "*(stopped)*" $line2]} {
+ pass $test
+ } else {
+ fail $test
+ }
+
+ # At this point, the process should still be stopped
+
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ # Verify that we can attach to the process just by giving the
+ # process ID.
set test "$threadtype: attach2 to stopped, after setting file"
gdb_test_multiple "attach $testpid" "$test" {
Index: gdb-6.8.50.20090209/gdb/testsuite/gdb.threads/attachstop-mt.exp
===================================================================
--- gdb-6.8.50.20090209.orig/gdb/testsuite/gdb.threads/attachstop-mt.exp 2009-01-03 06:58:07.000000000 +0100
+++ gdb-6.8.50.20090209/gdb/testsuite/gdb.threads/attachstop-mt.exp 2009-02-09 16:12:41.000000000 +0100
@@ -176,12 +176,23 @@ gdb_test "bt" ".*sleep.*(func|main).*" "
# Exit and detach the process.
gdb_exit
-# Stop the program
-remote_exec build "kill -s STOP ${testpid}"
-
# No race
sleep 2
+set fileid3 [open $status2 r];
+gets $fileid3 line1;
+gets $fileid3 line2;
+close $fileid3;
+
+set test "attach3, exit leaves process stopped"
+if {[string match "*(stopped)*" $line2]} {
+ pass $test
+} else {
+ fail $test
+}
+
+# At this point, the process should still be stopped
+
# Continue the test as we would hit another expected bug regarding
# Program received signal SIGSTOP, Stopped (signal).
# across NPTL threads.
++++++ gdb-6.8-bz254229-gcore-prpsinfo.patch ++++++
Index: gdb-6.8.50.20081209/bfd/elf-bfd.h
===================================================================
--- gdb-6.8.50.20081209.orig/bfd/elf-bfd.h 2008-12-03 15:50:57.000000000 +0100
+++ gdb-6.8.50.20081209/bfd/elf-bfd.h 2008-12-10 01:35:08.000000000 +0100
@@ -2154,7 +2154,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int);
extern char *elfcore_write_prpsinfo
- (bfd *, char *, int *, const char *, const char *);
+ (bfd *, char *, int *, void *, const char *, const char *);
extern char *elfcore_write_prstatus
(bfd *, char *, int *, long, int, const void *);
extern char * elfcore_write_pstatus
Index: gdb-6.8.50.20081209/bfd/elf.c
===================================================================
--- gdb-6.8.50.20081209.orig/bfd/elf.c 2008-12-03 15:50:57.000000000 +0100
+++ gdb-6.8.50.20081209/bfd/elf.c 2008-12-10 01:35:08.000000000 +0100
@@ -8345,6 +8345,7 @@ char *
elfcore_write_prpsinfo (bfd *abfd,
char *buf,
int *bufsiz,
+ void *info,
const char *fname,
const char *psargs)
{
@@ -8371,9 +8372,15 @@ elfcore_write_prpsinfo (bfd *abfd,
int note_type = NT_PRPSINFO;
#endif
- memset (&data, 0, sizeof (data));
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ if (info)
+ memcpy (&data, info, sizeof (data));
+ else
+ {
+ memset (&data, 0, sizeof (data));
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ }
+
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
@@ -8388,9 +8395,15 @@ elfcore_write_prpsinfo (bfd *abfd,
int note_type = NT_PRPSINFO;
#endif
- memset (&data, 0, sizeof (data));
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ if (info)
+ memcpy (&data, info, sizeof (data));
+ else
+ {
+ memset (&data, 0, sizeof (data));
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ }
+
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
Index: gdb-6.8.50.20081209/gdb/amd64-linux-nat.c
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/amd64-linux-nat.c 2008-12-10 01:28:28.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/amd64-linux-nat.c 2008-12-10 01:35:08.000000000 +0100
@@ -139,6 +139,7 @@ static int amd64_linux_gregset32_reg_off
static char *
amd64_linux_elfcore_write_prpsinfo (bfd *abfd, char *buf, int *bufsiz,
+ void *info,
const char *fname, const char *psargs)
{
if (gdbarch_ptr_bit(current_gdbarch) == 32)
@@ -148,14 +149,20 @@ amd64_linux_elfcore_write_prpsinfo (bfd
struct elf_prpsinfo32 data;
note_type = NT_PRPSINFO;
- memset (&data, 0, sizeof (data));
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ if (info)
+ memcpy (&data, info, sizeof (data));
+ else
+ {
+ memset (&data, 0, sizeof (data));
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ }
+
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
else
- return elfcore_write_prpsinfo (abfd, buf, bufsiz, fname, psargs);
+ return elfcore_write_prpsinfo (abfd, buf, bufsiz, info, fname, psargs);
}
static void
Index: gdb-6.8.50.20081209/gdb/fbsd-nat.c
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/fbsd-nat.c 2008-10-28 16:22:12.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/fbsd-nat.c 2008-12-10 01:35:08.000000000 +0100
@@ -210,6 +210,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);
note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
+ NULL,
fname, psargs);
}
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:28:14.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:35:25.000000000 +0100
@@ -53,6 +53,7 @@
#include <sys/types.h>
#include "gdb_dirent.h"
#include "xml-support.h"
+#include "gdb_procfs32.h" /* for struct elf_prpsinfo32 */
#ifdef HAVE_PERSONALITY
# include <sys/personality.h>
@@ -216,7 +217,7 @@ static LONGEST (*super_xfer_partial) (st
/* This functions make elfcore note sections.
They may get overriden by code adjusting data for multi-target builds. */
char *(*linux_elfcore_write_prpsinfo)
- (bfd *, char *, int *, const char *, const char *) = elfcore_write_prpsinfo;
+ (bfd *, char *, int *, void *, const char *, const char *) = elfcore_write_prpsinfo;
char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus;
static char *
@@ -3614,6 +3615,159 @@ linux_nat_corefile_thread_callback (stru
return 0;
}
+/* Should be always true for Linux */
+#define HAVE_PRPSINFO_T 1
+
+#if defined (HAVE_PRPSINFO_T)
+
+/* Fills struct elf_prpsinfo{32,64} as much as possible, imitate Linux kernel
+ binfmt_elf.c. Unknown values are filled with zeroes. The structure is
+ malloced. */
+
+static void*
+fill_prpsinfo (void)
+{
+ struct stat sb;
+ char filename[sizeof ("/proc//cmdline") + sizeof (int) * 3 + 2];
+ char buf[1024];
+ char proc_state[5];
+ char proc_cmdline[sizeof (((struct elf_prpsinfo*)0)->pr_psargs) + 1];
+ unsigned flags;
+ long proc_nice;
+ unsigned proc_ppid;
+ unsigned proc_pgid;
+ unsigned proc_sid;
+ pid_t pid;
+ int fd, n;
+ char *cp, *proc_comm, *state_s;
+ /* String comes from Linux kernel binfmt_elf.c FILL_PSINFO but it is already
+ obsolete there to <linux/sched.h> TASK_* constants. */
+ const char state_string[] = "RSDTZW";
+ int state_num;
+
+ /* Get /proc/$PID/stat. */
+ pid = ptid_get_pid (inferior_ptid);
+ sprintf (filename, "/proc/%u/stat", (unsigned)pid);
+ fd = open (filename, O_RDONLY);
+ if (fd < 0)
+ return NULL;
+ fstat (fd, &sb); /* No error checking (can it ever happen?). */
+ n = read (fd, buf, sizeof (buf) - 1);
+ close (fd);
+ if (n < 0)
+ return NULL;
+ buf[n] = 0;
+
+ cp = strrchr (buf, ')'); /* Split into "PID (COMM" and "<rest>". */
+ if (!cp)
+ return NULL;
+ *cp = 0;
+
+ /* Grab COMM. */
+ proc_comm = strchr (buf, '(');
+ if (!proc_comm)
+ return NULL;
+ proc_comm++;
+
+ /* Read /proc/$PID/cmdline. */
+ proc_cmdline[0] = 0;
+ strcpy (strrchr (filename, '/'), "/cmdline");
+ fd = open (filename, O_RDONLY);
+ if (fd >= 0)
+ {
+ int n;
+
+ n = read (fd, proc_cmdline, sizeof (proc_cmdline) - 1);
+ if (n < 0)
+ n = 0;
+ proc_cmdline[n] = 0;
+ while (n--) /* Replace NULs with spaces. */
+ if (proc_cmdline[n] == 0)
+ proc_cmdline[n] = ' ';
+ close (fd);
+ }
+
+ /* Parse /proc/$PID/stat. */
+ n = sscanf (cp + 2, /* skip ") " */
+ "%4s %u " /* state, ppid */
+ "%u %u %*s %*s " /* pgid, sid, tty, tpgid */
+ "%u %*s %*s %*s " /* flags, min_flt, cmin_flt, maj_flt */
+ "%*s " /* cmaj_flt */
+ "%*s %*s " /* utime, stime */
+ "%*s %*s %*s " /* cutime, cstime, priority */
+ "%ld " /* nice */
+ /*"%*s %*s " timeout, it_real_value */
+ /*"%lu " start_time */
+ /*"%lu " vsize */
+ /*"%lu " rss */
+ /*"%lu %lu %lu " rss_rlim, start_code, end_code */
+ /*"%lu %lu %lu " start_stack, kstk_esp, kstk_eip */
+ /*"%u %u %u %u " signal, blocked, sigignore, sigcatch */
+ /*"%lu %lu %lu" wchan, nswap, cnswap */
+ , proc_state, &proc_ppid,
+ &proc_pgid, &proc_sid,
+ &flags,
+ &proc_nice);
+ if (n != 6)
+ return NULL;
+
+ state_s = strchr (state_string, proc_state[0]);
+ if (state_s != NULL)
+ state_num = state_s - state_string;
+ else
+ {
+ /* 0 means Running, some more unusal state would be better. */
+ state_num = 0;
+ }
+
+#if ULONG_MAX > 0xffffffffU
+ /* We skip this code on 32-bit gdb. */
+ if (gdbarch_ptr_bit (current_gdbarch) == 64)
+ {
+ struct elf_prpsinfo *info = xzalloc (sizeof (*info));
+
+ info->pr_state = state_num;
+ info->pr_sname = proc_state[0];
+ info->pr_zomb = (proc_state[0] == 'Z');
+ info->pr_nice = proc_nice;
+ info->pr_flag = flags;
+ info->pr_uid = sb.st_uid;
+ info->pr_gid = sb.st_gid;
+ info->pr_pid = pid;
+ info->pr_ppid = proc_ppid;
+ info->pr_pgrp = proc_pgid;
+ info->pr_sid = proc_sid;
+ strncpy (info->pr_fname, proc_comm, sizeof (info->pr_fname));
+ strncpy (info->pr_psargs, proc_cmdline, sizeof (info->pr_psargs));
+
+ return info;
+ }
+#endif
+ if (gdbarch_ptr_bit (current_gdbarch) == 32)
+ {
+ struct elf_prpsinfo32 *info = xzalloc (sizeof (*info));
+
+ info->pr_state = state_num;
+ info->pr_sname = proc_state[0];
+ info->pr_zomb = (proc_state[0] == 'Z');
+ info->pr_nice = proc_nice;
+ info->pr_flag = flags;
+ info->pr_uid = sb.st_uid;
+ info->pr_gid = sb.st_gid;
+ info->pr_pid = pid;
+ info->pr_ppid = proc_ppid;
+ info->pr_pgrp = proc_pgid;
+ info->pr_sid = proc_sid;
+ strncpy (info->pr_fname, proc_comm, sizeof (info->pr_fname));
+ strncpy (info->pr_psargs, proc_cmdline, sizeof (info->pr_psargs));
+
+ return info;
+ }
+
+ return NULL;
+}
+#endif
+
/* Fills the "to_make_corefile_note" target vector. Builds the note
section for a corefile, and returns it in a malloc buffer. */
@@ -3633,8 +3787,14 @@ linux_nat_make_corefile_notes (bfd *obfd
if (get_exec_file (0))
{
+#if defined (HAVE_PRPSINFO_T)
+ void *data = fill_prpsinfo ();
+#define DATAPTR data
+#else
+#define DATAPTR NULL
strncpy (fname, strrchr (get_exec_file (0), '/') + 1, sizeof (fname));
strncpy (psargs, get_exec_file (0), sizeof (psargs));
+#endif
if (get_inferior_args ())
{
char *string_end;
@@ -3650,9 +3810,15 @@ linux_nat_make_corefile_notes (bfd *obfd
psargs_end - string_end);
}
}
- note_data = (char *) linux_elfcore_write_prpsinfo (obfd, note_data,
- note_size, fname,
+ note_data = (char *) linux_elfcore_write_prpsinfo (obfd,
+ note_data, note_size,
+ DATAPTR,
+ fname,
psargs);
+#if defined (HAVE_PRPSINFO_T)
+ xfree (DATAPTR);
+#endif
+#undef DATAPTR
}
/* Dump information for threads. */
Index: gdb-6.8.50.20081209/gdb/linux-nat.h
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.h 2008-12-10 01:27:33.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/linux-nat.h 2008-12-10 01:35:08.000000000 +0100
@@ -138,7 +138,7 @@ struct siginfo *linux_nat_get_siginfo (p
/* These functions make elfcore note sections.
They may get overriden by code adjusting data for multi-target builds. */
extern char *(*linux_elfcore_write_prpsinfo)
- (bfd *, char *, int *, const char *, const char *);
+ (bfd *, char *, int *, void *, const char *, const char *);
extern char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *);
extern char *(*linux_elfcore_write_prfpreg)
Index: gdb-6.8.50.20081209/gdb/procfs.c
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/procfs.c 2008-11-09 12:27:17.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/procfs.c 2008-12-10 01:35:08.000000000 +0100
@@ -6181,6 +6181,7 @@ procfs_make_note_section (bfd *obfd, int
note_data = (char *) elfcore_write_prpsinfo (obfd,
note_data,
note_size,
+ NULL,
fname,
psargs);
++++++ gdb-6.8-bz436037-reg-no-longer-active.patch ++++++
diff -d -urpN src.0/gdb/valops.c src.1/gdb/valops.c
--- src.0/gdb/valops.c 2008-07-27 04:00:03.000000000 +0200
+++ src.1/gdb/valops.c 2008-07-31 15:17:42.000000000 +0200
@@ -813,10 +813,18 @@ value_assign (struct value *toval, struc
struct frame_info *frame;
int value_reg;
- /* Figure out which frame this is in currently. */
- frame = frame_find_by_id (VALUE_FRAME_ID (toval));
value_reg = VALUE_REGNUM (toval);
+ /* Figure out which frame this is in currently. */
+ frame = frame_find_by_id (VALUE_FRAME_ID (toval));
+ /* "set $reg+=1" should work on programs with no debug info,
+ but frame_find_by_id returns NULL here (RH bug 436037).
+ Use current frame, it represents CPU state in this case.
+ If frame_find_by_id is changed to do it internally
+ (it is contemplated there), remove this. */
+ if (!frame)
+ frame = get_current_frame ();
+ /* Probably never happens. */
if (!frame)
error (_("Value being assigned to is no longer active."));
++++++ gdb-6.8-bz442765-threaded-exec-test.patch ++++++
Test various forms of threads tracking across exec(2).
diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.c gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.c
--- gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.c 2008-04-16 17:05:19.000000000 -0400
+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.c 2008-04-16 14:43:50.000000000 -0400
@@ -18,21 +18,95 @@
Boston, MA 02111-1307, USA. */
#include <stddef.h>
-#include <pthread.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
+#include <stdio.h>
+#ifdef THREADS
+
+# include <pthread.h>
static void *
threader (void *arg)
{
- return NULL;
+ return NULL;
}
+#endif
+
int
-main (void)
+main (int argc, char **argv)
{
+ char *exec_nothreads, *exec_threads, *cmd;
+ int phase;
+ char phase_s[8];
+
+ setbuf (stdout, NULL);
+
+ if (argc != 4)
+ {
+ fprintf (stderr, "%s <non-threaded> <threaded> <phase>\n", argv[0]);
+ return 1;
+ }
+
+#ifdef THREADS
+ puts ("THREADS: Y");
+#else
+ puts ("THREADS: N");
+#endif
+ exec_nothreads = argv[1];
+ printf ("exec_nothreads: %s\n", exec_nothreads);
+ exec_threads = argv[2];
+ printf ("exec_threads: %s\n", exec_threads);
+ phase = atoi (argv[3]);
+ printf ("phase: %d\n", phase);
+
+ /* Phases: threading
+ 0: N -> N
+ 1: N -> Y
+ 2: Y -> Y
+ 3: Y -> N
+ 4: N -> exit */
+
+ cmd = NULL;
+
+#ifndef THREADS
+ switch (phase)
+ {
+ case 0:
+ cmd = exec_nothreads;
+ break;
+ case 1:
+ cmd = exec_threads;
+ break;
+ case 2:
+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0],
+ phase);
+ return 1;
+ case 3:
+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0],
+ phase);
+ return 1;
+ case 4:
+ return 0;
+ default:
+ assert (0);
+ }
+#else /* THREADS */
+ switch (phase)
+ {
+ case 0:
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
+ argv[0], phase);
+ return 1;
+ case 1:
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
+ argv[0], phase);
+ return 1;
+ case 2:
+ cmd = exec_threads;
+ {
pthread_t t1;
int i;
@@ -40,7 +114,34 @@ main (void)
assert (i == 0);
i = pthread_join (t1, NULL);
assert (i == 0);
+ }
+ break;
+ case 3:
+ cmd = exec_nothreads;
+ {
+ pthread_t t1;
+ int i;
+
+ i = pthread_create (&t1, NULL, threader, (void *) NULL);
+ assert (i == 0);
+ i = pthread_join (t1, NULL);
+ assert (i == 0);
+ }
+ break;
+ case 4:
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
+ argv[0], phase);
+ return 1;
+ default:
+ assert (0);
+ }
+#endif /* THREADS */
+
+ assert (cmd != NULL);
+
+ phase++;
+ snprintf (phase_s, sizeof phase_s, "%d", phase);
- execl ("/bin/true", "/bin/true", NULL);
- abort ();
+ execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL);
+ assert (0);
}
diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.exp gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.exp
--- gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.exp 2008-04-16 17:05:19.000000000 -0400
+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.exp 2008-04-16 14:42:49.000000000 -0400
@@ -20,9 +20,14 @@
set testfile threaded-exec
set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile_nothreads ${objdir}/${subdir}/${testfile}N
+set binfile_threads ${objdir}/${subdir}/${testfile}Y
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_nothreads}" executable {additional_flags=-UTHREADS}] != "" } {
+ return -1
+}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile_threads}" executable {additional_flags=-DTHREADS}] != "" } {
return -1
}
@@ -30,9 +35,9 @@ gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+gdb_load ${binfile_nothreads}
-gdb_run_cmd
+gdb_run_cmd ${binfile_nothreads} ${binfile_threads} 0
gdb_test_multiple {} "Program exited" {
-re "\r\nProgram exited normally.\r\n$gdb_prompt $" {
++++++ gdb-6.8-bz457187-largefile.patch ++++++
gdb/
2009-03-02 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* configure.ac: Call AC_SYS_LARGEFILE.
* config.in: Regenerate.
* configure: Regenerate.
diff -up -rup gdb-orig/configure.ac gdb/configure.ac
--- ./gdb-orig/configure.ac 2009-03-02 23:39:01.000000000 +0100
+++ ./gdb/configure.ac 2009-03-02 23:40:46.000000000 +0100
@@ -30,6 +30,7 @@ AC_GNU_SOURCE
AC_AIX
AC_ISC_POSIX
gl_EARLY
+AC_SYS_LARGEFILE
AM_PROG_CC_STDC
AC_CONFIG_AUX_DIR(..)
diff -up -rup gdb-orig/config.in gdb/config.in
--- ./gdb-orig/config.in 2009-03-02 23:39:01.000000000 +0100
+++ ./gdb/config.in 2009-03-02 23:40:53.000000000 +0100
@@ -725,6 +725,9 @@
# undef _ALL_SOURCE
#endif
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
@@ -734,6 +737,9 @@
<sys/proc.h> problem on IRIX 5. */
#undef _KMEMUSER
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
/* Define to 1 if on MINIX. */
#undef _MINIX
diff -up -rup gdb-orig/configure gdb/configure
--- ./gdb-orig/configure 2009-03-02 23:39:01.000000000 +0100
+++ ./gdb/configure 2009-03-02 23:40:49.000000000 +0100
@@ -862,6 +862,7 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
+ --disable-largefile omit support for large files
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-targets alternative target configurations
@@ -3313,6 +3314,370 @@ _ACEOF
+# Check whether --enable-largefile or --disable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+ enableval="$enable_largefile"
+
+fi;
+if test "$enable_largefile" != no; then
+
+ echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sys_largefile_CC=' -n32'; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ ac_cv_sys_file_offset_bits=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sys_file_offset_bits=64; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ break
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
+if test "$ac_cv_sys_file_offset_bits" != no; then
+
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+
+fi
+rm -f conftest*
+ echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_large_files+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ ac_cv_sys_large_files=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sys_large_files=1; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ break
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6
+if test "$ac_cv_sys_large_files" != no; then
+
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+
+fi
+rm -f conftest*
+fi
+
++++++ gdb-6.8-bz466901-backtrace-full-prelinked.patch ++++++
Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
Index: gdb-6.8.50.20081128/gdb/dwarf2loc.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/dwarf2loc.c 2008-12-08 11:00:45.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/dwarf2loc.c 2008-12-08 18:02:49.000000000 +0100
@@ -55,7 +55,9 @@ find_location_expression (struct dwarf2_
CORE_ADDR low, high;
gdb_byte *loc_ptr, *buf_end;
int length;
- struct objfile *objfile = dwarf2_per_cu_objfile (baton->per_cu);
+ struct objfile *objfile1 = dwarf2_per_cu_objfile (baton->per_cu);
+ struct objfile *objfile = objfile1->separate_debug_objfile
+ ? objfile1->separate_debug_objfile : objfile1;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
unsigned int addr_size = dwarf2_per_cu_addr_size (baton->per_cu);
CORE_ADDR base_mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp 2008-12-08 18:00:43.000000000 +0100
@@ -0,0 +1,102 @@
+# Copyright 2008 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.
+
+# Minimal DWARF-2 unit test
+
+# This test can only be run on i386/x86_64 targets which support DWARF-2.
+# For now pick a sampling of likely targets.
+if {(![istarget *-*-linux*]
+ && ![istarget *-*-gnu*]
+ && ![istarget *-*-elf*]
+ && ![istarget *-*-openbsd*])
+ || (![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"])} {
+ return 0
+}
+
+set testfile "dw2-loclist-prelinked"
+set srcfuncfile ${testfile}-func.S
+set binsharedfuncfile ${objdir}/${subdir}/${testfile}.so
+set srcmainfile ${testfile}-main.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+remote_exec build "rm -f ${binfile}"
+
+# get the value of gcc_compiled
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+# This test can only be run on gcc as we use additional_flags=FIXME
+if {$gcc_compiled == 0} {
+ return 0
+}
+
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfuncfile}" "${binsharedfuncfile}" {debug additional_flags=-m32}] != "" } {
+ untested "Couldn't compile test library"
+ return -1
+}
+
+# The new separate debug info file will be stored in the .debug subdirectory.
+
+if [gdb_gnu_strip_debug ${binsharedfuncfile}] {
+ # check that you have a recent version of strip and objcopy installed
+ unsupported "cannot produce separate debug info files"
+ return -1
+}
+
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${binsharedfuncfile}\""] != 0} {
+ # Maybe we don't have prelink.
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" \
+ "${binfile}" executable [list debug additional_flags=-m32 shlib=${binsharedfuncfile}]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_run_cmd
+
+gdb_test "" "Program received signal SIGABRT, Aborted..*" "Enter abort()"
+
+# Incorrect:
+# #0 0x00110430 in __kernel_vsyscall ()
+# No symbol table info available.
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
+# No symbol table info available.
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
+# No symbol table info available.
+# #3 0x44f10437 in func () at dw2-loclist-prelinked.c:8
+# i = Could not find the frame base for "func".
+
+# Correct:
+# #0 0x00110430 in __kernel_vsyscall ()
+# No symbol table info available.
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
+# No symbol table info available.
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
+# No symbol table info available.
+# #3 0x4ae36437 in func () at dw2-loclist-prelinked.c:8
+# i = 3827288
+# #4 0x0804851a in main () at ../../../gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c:24
+# No locals.
+
+# `abort' can get expressed as `*__GI_abort'.
+gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\r\n\[\t \]+i = -?\[0-9\].*in main \\(.*" "Backtrace after abort()"
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c 2008-12-08 18:00:43.000000000 +0100
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* dw2-loclist-prelinked-func.S */
+extern void func (void);
+
+int
+main (void)
+{
+ func ();
+ return 0;
+}
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S 2008-12-08 18:00:43.000000000 +0100
@@ -0,0 +1,328 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/*
+#include <stdlib.h>
+
+void
+func (void)
+{
+ int i;
+
+ abort ();
+}
+*/
+ .file "dw2-loclist-prelinked.c"
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .text
+.Ltext0:
+.globl func
+ .type func, @function
+func:
+.LFB2:
+ .file 1 "dw2-loclist-prelinked.c"
+ .loc 1 5 0
+ pushl %ebp
+.LCFI0:
+ movl %esp, %ebp
+.LCFI1:
+ subl $24, %esp
+.LCFI2:
+ .loc 1 8 0
+ call abort
+.LFE2:
+ .size func, .-func
+ .section .debug_frame,"",@progbits
+.Lframe0:
+ .long .LECIE0-.LSCIE0
+.LSCIE0:
+ .long 0xffffffff
+ .byte 0x1
+ .string ""
+ .uleb128 0x1
+ .sleb128 -4
+ .byte 0x8
+ .byte 0xc
+ .uleb128 0x4
+ .uleb128 0x4
+ .byte 0x88
+ .uleb128 0x1
+ .align 4
+.LECIE0:
+.LSFDE0:
+ .long .LEFDE0-.LASFDE0
+.LASFDE0:
+ .long .Lframe0
+ .long .LFB2
+ .long .LFE2-.LFB2
+ .byte 0x4
+ .long .LCFI0-.LFB2
+ .byte 0xe
+ .uleb128 0x8
+ .byte 0x85
+ .uleb128 0x2
+ .byte 0x4
+ .long .LCFI1-.LCFI0
+ .byte 0xd
+ .uleb128 0x5
+ .align 4
+.LEFDE0:
+ .text
+.Letext0:
+ .section .debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+ .long .LFB2-.Ltext0
+ .long .LCFI0-.Ltext0
+ .value 0x2
+ .byte 0x74
+ .sleb128 4
+ .long .LCFI0-.Ltext0
+ .long .LCFI1-.Ltext0
+ .value 0x2
+ .byte 0x74
+ .sleb128 8
+ .long .LCFI1-.Ltext0
+ .long .LFE2-.Ltext0
+ .value 0x2
+ .byte 0x75
+ .sleb128 8
+ .long 0x0
+ .long 0x0
+ .section .debug_info
+ .long 0x94
+ .value 0x2
+ .long .Ldebug_abbrev0
+ .byte 0x4
+ .uleb128 0x1
+ .long .LASF10
+ .byte 0x1
+ .long .LASF11
+ .long .LASF12
+ .long .Ltext0
+ .long .Letext0
+ .long .Ldebug_line0
+ .uleb128 0x2
+ .byte 0x4
+ .byte 0x7
+ .long .LASF0
+ .uleb128 0x3
+ .byte 0x4
+ .byte 0x5
+ .string "int"
+ .uleb128 0x2
+ .byte 0x4
+ .byte 0x5
+ .long .LASF1
+ .uleb128 0x2
+ .byte 0x1
+ .byte 0x8
+ .long .LASF2
+ .uleb128 0x2
+ .byte 0x2
+ .byte 0x7
+ .long .LASF3
+ .uleb128 0x2
+ .byte 0x4
+ .byte 0x7
+ .long .LASF4
+ .uleb128 0x2
+ .byte 0x1
+ .byte 0x6
+ .long .LASF5
+ .uleb128 0x2
+ .byte 0x2
+ .byte 0x5
+ .long .LASF6
+ .uleb128 0x2
+ .byte 0x8
+ .byte 0x5
+ .long .LASF7
+ .uleb128 0x2
+ .byte 0x8
+ .byte 0x7
+ .long .LASF8
+ .uleb128 0x4
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x2
+ .byte 0x1
+ .byte 0x6
+ .long .LASF9
+ .uleb128 0x5
+ .byte 0x1
+ .long .LASF13
+ .byte 0x1
+ .byte 0x5
+ .byte 0x1
+ .long .LFB2
+ .long .LFE2
+ .long .LLST0
+ .uleb128 0x6
+ .string "i"
+ .byte 0x1
+ .byte 0x6
+ .long 0x2c
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -12
+ .byte 0x0
+ .byte 0x0
+ .section .debug_abbrev
+ .uleb128 0x1
+ .uleb128 0x11
+ .byte 0x1
+ .uleb128 0x25
+ .uleb128 0xe
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x1b
+ .uleb128 0xe
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x10
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0xe
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0x8
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x4
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x5
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .long 0x17
+ .value 0x2
+ .long .Ldebug_info0
+ .long 0x98
+ .long 0x75
+ .string "func"
+ .long 0x0
+ .section .debug_aranges,"",@progbits
+ .long 0x1c
+ .value 0x2
+ .long .Ldebug_info0
+ .byte 0x4
+ .byte 0x0
+ .value 0x0
+ .value 0x0
+ .long .Ltext0
+ .long .Letext0-.Ltext0
+ .long 0x0
+ .long 0x0
+ .section .debug_str,"MS",@progbits,1
+.LASF7:
+ .string "long long int"
+.LASF0:
+ .string "unsigned int"
+.LASF11:
+ .string "dw2-loclist-prelinked.c"
+.LASF12:
+ .string "gdb-6.8/gdb/testsuite/gdb.dwarf2"
+.LASF4:
+ .string "long unsigned int"
+.LASF8:
+ .string "long long unsigned int"
+.LASF2:
+ .string "unsigned char"
+.LASF9:
+ .string "char"
+.LASF1:
+ .string "long int"
+.LASF3:
+ .string "short unsigned int"
+.LASF5:
+ .string "signed char"
+.LASF10:
+ .string "GNU C 4.3.2 20081007 (Red Hat 4.3.2-6)"
+.LASF13:
+ .string "func"
+.LASF6:
+ .string "short int"
+ .ident "GCC: (GNU) 4.3.2 20081007 (Red Hat 4.3.2-6)"
+ .section .note.GNU-stack,"",@progbits
++++++ gdb-6.8-constant-watchpoints.patch ++++++
2008-07-10 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* breakpoint.c (fetch_watchpoint_value): New comment on unreachable
values.
(watch_command_1): New variable VAL_CHAIN. Refuse constant watchpoints.
* gdbtypes.h (TYPE_CODE_FUNC): New comment regarding pointers to it.
2008-07-10 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.texinfo (Set Watchpoints): Document constant value watchpoints.
2008-07-10 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.base/watchpoint.exp: Call TEST_CONSTANT_WATCHPOINT.
(test_constant_watchpoint): New function.
(test_inaccessible_watchpoint): Cleanup (delete) the watchpoint.
Test also a double-indirection watchpoint.
gdb.base/watchpoint.c (global_ptr_ptr): New variable.
(func4): New testing code for GLOBAL_PTR_PTR.
Index: gdb-6.8.50.20090209/gdb/breakpoint.c
===================================================================
--- gdb-6.8.50.20090209.orig/gdb/breakpoint.c 2009-02-09 15:39:01.000000000 +0100
+++ gdb-6.8.50.20090209/gdb/breakpoint.c 2009-02-09 16:04:10.000000000 +0100
@@ -769,7 +769,15 @@ is_hardware_watchpoint (struct breakpoin
If VAL_CHAIN is non-NULL, *VAL_CHAIN will be released from the
value chain. The caller must free the values individually. If
VAL_CHAIN is NULL, all generated values will be left on the value
- chain. */
+ chain.
+
+ Inferior unreachable values return:
+ Inferior `int *intp = NULL;' with `watch *intp':
+ *VALP is NULL, *RESULTP contains lazy LVAL_MEMORY address 0, *VAL_CHAIN
+ contains the *RESULTP element and also INTP as LVAL_MEMORY.
+ Inferior `int **intpp = NULL;' with `watch **intpp':
+ *VALP is NULL, *RESULTP is NULL, *VAL_CHAIN contains lazy LVAL_MEMORY
+ address 0 and also INTPP as LVAL_MEMORY. */
static void
fetch_watchpoint_value (struct expression *exp, struct value **valp,
@@ -5862,7 +5870,7 @@ watch_command_1 (char *arg, int accessfl
struct symtab_and_line sal;
struct expression *exp;
struct block *exp_valid_block;
- struct value *val, *mark;
+ struct value *val, *mark, *val_chain;
struct frame_info *frame;
struct frame_info *prev_frame = NULL;
char *exp_start = NULL;
@@ -5954,6 +5962,27 @@ watch_command_1 (char *arg, int accessfl
exp_valid_block = innermost_block;
mark = value_mark ();
fetch_watchpoint_value (exp, &val, NULL, NULL);
+
+ /* VALUE_MARK gets us the same value as FETCH_WATCHPOINT_VALUE's VAL_CHAIN
+ parameter. Just this way we do not have to VALUE_FREE the chained VALUEs
+ ourselves. */
+ for (val_chain = value_mark ();
+ val_chain != mark;
+ val_chain = value_next (val_chain))
+ if ((VALUE_LVAL (val_chain) == lval_memory
+ && TYPE_CODE (value_type (val_chain)) != TYPE_CODE_FUNC)
+ || VALUE_LVAL (val_chain) == lval_register)
+ break;
+ if (val_chain == mark)
+ {
+ int len;
+
+ len = exp_end - exp_start;
+ while (len > 0 && isspace (exp_start[len - 1]))
+ len--;
+ error (_("Cannot watch constant value %.*s."), len, exp_start);
+ }
+ /* Break the values chain only after its check above. */
if (val != NULL)
release_value (val);
Index: gdb-6.8.50.20090209/gdb/gdbtypes.h
===================================================================
--- gdb-6.8.50.20090209.orig/gdb/gdbtypes.h 2009-02-09 15:51:57.000000000 +0100
+++ gdb-6.8.50.20090209/gdb/gdbtypes.h 2009-02-09 16:04:10.000000000 +0100
@@ -70,7 +70,22 @@ enum type_code
TYPE_CODE_UNION, /* C union or Pascal variant part */
TYPE_CODE_ENUM, /* Enumeration type */
TYPE_CODE_FLAGS, /* Bit flags type */
- TYPE_CODE_FUNC, /* Function type */
+
+ /* Function type. It is not a pointer to a function. Function reference
+ by its name (such as `printf') has this type. C automatically converts
+ this function type to a pointer to function for any operation except
+ `sizeof (function_type)' or `&function_type' (unary &).
+ `sizeof (function_type)' is undefined in C. But GCC provides extension
+ (info '(gcc)Pointer Arith') defining its size as 1 byte. DWARF does not
+ define its size but GDB defines the size the GCC compatible way - GDB
+ function MAKE_FUNCTION_TYPE. The address itself is not modifiable.
+ As the function type has size 1 but its real value has `sizeof
+ (CORE_ADDR)' we cannot use NOT_LVAL category because the address would
+ not fit in the VALUE_CONTENTS_RAW container of its VALUE. We use
+ LVAL_MEMORY (and its VALUE_ADDRESS field) for it but we must be careful
+ it is not lvalue, it is the only non-modifiable LVAL_MEMORY. */
+ TYPE_CODE_FUNC,
+
TYPE_CODE_INT, /* Integer type */
/* Floating type. This is *NOT* a complex type. Beware, there are parts
Index: gdb-6.8.50.20090209/gdb/doc/gdb.texinfo
===================================================================
--- gdb-6.8.50.20090209.orig/gdb/doc/gdb.texinfo 2009-02-09 16:02:42.000000000 +0100
+++ gdb-6.8.50.20090209/gdb/doc/gdb.texinfo 2009-02-09 16:04:10.000000000 +0100
@@ -3480,6 +3480,18 @@ This command prints a list of watchpoint
it is the same as @code{info break} (@pxref{Set Breaks}).
@end table
+If you watch for a change in a numerically entered address you need to
+dereference it as the address itself is just a constant number which will never
+change. @value{GDBN} refuses to create a watchpoint that watches
+a never-changing value:
+
+@smallexample
+(@value{GDBP}) watch 0x600850
+Cannot watch constant value 0x600850.
+(@value{GDBP}) watch *(int *) 0x600850
+Watchpoint 1: *(int *) 6293584
+@end smallexample
+
@value{GDBN} sets a @dfn{hardware watchpoint} if possible. Hardware
watchpoints execute very quickly, and the debugger reports a change in
value at the exact instruction where the change occurs. If @value{GDBN}
Index: gdb-6.8.50.20090209/gdb/testsuite/gdb.base/watchpoint.c
===================================================================
--- gdb-6.8.50.20090209.orig/gdb/testsuite/gdb.base/watchpoint.c 2008-03-03 14:24:12.000000000 +0100
+++ gdb-6.8.50.20090209/gdb/testsuite/gdb.base/watchpoint.c 2009-02-09 16:04:10.000000000 +0100
@@ -40,6 +40,7 @@ struct foo struct1, struct2, *ptr1, *ptr
int doread = 0;
char *global_ptr;
+char **global_ptr_ptr;
void marker1 ()
{
@@ -118,6 +119,10 @@ func4 ()
buf[0] = 3;
global_ptr = buf;
buf[0] = 7;
+ buf[1] = 5;
+ global_ptr_ptr = &global_ptr;
+ buf[0] = 9;
+ global_ptr++;
}
int main ()
Index: gdb-6.8.50.20090209/gdb/testsuite/gdb.base/watchpoint.exp
===================================================================
--- gdb-6.8.50.20090209.orig/gdb/testsuite/gdb.base/watchpoint.exp 2009-01-03 06:58:03.000000000 +0100
+++ gdb-6.8.50.20090209/gdb/testsuite/gdb.base/watchpoint.exp 2009-02-09 16:05:03.000000000 +0100
@@ -641,7 +641,21 @@ proc test_watchpoint_and_breakpoint {} {
}
}
}
-
+
+proc test_constant_watchpoint {} {
+ global gdb_prompt
+
+ gdb_test "watch 5" "Cannot watch constant value 5." "number is constant"
+ gdb_test "watch marker1" "Cannot watch constant value marker1." \
+ "marker1 is constant"
+ gdb_test "watch count + 6" ".*atchpoint \[0-9\]+: count \\+ 6"
+ gdb_test "set \$expr_breakpoint_number = \$bpnum" ""
+ gdb_test "delete \$expr_breakpoint_number" ""
+ gdb_test "watch 7 + count" ".*atchpoint \[0-9\]+: 7 \\+ count"
+ gdb_test "set \$expr_breakpoint_number = \$bpnum" ""
+ gdb_test "delete \$expr_breakpoint_number" ""
+}
+
proc test_inaccessible_watchpoint {} {
global gdb_prompt
@@ -662,7 +676,8 @@ proc test_inaccessible_watchpoint {} {
}
gdb_test "watch *global_ptr" ".*atchpoint \[0-9\]+: \\*global_ptr"
- gdb_test "next" ".*global_ptr = buf.*"
+ gdb_test "set \$global_ptr_breakpoint_number = \$bpnum" ""
+ gdb_test "next" ".*global_ptr = buf.*" "global_ptr next"
gdb_test_multiple "next" "next over ptr init" {
-re ".*atchpoint \[0-9\]+: \\*global_ptr\r\n\r\nOld value = .*\r\nNew value = 3 .*\r\n.*$gdb_prompt $" {
# We can not test for <unknown> here because NULL may be readable.
@@ -675,6 +690,28 @@ proc test_inaccessible_watchpoint {} {
pass "next over buffer set"
}
}
+ gdb_test "delete \$global_ptr_breakpoint_number" ""
+ gdb_test "watch **global_ptr_ptr" ".*atchpoint \[0-9\]+: \\*\\*global_ptr_ptr"
+ gdb_test "set \$global_ptr_ptr_breakpoint_number = \$bpnum" ""
+ gdb_test "next" ".*global_ptr_ptr = &global_ptr.*" "gloabl_ptr_ptr next"
+ gdb_test_multiple "next" "next over global_ptr_ptr init" {
+ -re ".*atchpoint \[0-9\]+: \\*\\*global_ptr_ptr\r\n\r\nOld value = .*\r\nNew value = 7 .*\r\n.*$gdb_prompt $" {
+ # We can not test for <unknown> here because NULL may be readable.
+ # This test does rely on *NULL != 7.
+ pass "next over global_ptr_ptr init"
+ }
+ }
+ gdb_test_multiple "next" "next over global_ptr_ptr buffer set" {
+ -re ".*atchpoint \[0-9\]+: \\*\\*global_ptr_ptr\r\n\r\nOld value = 7 .*\r\nNew value = 9 .*\r\n.*$gdb_prompt $" {
+ pass "next over global_ptr_ptr buffer set"
+ }
+ }
+ gdb_test_multiple "next" "next over global_ptr_ptr pointer advance" {
+ -re ".*atchpoint \[0-9\]+: \\*\\*global_ptr_ptr\r\n\r\nOld value = 9 .*\r\nNew value = 5 .*\r\n.*$gdb_prompt $" {
+ pass "next over global_ptr_ptr pointer advance"
+ }
+ }
+ gdb_test "delete \$global_ptr_ptr_breakpoint_number" ""
}
}
@@ -842,6 +879,17 @@ if [initialize] then {
}
test_watchpoint_and_breakpoint
+
+ # See above.
+ if [istarget "mips-idt-*"] then {
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load $binfile
+ initialize
+ }
+
+ test_constant_watchpoint
}
# Restore old timeout
++++++ gdb-6.8-ctors-dtors-unique.patch ++++++
--- ./gdb/linespec.c 2008-08-27 00:27:33.000000000 +0200
+++ ./gdb/linespec.c 2008-08-27 00:53:16.000000000 +0200
@@ -284,6 +284,15 @@ find_methods (struct type *t, char *name
}
static int
+add_minsym_members_compar (const void *ap, const void *bp)
+{
+ const char *a = *(const char **) ap;
+ const char *b = *(const char **) bp;
+
+ return strcmp (a, b);
+}
+
+static int
add_minsym_members (const char *class_name,
const char *member_name,
struct minimal_symbol **msym_arr)
@@ -293,6 +302,7 @@ add_minsym_members (const char *class_na
int i;
int comp_len;
int counter = 0;
+ int src_i, dst_i;
/* To find the member, we first cheat and use symbol completion.
This will give us a list of all the member names including
@@ -307,6 +317,28 @@ add_minsym_members (const char *class_na
strcat (completion_name, "(");
list = make_symbol_completion_list (completion_name,
completion_name+1);
+ if (list == NULL || list[0] == NULL)
+ {
+ xfree (completion_name);
+ return 0;
+ }
+
+ /* Make the list entries unique - Multi-PC breakpoints are already resolved
+ by GDB-6.8+. */
+ counter = 0;
+ while (list && list[counter] != NULL)
+ counter++;
+ qsort (list, counter, sizeof (*list), add_minsym_members_compar);
+ src_i = dst_i = 0;
+ while (src_i + 1 < counter)
+ {
+ if (strcmp (list[src_i], list[src_i + 1]) != 0)
+ list[dst_i++] = list[src_i];
+ src_i++;
+ }
+ list[dst_i++] = list[src_i++];
+ gdb_assert (list[src_i] == NULL);
+ list[dst_i] = 0;
/* Now that we have the list, we generate an array of their
corresponding minimal symbols. */
@@ -319,6 +351,8 @@ add_minsym_members (const char *class_na
xfree (list);
+#if 0 /* Multi-PC breakpoints are already resolved by GDB-6.8+. */
+
/* In the case of constructors, there may be in-charge vs not-in-charge
constructors. Check for names with $base which indicates not-in-charge
constructors. */
@@ -353,6 +387,8 @@ add_minsym_members (const char *class_na
}
xfree (list);
+#endif /* Multi-PC breakpoints are already resolved by GDB-6.8+. */
+
xfree (completion_name);
return counter;
++++++ gdb-6.8-fortran-tag-constant.patch ++++++
Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/dwarf2read.c 2009-03-02 01:07:36.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/dwarf2read.c 2009-03-02 01:07:50.000000000 +0100
@@ -1996,6 +1996,7 @@ scan_partial_symbols (struct partial_die
add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu);
break;
case DW_TAG_variable:
+ case DW_TAG_constant:
case DW_TAG_typedef:
case DW_TAG_union_type:
if (!pdi->is_declaration)
@@ -2211,6 +2212,7 @@ add_partial_symbol (struct partial_die_i
}
break;
case DW_TAG_variable:
+ case DW_TAG_constant:
if (pdi->is_external)
{
/* Global Variable.
@@ -4213,7 +4215,8 @@ dwarf2_add_field (struct field_info *fip
fip->non_public_fields = 1;
}
}
- else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable)
+ else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable
+ || die->tag == DW_TAG_constant)
{
/* C++ static member. */
@@ -4703,7 +4706,8 @@ read_structure_type (struct die_info *di
while (child_die && child_die->tag)
{
if (child_die->tag == DW_TAG_member
- || child_die->tag == DW_TAG_variable)
+ || child_die->tag == DW_TAG_variable
+ || child_die->tag == DW_TAG_constant)
{
/* NOTE: carlton/2002-11-05: A C++ static data member
should be a DW_TAG_member that is a declaration, but
@@ -4822,6 +4826,7 @@ process_structure_scope (struct die_info
{
if (child_die->tag == DW_TAG_member
|| child_die->tag == DW_TAG_variable
+ || child_die->tag == DW_TAG_constant
|| child_die->tag == DW_TAG_inheritance)
{
/* Do nothing. */
@@ -6455,6 +6460,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
&& abbrev->tag != DW_TAG_subprogram
&& abbrev->tag != DW_TAG_lexical_block
&& abbrev->tag != DW_TAG_variable
+ && abbrev->tag != DW_TAG_constant
&& abbrev->tag != DW_TAG_namespace
&& abbrev->tag != DW_TAG_member)
{
@@ -6562,6 +6568,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
if (load_all
|| abbrev->tag == DW_TAG_subprogram
|| abbrev->tag == DW_TAG_variable
+ || abbrev->tag == DW_TAG_constant
|| abbrev->tag == DW_TAG_namespace
|| part_die->is_declaration)
{
@@ -8341,6 +8348,11 @@ new_symbol (struct die_info *die, struct
/* Do not add the symbol to any lists. It will be found via
BLOCK_FUNCTION from the blockvector. */
break;
+ case DW_TAG_constant:
+ SYMBOL_TYPE (sym) = make_cv_type (1,
+ TYPE_VOLATILE (SYMBOL_TYPE (sym)),
+ SYMBOL_TYPE (sym), NULL);
+ /* PASSTHRU */
case DW_TAG_variable:
/* Compilation with minimal debug info may result in variables
with missing type entries. Change the misleading `void' type
++++++ gdb-6.8-gcc35998-ada-memory-trash.patch ++++++
--- ./gdb/dwarf2read.c 4 May 2008 17:27:01 -0000 1.260
+++ ./gdb/dwarf2read.c 4 May 2008 18:26:20 -0000
@@ -6754,7 +6754,14 @@ dwarf2_attr (struct die_info *die, unsig
for (i = 0; i < die->num_attrs; ++i)
{
if (die->attrs[i].name == name)
- return &die->attrs[i];
+ {
+ /* GCC PR ada/35998 workaround. */
+ if (name == DW_AT_byte_size
+ && DW_UNSND (&die->attrs[i]) == 0xffffffff)
+ return NULL;
+
+ return &die->attrs[i];
+ }
if (die->attrs[i].name == DW_AT_specification
|| die->attrs[i].name == DW_AT_abstract_origin)
spec = &die->attrs[i];
++++++ gdb-6.8-glibc-headers-compat.patch ++++++
../../libiberty/strsignal.c:552: error: conflicting types for 'psignal'
/usr/include/signal.h:141: error: previous declaration of 'psignal' was here
--- gdb-6.8/libiberty/strsignal.c-orig 2007-01-31 00:13:04.000000000 +0100
+++ gdb-6.8/libiberty/strsignal.c 2008-06-17 16:30:13.000000000 +0200
@@ -549,7 +549,7 @@ followed by a newline.
#ifndef HAVE_PSIGNAL
void
-psignal (int signo, char *message)
+psignal (int signo, const char *message)
{
if (signal_names == NULL)
{
++++++ gdb-6.8-inlining-addon.patch ++++++
--- /var/tmp/diff_new_pack.jN9710/_old 2009-05-04 18:52:41.000000000 +0200
+++ /var/tmp/diff_new_pack.jN9710/_new 2009-05-04 18:52:41.000000000 +0200
@@ -5,10 +5,10 @@
resume() -> target_resume() move of clear_inline_frame_state() is for:
gdb.mi/mi-nsmoribund.exp
-Index: gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-bt.c
+Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.c
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/testsuite/gdb.opt/inline-bt.c 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-bt.c 2009-02-09 13:28:49.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.opt/inline-bt.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.c 2009-03-25 22:34:02.000000000 +0100
@@ -13,10 +13,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -28,10 +28,10 @@
inline int func1(void)
{
-Index: gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-bt.exp
+Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.exp
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/testsuite/gdb.opt/inline-bt.exp 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-bt.exp 2009-02-09 13:28:49.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.opt/inline-bt.exp 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-bt.exp 2009-03-25 22:34:02.000000000 +0100
@@ -41,18 +41,19 @@ if { [skip_inline_frame_tests] } {
return
}
@@ -60,10 +60,10 @@
gdb_test "continue" ".*set breakpoint 1 here.*" "continue to bar (3)"
gdb_test "backtrace" "#0 bar.*#1 .*func1.*#2 .*func2.*#3 .*main.*" \
-Index: gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-cmds.c
+Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.c
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/testsuite/gdb.opt/inline-cmds.c 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-cmds.c 2009-02-09 13:28:49.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.opt/inline-cmds.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.c 2009-03-25 22:34:02.000000000 +0100
@@ -13,13 +13,19 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -86,10 +86,10 @@
inline int func1(void)
{
bar ();
-Index: gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-cmds.exp
+Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.exp
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-02-09 13:30:16.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-03-25 22:34:02.000000000 +0100
@@ -45,28 +45,28 @@ if { [skip_inline_frame_tests] } {
# First, check that the things we expected to be inlined really were,
@@ -180,10 +180,10 @@
+gdb_test "info frame" "inlined into frame.*" "outer_inline2 inlined"
+gdb_test "fini" "" "up from outer_inline2"
+gdb_test "info frame" " in main \[^\n\]*\n source language.*" "main not inlined"
-Index: gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-locals.c
+Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.c
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/testsuite/gdb.opt/inline-locals.c 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-locals.c 2009-02-09 13:28:49.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.opt/inline-locals.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.c 2009-03-25 22:34:02.000000000 +0100
@@ -13,11 +13,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -203,10 +203,10 @@
inline int func1(int arg1)
{
-Index: gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-locals.exp
+Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.exp
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/testsuite/gdb.opt/inline-locals.exp 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-locals.exp 2009-02-09 13:28:49.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.opt/inline-locals.exp 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-locals.exp 2009-03-25 22:34:02.000000000 +0100
@@ -43,8 +43,8 @@ if { [skip_inline_var_tests] } {
set no_frames [skip_inline_frame_tests]
@@ -236,10 +236,10 @@
+ setup_kfail *-*-* "gcc/debug.optimization"
+}
gdb_test "print array\[0\]" "\\\$$decimal = 184" "print local (3)"
-Index: gdb-6.8.50.20081214/gdb/frame.c
+Index: gdb-6.8.50.20090302/gdb/frame.c
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/frame.c 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/frame.c 2009-02-09 13:30:16.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/frame.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/frame.c 2009-03-25 22:34:02.000000000 +0100
@@ -269,7 +269,7 @@ fprint_frame (struct ui_file *file, stru
static struct frame_info *
skip_inlined_frames (struct frame_info *frame)
@@ -249,7 +249,7 @@
frame = get_prev_frame (frame);
return frame;
-@@ -1697,6 +1697,7 @@ get_frame_address_in_block (struct frame
+@@ -1670,6 +1670,7 @@ get_frame_address_in_block (struct frame
{
/* A draft address. */
CORE_ADDR pc = get_frame_pc (this_frame);
@@ -257,7 +257,7 @@
struct frame_info *next_frame = this_frame->next;
-@@ -1739,6 +1740,9 @@ get_frame_address_in_block (struct frame
+@@ -1712,6 +1713,9 @@ get_frame_address_in_block (struct frame
while in an inlined function, then the code address of the
"calling" normal function should not be adjusted either. */
@@ -267,7 +267,7 @@
while (get_frame_type (next_frame) == INLINE_FRAME)
next_frame = next_frame->next;
-@@ -1770,7 +1774,7 @@ find_frame_sal (struct frame_info *frame
+@@ -1743,7 +1747,7 @@ find_frame_sal (struct frame_info *frame
sym = inline_skipped_symbol (inferior_ptid);
init_sal (sal);
@@ -276,10 +276,10 @@
{
sal->symtab = SYMBOL_SYMTAB (sym);
sal->line = SYMBOL_LINE (sym);
-Index: gdb-6.8.50.20081214/gdb/breakpoint.c
+Index: gdb-6.8.50.20090302/gdb/breakpoint.c
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/breakpoint.c 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/breakpoint.c 2009-02-09 13:30:16.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/breakpoint.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/breakpoint.c 2009-03-25 22:34:02.000000000 +0100
@@ -57,6 +57,7 @@
#include "top.h"
#include "wrapper.h"
@@ -288,7 +288,7 @@
#include "mi/mi-common.h"
-@@ -2833,10 +2834,24 @@ bpstat_check_breakpoint_conditions (bpst
+@@ -2902,10 +2903,24 @@ bpstat_check_breakpoint_conditions (bpst
const struct bp_location *bl = bs->breakpoint_at;
struct breakpoint *b = bl->owner;
@@ -317,7 +317,7 @@
{
int value_is_zero = 0;
-@@ -2975,6 +2990,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+@@ -3044,6 +3059,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
bs->print = 0;
}
bs->commands = copy_command_lines (bs->commands);
@@ -330,7 +330,7 @@
}
/* Print nothing for this entry if we dont stop or if we dont print. */
-@@ -4826,9 +4847,9 @@ set_momentary_breakpoint (struct symtab_
+@@ -5169,9 +5190,9 @@ set_momentary_breakpoint (struct symtab_
{
struct breakpoint *b;
@@ -343,10 +343,10 @@
b = set_raw_breakpoint (sal, type);
b->enable_state = bp_enabled;
-Index: gdb-6.8.50.20081214/gdb/inline-frame.c
+Index: gdb-6.8.50.20090302/gdb/inline-frame.c
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/inline-frame.c 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/inline-frame.c 2009-02-09 13:30:16.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/inline-frame.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/inline-frame.c 2009-03-25 22:34:02.000000000 +0100
@@ -183,6 +183,12 @@ inline_frame_sniffer (const struct frame
if (frame_block == NULL)
return 0;
@@ -423,10 +423,10 @@
/* Return the number of hidden functions inlined into the current
frame. */
-Index: gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-markers.c
+Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-markers.c
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/testsuite/gdb.opt/inline-markers.c 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/testsuite/gdb.opt/inline-markers.c 2009-02-09 13:28:49.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/testsuite/gdb.opt/inline-markers.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/testsuite/gdb.opt/inline-markers.c 2009-03-25 22:34:02.000000000 +0100
@@ -15,11 +15,6 @@
extern int x, y;
@@ -439,10 +439,10 @@
void marker(void)
{
x += y; /* set breakpoint 2 here */
-Index: gdb-6.8.50.20081214/gdb/gdbthread.h
+Index: gdb-6.8.50.20090302/gdb/gdbthread.h
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/gdbthread.h 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/gdbthread.h 2009-02-09 13:30:16.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/gdbthread.h 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/gdbthread.h 2009-03-25 22:34:02.000000000 +0100
@@ -180,6 +180,12 @@ struct thread_info
/* Private data used by the target vector implementation. */
@@ -456,11 +456,11 @@
};
/* Create an empty thread list, or empty the existing one. */
-Index: gdb-6.8.50.20081214/gdb/infcmd.c
+Index: gdb-6.8.50.20090302/gdb/infcmd.c
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/infcmd.c 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/infcmd.c 2009-02-09 13:30:16.000000000 +0100
-@@ -1373,11 +1373,11 @@ finish_command_continuation (void *arg)
+--- gdb-6.8.50.20090302.orig/gdb/infcmd.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/infcmd.c 2009-03-25 22:34:02.000000000 +0100
+@@ -1391,11 +1391,11 @@ finish_command_continuation (void *arg)
struct type *value_type;
value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (a->function));
@@ -474,7 +474,7 @@
print_return_value (SYMBOL_TYPE (a->function), value_type);
}
-@@ -1481,6 +1481,16 @@ finish_forward (struct symbol *function,
+@@ -1499,6 +1499,16 @@ finish_forward (struct symbol *function,
old_chain = make_cleanup_delete_breakpoint (breakpoint);
@@ -491,7 +491,7 @@
tp->proceed_to_finish = 1; /* We want stop_registers, please... */
make_cleanup_restore_integer (&suppress_stop_observer);
suppress_stop_observer = 1;
-@@ -1504,7 +1514,9 @@ finish_forward (struct symbol *function,
+@@ -1522,7 +1532,9 @@ finish_forward (struct symbol *function,
static void
finish_command (char *arg, int from_tty)
{
@@ -502,7 +502,7 @@
struct symbol *function;
int async_exec = 0;
-@@ -1535,46 +1547,63 @@ finish_command (char *arg, int from_tty)
+@@ -1553,46 +1565,63 @@ finish_command (char *arg, int from_tty)
if (!target_has_execution)
error (_("The program is not running."));
@@ -584,7 +584,7 @@
/* Print info on the selected frame, including level number but not
source. */
-@@ -1588,10 +1617,14 @@ finish_command (char *arg, int from_tty)
+@@ -1606,10 +1635,14 @@ finish_command (char *arg, int from_tty)
print_stack_frame (get_selected_frame (NULL), 1, LOCATION);
}
@@ -600,11 +600,11 @@
}
-Index: gdb-6.8.50.20081214/gdb/infrun.c
+Index: gdb-6.8.50.20090302/gdb/infrun.c
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/infrun.c 2009-02-09 13:29:51.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/infrun.c 2009-02-09 13:30:16.000000000 +0100
-@@ -1147,8 +1150,6 @@ a command like `return' or `jump' to con
+--- gdb-6.8.50.20090302.orig/gdb/infrun.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/infrun.c 2009-03-25 22:34:02.000000000 +0100
+@@ -1152,8 +1152,6 @@ a command like `return' or `jump' to con
step = 0;
}
@@ -613,7 +613,7 @@
if (debug_displaced
&& use_displaced_stepping (gdbarch)
&& tp->trap_expected)
-@@ -1201,6 +1201,8 @@ clear_proceed_status_thread (struct thre
+@@ -1205,6 +1203,8 @@ clear_proceed_status_thread (struct thre
/* Discard any remaining commands or status from previous stop. */
bpstat_clear (&tp->stop_bpstat);
@@ -622,8 +622,10 @@
}
static int
---- ./gdb/target.c 2009-02-10 23:45:59.000000000 +0100
-+++ ./gdb/target.c 2009-02-10 23:43:29.000000000 +0100
+Index: gdb-6.8.50.20090302/gdb/target.c
+===================================================================
+--- gdb-6.8.50.20090302.orig/gdb/target.c 2009-03-25 22:26:51.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/target.c 2009-03-25 22:34:02.000000000 +0100
@@ -41,6 +41,7 @@
#include "target-descriptions.h"
#include "gdbthread.h"
@@ -632,18 +634,18 @@
static void target_info (char *, int);
-@@ -1938,6 +1939,7 @@ target_pid_to_str (ptid_t ptid)
- void
- target_resume (ptid_t ptid, int step, enum target_signal signal)
+@@ -1925,6 +1926,7 @@ target_resume (ptid_t ptid, int step, en
{
+ struct target_ops *t;
+
+ clear_inline_frame_state (ptid);
dcache_invalidate (target_dcache);
- (*current_target.to_resume) (ptid, step, signal);
- set_executing (ptid, 1);
-Index: gdb-6.8.50.20081214/gdb/inline-frame.h
+
+ for (t = current_target.beneath; t != NULL; t = t->beneath)
+Index: gdb-6.8.50.20090302/gdb/inline-frame.h
===================================================================
---- gdb-6.8.50.20081214.orig/gdb/inline-frame.h 2009-02-09 13:28:48.000000000 +0100
-+++ gdb-6.8.50.20081214/gdb/inline-frame.h 2009-02-09 13:30:16.000000000 +0100
+--- gdb-6.8.50.20090302.orig/gdb/inline-frame.h 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/inline-frame.h 2009-03-25 22:34:02.000000000 +0100
@@ -43,6 +43,10 @@ void clear_inline_frame_state (ptid_t pt
void step_into_inline_frame (ptid_t ptid);
@@ -655,9 +657,11 @@
/* Return the number of hidden functions inlined into the current
frame. */
---- gdb-6.8.50.20090209/gdb/infcall.c 2009-02-10 00:16:10.000000000 +0100
-+++ gdb-6.8.50.20090209/gdb/infcall.c-removed 2009-02-10 00:15:58.000000000 +0100
-@@ -841,8 +841,15 @@ When the function is done executing, GDB
+Index: gdb-6.8.50.20090302/gdb/infcall.c
+===================================================================
+--- gdb-6.8.50.20090302.orig/gdb/infcall.c 2009-03-25 22:33:02.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/infcall.c 2009-03-25 22:34:02.000000000 +0100
+@@ -898,8 +898,15 @@ The program being debugged exited while
if (unwind_on_signal_p)
{
@@ -675,3 +679,35 @@
/* FIXME: Insert a bunch of wrap_here; name can be very
long if it's a C++ name with arguments and stuff. */
+Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
+===================================================================
+--- gdb-6.8.50.20090302.orig/gdb/dwarf2read.c 2009-03-25 22:33:44.000000000 +0100
++++ gdb-6.8.50.20090302/gdb/dwarf2read.c 2009-03-25 22:34:11.000000000 +0100
+@@ -3471,6 +3471,7 @@ read_func_scope (struct die_info *die, s
+ unsigned die_children;
+ struct attribute *call_line, *call_file;
+ int inlined_func = (die->tag == DW_TAG_inlined_subroutine);
++ struct type *type;
+
+ if (inlined_func)
+ {
+@@ -3513,7 +3514,10 @@ read_func_scope (struct die_info *die, s
+ add_to_cu_func_list (name, lowpc, highpc, cu);
+
+ new = push_context (0, lowpc);
+- new->name = new_symbol (die, read_type_die (die, cu), cu);
++ type = read_type_die (die, cu);
++ gdb_assert (type != NULL);
++ new->name = new_symbol (die, type, cu);
++ gdb_assert (TYPE_CODE (SYMBOL_TYPE (new->name)) == TYPE_CODE_FUNC);
+
+ /* If there is a location expression for DW_AT_frame_base, record
+ it. */
+@@ -8751,6 +8755,7 @@ read_type_die (struct die_info *die, str
+ break;
+ case DW_TAG_subprogram:
+ case DW_TAG_subroutine_type:
++ case DW_TAG_inlined_subroutine:
+ this_type = read_subroutine_type (die, cu);
+ break;
+ case DW_TAG_array_type:
++++++ gdb-6.8-inlining.patch ++++++
++++ 1286 lines (skipped)
++++ between gdb/gdb-6.8-inlining.patch
++++ and /mounts/work_src_done/STABLE/gdb/gdb-6.8-inlining.patch
++++++ gdb-6.8-quit-never-aborts.patch ++++++
We may abort the process of detaching threads with multiple SIGINTs - which are
being sent during a testcase terminating its child GDB.
Some of the threads may not be properly PTRACE_DETACHed which hurts if they
should have been detached with SIGSTOP (as they are accidentally left running
on the debugger termination).
Index: gdb-6.8.50.20081128/gdb/defs.h
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/defs.h 2008-11-27 10:23:01.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/defs.h 2008-12-06 21:49:32.000000000 +0100
@@ -155,6 +155,7 @@ extern char *gdb_sysroot;
extern char *debug_file_directory;
extern int quit_flag;
+extern int quit_flag_cleanup;
extern int immediate_quit;
extern int sevenbit_strings;
@@ -168,7 +169,7 @@ extern void quit (void);
needed. */
#define QUIT { \
- if (quit_flag) quit (); \
+ if (quit_flag && !quit_flag_cleanup) quit (); \
if (deprecated_interactive_hook) deprecated_interactive_hook (); \
}
Index: gdb-6.8.50.20081128/gdb/event-top.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/event-top.c 2008-12-04 10:34:31.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/event-top.c 2008-12-06 21:49:07.000000000 +0100
@@ -939,7 +939,7 @@ async_request_quit (gdb_client_data arg)
is no reason to call quit again here, unless immediate_quit is
set.*/
- if (quit_flag || immediate_quit)
+ if ((quit_flag || immediate_quit) && !quit_flag_cleanup)
quit ();
}
Index: gdb-6.8.50.20081128/gdb/top.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/top.c 2008-12-04 10:23:12.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/top.c 2008-12-06 21:49:07.000000000 +0100
@@ -1299,7 +1299,9 @@ quit_force (char *args, int from_tty)
qt.args = args;
qt.from_tty = from_tty;
- /* We want to handle any quit errors and exit regardless. */
+ /* We want to handle any quit errors and exit regardless but we should never
+ get user-interrupted to properly detach the inferior. */
+ quit_flag_cleanup = 1;
catch_errors (quit_target, &qt,
"Quitting: ", RETURN_MASK_ALL);
Index: gdb-6.8.50.20081128/gdb/utils.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/utils.c 2008-12-04 10:31:00.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/utils.c 2008-12-06 21:49:07.000000000 +0100
@@ -114,6 +114,11 @@ int job_control;
int quit_flag;
+/* Nonzero means we are already processing the quitting cleanups and we should
+ no longer get aborted. */
+
+int quit_flag_cleanup;
+
/* Nonzero means quit immediately if Control-C is typed now, rather
than waiting until QUIT is executed. Be careful in setting this;
code which executes with immediate_quit set has to be very careful
++++++ gdb-6.8-sparc64-silence-memcpy-check.patch ++++++
diff -up gdb-6.8/gdb/sparc-tdep.c.BAD gdb-6.8/gdb/sparc-tdep.c
--- gdb-6.8/gdb/sparc-tdep.c.BAD 2008-05-15 16:12:58.000000000 -0500
+++ gdb-6.8/gdb/sparc-tdep.c 2008-05-15 16:13:41.000000000 -0500
@@ -1122,6 +1122,7 @@ sparc32_store_return_value (struct type
if (sparc_floating_p (type))
{
/* Floating return values. */
+ len = (len <= 8) ? len : 8;
memcpy (buf, valbuf, len);
regcache_cooked_write (regcache, SPARC_F0_REGNUM, buf);
if (len > 4)
++++++ gdb-6.8-tui-singlebinary.patch ++++++
Provide `gdb --tui' functionality for the hardlink `gdbtui'.
--- ./gdb/gdb.c 1 Jan 2008 22:53:09 -0000 1.6
+++ ./gdb/gdb.c 20 Jun 2008 08:02:57 -0000
@@ -30,5 +30,19 @@ main (int argc, char **argv)
args.argv = argv;
args.use_windows = 0;
args.interpreter_p = INTERP_CONSOLE;
+
+ if (argv[0])
+ {
+ char *s;
+
+ s = strrchr (argv[0], '/');
+ if (s)
+ s++;
+ else
+ s = argv[0];
+ if (strcmp (s, "gdbtui") == 0)
+ args.interpreter_p = INTERP_TUI;
+ }
+
return gdb_main (&args);
}
++++++ gdb-6.8-watchpoint-conditionals-test.patch ++++++
For:
http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html
--- /dev/null 2008-11-04 06:31:10.599601840 +0100
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.exp 2008-11-04 06:43:29.000000000 +0100
@@ -0,0 +1,37 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set testfile watchpoint-cond
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if { [runto_main] < 0 } {
+ untested watchpoint-cond
+ return -1
+}
+
+gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i"
+gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*"
--- /dev/null 2008-11-04 06:31:10.599601840 +0100
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.c 2008-11-04 06:42:48.000000000 +0100
@@ -0,0 +1,31 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb(a)prep.ai.mit.edu */
+
+int
+main (int argc, char **argv)
+{
+ static int i = 0; /* `static' to start initialized. */
+ int j = 2;
+
+ for (j = 0; j < 30; j++)
+ i = 30 - j;
+
+ return 0;
+}
++++++ gdb-archer.patch ++++++
++++ 47439 lines (skipped)
++++++ gdb-c_get_string-xfree.patch ++++++
http://sourceware.org/ml/gdb-patches/2009-04/msg00284.html
http://sourceware.org/ml/gdb-cvs/2009-04/msg00077.html
http://sourceware.org/ml/archer/2009-q2/msg00049.html
gdb/
2009-04-14 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* c-lang.c (c_get_string): Fix xfree crash on a failed string read.
gdb/testsuite/
2009-04-14 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* gdb.python/python-prettyprint.c: Include <string.h>.
(struct nullstr): New.
(main): New variable `nullstr'. Clear it.
* gdb.python/python-prettyprint.exp (run_lang_tests): Test `nullstr'.
* gdb.python/python-prettyprint.py (class pp_nullstr): New.
(register_pretty_printers): Register `pp_nullstr'.
--- src/gdb/c-lang.c 2009/03/21 00:46:17 1.63
+++ src/gdb/c-lang.c 2009/04/14 21:54:33 1.64
@@ -657,7 +657,7 @@
buffer, length);
if (err)
{
- xfree (buffer);
+ xfree (*buffer);
error (_("Error reading string from inferior: %s"),
safe_strerror (err));
}
diff --git a/gdb/testsuite/gdb.python/python-prettyprint.c b/gdb/testsuite/gdb.python/python-prettyprint.c
index 399be23..0d9110d 100644
--- a/gdb/testsuite/gdb.python/python-prettyprint.c
+++ b/gdb/testsuite/gdb.python/python-prettyprint.c
@@ -15,6 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include <string.h>
+
struct s
{
int a;
@@ -143,6 +145,11 @@ void do_nothing(void)
c = 23; /* Another MI breakpoint */
}
+struct nullstr
+{
+ char *s;
+};
+
int
main ()
{
@@ -151,10 +158,13 @@ main ()
string x = make_string ("this is x");
zzz_type c = make_container ("container");
const struct string_repr cstring = { { "const string" } };
+ /* Clearing by being `static' could invoke an other GDB C++ bug. */
+ struct nullstr nullstr;
init_ss(&ss, 1, 2);
init_ss(ssa+0, 3, 4);
init_ss(ssa+1, 5, 6);
+ memset (&nullstr, 0, sizeof nullstr);
#ifdef __cplusplus
S cps;
diff --git a/gdb/testsuite/gdb.python/python-prettyprint.exp b/gdb/testsuite/gdb.python/python-prettyprint.exp
index f83b1cd..907dcfd 100644
--- a/gdb/testsuite/gdb.python/python-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/python-prettyprint.exp
@@ -85,6 +85,8 @@ proc run_lang_tests {lang} {
gdb_test "print c" " = container $hex \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}"
+ gdb_test "print nullstr" "RuntimeError: Error reading string from inferior.*"
+
gdb_test "continue" "Program exited normally\."
}
diff --git a/gdb/testsuite/gdb.python/python-prettyprint.py b/gdb/testsuite/gdb.python/python-prettyprint.py
index a53e412..82e5331 100644
--- a/gdb/testsuite/gdb.python/python-prettyprint.py
+++ b/gdb/testsuite/gdb.python/python-prettyprint.py
@@ -92,6 +92,13 @@ class pp_vbase1:
def to_string (self):
return "pp class name: " + self.val.type.tag
+class pp_nullstr:
+ def __init__(self, val):
+ self.val = val
+
+ def to_string(self):
+ return self.val['s'].string(gdb.parameter('target-charset'))
+
def lookup_function (val):
"Look-up and return a pretty-printer that can print val."
@@ -135,6 +142,9 @@ def register_pretty_printers ():
pretty_printers_dict[re.compile ('^VirtualTest$')] = pp_multiple_virtual
pretty_printers_dict[re.compile ('^Vbase1$')] = pp_vbase1
+
+ pretty_printers_dict[re.compile ('^struct nullstr$')] = pp_nullstr
+ pretty_printers_dict[re.compile ('^nullstr$')] = pp_nullstr
# Note that we purposely omit the typedef names here.
# Printer lookup is based on canonical name.
++++++ gdb-charset-crash.patch ++++++
http://sourceware.org/ml/gdb-patches/2009-04/msg00356.html
http://sourceware.org/ml/gdb-cvs/2009-04/msg00081.html
gdb/
2009-04-15 Tom Tromey <tromey(a)redhat.com>
* c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
gdb/testsuite/
2009-04-15 Tom Tromey <tromey(a)redhat.com>
* gdb.base/charset.exp: Add regression test.
--- src/gdb/c-lang.c 2009/04/14 21:54:33 1.64
+++ src/gdb/c-lang.c 2009/04/15 21:55:04 1.65
@@ -941,7 +941,15 @@
*pos += 2;
if (noside == EVAL_SKIP)
- return NULL;
+ {
+ /* Return a dummy value of the appropriate type. */
+ if ((dest_type & C_CHAR) != 0)
+ result = allocate_value (type);
+ else
+ result = value_typed_string ("", 0, type);
+ do_cleanups (cleanup);
+ return result;
+ }
if ((dest_type & C_CHAR) != 0)
{
--- src/gdb/testsuite/gdb.base/charset.exp 2009/03/25 19:25:49 1.13
+++ src/gdb/testsuite/gdb.base/charset.exp 2009/04/15 21:55:04 1.14
@@ -604,4 +604,9 @@
test_combination u UCS-2 U UCS-4
}
+# Regression test for a cleanup bug in the charset code.
+gdb_test "print 'a' == 'a' || 'b' == 'b'" \
+ ".* = 1" \
+ "EVAL_SKIP cleanup handling regression test"
+
gdb_exit
++++++ gdb-gstack.man ++++++
.\"
.\" gstack manual page.
.\" Copyright (c) 1999 Ross Thompson
.\" Copyright (c) 2001, 2002, 2004, 2008 Red Hat, Inc.
.\"
.\" Original author: Ross Thompson <ross(a)whatsis.com>
.\"
.\" 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, 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; see the file COPYING. If not, write to
.\" the Free Software Foundation, 59 Temple Place - Suite 330,
.\" Boston, MA 02111-1307, USA.
.\"
.TH GSTACK 1 "Feb 15 2008" "Red Hat Linux" "Linux Programmer's Manual"
.SH NAME
gstack \- print a stack trace of a running process
.SH SYNOPSIS
.B gstack
pid
.SH DESCRIPTION
\f3gstack\f1 attaches to the active process named by the \f3pid\f1 on
the command line, and prints out an execution stack trace. If ELF
symbols exist in the binary (usually the case unless you have run
strip(1)), then symbolic addresses are printed as well.
If the process is part of a thread group, then \f3gstack\f1 will print
out a stack trace for each of the threads in the group.
.SH SEE ALSO
nm(1), ptrace(2), gdb(1)
.SH AUTHORS
Ross Thompson <ross(a)whatsis.com>
Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
++++++ gdb-orphanripper.c ++++++
/*
* Copyright 2006-2007 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.
*
* Reap any leftover children possibly holding file descriptors.
* Children are identified by the stale file descriptor or PGID / SID.
* Both can be missed but only the stale file descriptors are important for us.
* PGID / SID may be set by the children on their own.
* If we fine a candidate we kill it will all its process tree (grandchildren).
* The child process is run with `2>&1' redirection (due to forkpty(3)).
* 2007-07-10 Jan Kratochvil <jan.kratochvil(a)redhat.com>
*/
/* For getpgid(2). */
#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <dirent.h>
#include <unistd.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
#include <fcntl.h>
#include <assert.h>
#include <pty.h>
#include <poll.h>
#define LENGTH(x) (sizeof (x) / sizeof (*(x)))
static const char *progname;
static volatile int signal_child_hit = 0;
/* We use it to race-safely emulate ppoll(2) by poll(2). */
static int pipefd[2];
static void signal_child (int signo)
{
int i;
signal_child_hit = 1;
assert (pipefd[1] != -1);
i = close (pipefd[1]);
assert (i == 0);
pipefd[1] = -1;
}
static char childptyname[LINE_MAX];
static pid_t child;
static int spawn (char **argv)
{
pid_t child_got;
int status, amaster, i;
struct sigaction act;
struct termios termios;
i = pipe (pipefd);
assert (i == 0);
/* We do not use signal(2) to be sure we have SA_RESTART set. */
memset (&act, 0, sizeof (act));
act.sa_handler = signal_child;
i = sigemptyset (&act.sa_mask);
assert (i == 0);
act.sa_flags = SA_RESTART;
i = sigaction (SIGCHLD, &act, NULL);
assert (i == 0);
/* With TERMP passed as NULL we get "\n" -> "\r\n". */
termios.c_iflag = IGNBRK | IGNPAR;
termios.c_oflag = 0;
termios.c_cflag = CS8 | CREAD | CLOCAL | HUPCL | B9600;
termios.c_lflag = IEXTEN | NOFLSH;
memset (termios.c_cc, _POSIX_VDISABLE, sizeof (termios.c_cc));
termios.c_cc[VTIME] = 0;
termios.c_cc[VMIN ] = 1;
cfmakeraw (&termios);
#ifdef FLUSHO
/* Workaround a readline deadlock bug in _get_tty_settings(). */
termios.c_lflag &= ~FLUSHO;
#endif
child = forkpty (&amaster, childptyname, &termios, NULL);
switch (child)
{
case -1:
perror ("forkpty(3)");
exit (EXIT_FAILURE);
case 0:
i = close (pipefd[0]);
assert (i == 0);
i = close (pipefd[1]);
assert (i == 0);
/* Do not replace STDIN as inferiors query its termios. */
#if 0
i = close (STDIN_FILENO);
assert (i == 0);
i = open ("/dev/null", O_RDONLY);
assert (i == STDIN_FILENO);
#endif
/* Do not setpgrp(2) in the parent process as the process-group
is shared for the whole sh(1) pipeline we could be a part
of. The process-group is set according to PID of the first
command in the pipeline.
We would rip even vi(1) in the case of:
./orphanripper sh -c 'sleep 1&' | vi -
*/
/* Do not setpgrp(2) as our pty would not be ours and we would
get `SIGSTOP' later, particularly after spawning gdb(1).
setsid(3) was already executed by forkpty(3) and it would fail if
executed again. */
if (getpid() != getpgrp ())
{
perror ("getpgrp(2)");
exit (EXIT_FAILURE);
}
execvp (argv[1], argv + 1);
perror ("execvp(2)");
exit (EXIT_FAILURE);
default:
break;
}
i = fcntl (amaster, F_SETFL, O_RDWR | O_NONBLOCK);
if (i != 0)
{
perror ("fcntl (amaster, F_SETFL, O_NONBLOCK)");
exit (EXIT_FAILURE);
}
for (;;)
{
struct pollfd pollfd[2];
char buf[LINE_MAX];
ssize_t buf_got;
pollfd[0].fd = amaster;
pollfd[0].events = POLLIN;
pollfd[1].fd = pipefd[0];
pollfd[1].events = POLLIN;
i = poll (pollfd, LENGTH (pollfd), -1);
if (i == -1 && errno == EINTR)
{
/* Weird but SA_RESTART sometimes does not work. */
continue;
}
assert (i >= 1);
/* Data available? Process it first. */
if (pollfd[0].revents & POLLIN)
{
buf_got = read (amaster, buf, sizeof buf);
if (buf_got <= 0)
{
perror ("read (amaster)");
exit (EXIT_FAILURE);
}
if (write (STDOUT_FILENO, buf, buf_got) != buf_got)
{
perror ("write(2)");
exit (EXIT_FAILURE);
}
}
if (pollfd[0].revents & POLLHUP)
break;
if ((pollfd[0].revents &= ~POLLIN) != 0)
{
fprintf (stderr, "%s: ppoll(2): revents 0x%x\n", progname,
(unsigned) pollfd[0].revents);
exit (EXIT_FAILURE);
}
/* Child exited? */
if (pollfd[1].revents & POLLHUP)
break;
assert (pollfd[1].revents == 0);
}
/* WNOHANG still could fail. */
child_got = waitpid (child, &status, 0);
if (child != child_got)
{
fprintf (stderr, "waitpid (%d) = %d: %m\n", (int) child, (int) child_got);
exit (EXIT_FAILURE);
}
if (!WIFEXITED (status))
{
fprintf (stderr, "waitpid (%d): !WIFEXITED (%d)\n", (int) child, status);
exit (EXIT_FAILURE);
}
assert (signal_child_hit != 0);
assert (pipefd[1] == -1);
i = close (pipefd[0]);
assert (i == 0);
/* Do not close the master FD as the child would have `/dev/pts/23 (deleted)'
entries which are not expected (and expecting ` (deleted)' would be
a race. */
#if 0
i = close (amaster);
if (i != 0)
{
perror ("close (forkpty ()'s amaster)");
exit (EXIT_FAILURE);
}
#endif
return WEXITSTATUS (status);
}
/* Detected commandline may look weird due to a race:
Original command:
./orphanripper sh -c 'sleep 1&' &
Correct output:
[1] 29610
./orphanripper: Killed -9 orphan PID 29612 (PGID 29611): sleep 1
Raced output (sh(1) child still did not update its argv[]):
[1] 29613
./orphanripper: Killed -9 orphan PID 29615 (PGID 29614): sh -c sleep 1&
We could delay a bit before ripping the children. */
static const char *read_cmdline (pid_t pid)
{
char cmdline_fname[32];
static char cmdline[LINE_MAX];
int fd;
ssize_t got;
char *s;
if (snprintf (cmdline_fname, sizeof cmdline_fname, "/proc/%d/cmdline",
(int) pid) < 0)
return NULL;
fd = open (cmdline_fname, O_RDONLY);
if (fd == -1)
{
/* It may have already exited - ENOENT. */
#if 0
fprintf (stderr, "%s: open (\"%s\"): %m\n", progname, cmdline_fname);
#endif
return NULL;
}
got = read (fd, cmdline, sizeof (cmdline) - 1);
if (got == -1)
fprintf (stderr, "%s: read (\"%s\"): %m\n", progname,
cmdline_fname);
if (close (fd) != 0)
fprintf (stderr, "%s: close (\"%s\"): %m\n", progname,
cmdline_fname);
if (got < 0)
return NULL;
/* Convert '\0' argument delimiters to spaces. */
for (s = cmdline; s < cmdline + got; s++)
if (!*s)
*s = ' ';
/* Trim the trailing spaces (typically single '\0'->' '). */
while (s > cmdline && isspace (s[-1]))
s--;
*s = 0;
return cmdline;
}
static int dir_scan (const char *dirname,
int (*callback) (struct dirent *dirent, const char *pathname))
{
DIR *dir;
struct dirent *dirent;
int rc = 0;
dir = opendir (dirname);
if (dir == NULL)
{
if (errno == EACCES || errno == ENOENT)
return rc;
fprintf (stderr, "%s: opendir (\"%s\"): %m\n", progname, dirname);
exit (EXIT_FAILURE);
}
while ((errno = 0, dirent = readdir (dir)))
{
char pathname[LINE_MAX];
int pathname_len;
pathname_len = snprintf (pathname, sizeof pathname, "%s/%s",
dirname, dirent->d_name);
if (pathname_len <= 0 || pathname_len >= sizeof pathname)
{
fprintf (stderr, "entry file name too long: `%s' / `%s'\n",
dirname, dirent->d_name);
continue;
}
/* RHEL-4.5 on s390x never fills in D_TYPE. */
if (dirent->d_type == DT_UNKNOWN)
{
struct stat statbuf;
int i;
/* We are not interested in the /proc/PID/fd/ links targets. */
i = lstat (pathname, &statbuf);
if (i == -1)
{
if (errno == EACCES || errno == ENOENT)
continue;
fprintf (stderr, "%s: stat (\"%s\"): %m\n", progname, pathname);
exit (EXIT_FAILURE);
}
if (S_ISDIR (statbuf.st_mode))
dirent->d_type = DT_DIR;
if (S_ISLNK (statbuf.st_mode))
dirent->d_type = DT_LNK;
/* No other D_TYPE types used in this code. */
}
rc = (*callback) (dirent, pathname);
if (rc != 0)
{
errno = 0;
break;
}
}
if (errno != 0)
{
fprintf (stderr, "%s: readdir (\"%s\"): %m\n", progname, dirname);
exit (EXIT_FAILURE);
}
if (closedir (dir) != 0)
{
fprintf (stderr, "%s: closedir (\"%s\"): %m\n", progname, dirname);
exit (EXIT_FAILURE);
}
return rc;
}
static int fd_fs_scan (pid_t pid, int (*func) (pid_t pid, const char *link))
{
char dirname[64];
if (snprintf (dirname, sizeof dirname, "/proc/%d/fd", (int) pid) < 0)
{
perror ("snprintf(3)");
exit (EXIT_FAILURE);
}
int callback (struct dirent *dirent, const char *pathname)
{
char buf[LINE_MAX];
ssize_t buf_len;
if ((dirent->d_type != DT_DIR && dirent->d_type != DT_LNK)
|| (dirent->d_type == DT_DIR && strcmp (dirent->d_name, ".") != 0
&& strcmp (dirent->d_name, "..") != 0)
|| (dirent->d_type == DT_LNK && strspn (dirent->d_name, "0123456789")
!= strlen (dirent->d_name)))
{
fprintf (stderr, "Unexpected entry \"%s\" (d_type %u)"
" on readdir (\"%s\"): %m\n",
dirent->d_name, (unsigned) dirent->d_type, dirname);
return 0;
}
if (dirent->d_type == DT_DIR)
return 0;
buf_len = readlink (pathname, buf, sizeof buf - 1);
if (buf_len <= 0 || buf_len >= sizeof buf - 1)
{
if (errno != ENOENT && errno != EACCES)
fprintf (stderr, "Error reading link \"%s\": %m\n", pathname);
return 0;
}
buf[buf_len] = 0;
return (*func) (pid, buf);
}
return dir_scan (dirname, callback);
}
static void pid_fs_scan (void (*func) (pid_t pid, void *data), void *data)
{
int callback (struct dirent *dirent, const char *pathname)
{
if (dirent->d_type != DT_DIR
|| strspn (dirent->d_name, "0123456789") != strlen (dirent->d_name))
return 0;
(*func) (atoi (dirent->d_name), data);
return 0;
}
dir_scan ("/proc", callback);
}
static int rip_check_ptyname (pid_t pid, const char *link)
{
assert (pid != getpid ());
return strcmp (link, childptyname) == 0;
}
struct pid
{
struct pid *next;
pid_t pid;
};
static struct pid *pid_list;
static int pid_found (pid_t pid)
{
struct pid *entry;
for (entry = pid_list; entry != NULL; entry = entry->next)
if (entry->pid == pid)
return 1;
return 0;
}
/* Single pass is not enough, a (multithreaded) process was seen to survive.
Repeated killing of the same process is not enough, zombies can be killed.
*/
static int cleanup_acted;
static void pid_record (pid_t pid)
{
struct pid *entry;
if (pid_found (pid))
return;
cleanup_acted = 1;
entry = malloc (sizeof (*entry));
if (entry == NULL)
{
fprintf (stderr, "%s: malloc: %m\n", progname);
exit (EXIT_FAILURE);
}
entry->pid = pid;
entry->next = pid_list;
pid_list = entry;
}
static void pid_forall (void (*func) (pid_t pid))
{
struct pid *entry;
for (entry = pid_list; entry != NULL; entry = entry->next)
(*func) (entry->pid);
}
/* Returns 0 on failure. */
static pid_t pid_get_parent (pid_t pid)
{
char fname[64];
FILE *f;
char line[LINE_MAX];
pid_t retval = 0;
if (snprintf (fname, sizeof fname, "/proc/%d/status", (int) pid) < 0)
{
perror ("snprintf(3)");
exit (EXIT_FAILURE);
}
f = fopen (fname, "r");
if (f == NULL)
{
return 0;
}
while (errno = 0, fgets (line, sizeof line, f) == line)
{
if (strncmp (line, "PPid:\t", sizeof "PPid:\t" - 1) != 0)
continue;
retval = atoi (line + sizeof "PPid:\t" - 1);
errno = 0;
break;
}
if (errno != 0)
{
fprintf (stderr, "%s: fgets (\"%s\"): %m\n", progname, fname);
exit (EXIT_FAILURE);
}
if (fclose (f) != 0)
{
fprintf (stderr, "%s: fclose (\"%s\"): %m\n", progname, fname);
exit (EXIT_FAILURE);
}
return retval;
}
static void killtree (pid_t pid);
static void killtree_pid_fs_scan (pid_t pid, void *data)
{
pid_t parent_pid = *(pid_t *) data;
/* Do not optimize it as we could miss some newly spawned processes.
Always traverse all the leaves. */
#if 0
/* Optimization. */
if (pid_found (pid))
return;
#endif
if (pid_get_parent (pid) != parent_pid)
return;
killtree (pid);
}
static void killtree (pid_t pid)
{
pid_record (pid);
pid_fs_scan (killtree_pid_fs_scan, &pid);
}
static void rip_pid_fs_scan (pid_t pid, void *data)
{
pid_t pgid;
/* Shouldn't happen. */
if (pid == getpid ())
return;
/* Check both PGID and the stale file descriptors. */
pgid = getpgid (pid);
if (pgid == child
|| fd_fs_scan (pid, rip_check_ptyname) != 0)
killtree (pid);
}
static void killproc (pid_t pid)
{
const char *cmdline;
cmdline = read_cmdline (pid);
/* Avoid printing the message for already gone processes. */
if (kill (pid, 0) != 0 && errno == ESRCH)
return;
if (cmdline == NULL)
cmdline = "<error>";
fprintf (stderr, "%s: Killed -9 orphan PID %d: %s\n", progname, (int) pid, cmdline);
if (kill (pid, SIGKILL) == 0)
cleanup_acted = 1;
else if (errno != ESRCH)
fprintf (stderr, "%s: kill (%d, SIGKILL): %m\n", progname, (int) pid);
/* RHEL-3 kernels cannot SIGKILL a `T (stopped)' process. */
kill (pid, SIGCONT);
/* Do not waitpid(2) as it cannot be our direct descendant and it gets
cleaned up by init(8). */
#if 0
pid_t pid_got;
pid_got = waitpid (pid, NULL, 0);
if (pid != pid_got)
{
fprintf (stderr, "%s: waitpid (%d) != %d: %m\n", progname,
(int) pid, (int) pid_got);
return;
}
#endif
}
static void rip (void)
{
cleanup_acted = 0;
do
{
if (cleanup_acted)
usleep (1000000 / 10);
cleanup_acted = 0;
pid_fs_scan (rip_pid_fs_scan, NULL);
pid_forall (killproc);
}
while (cleanup_acted);
}
int main (int argc, char **argv)
{
int rc;
if (argc < 2 || strcmp (argv[1], "-h") == 0
|| strcmp (argv[1], "--help") == 0)
{
fputs ("Syntax: orphanripper <execvp(3) commandline>\n", stdout);
exit (EXIT_FAILURE);
}
progname = argv[0];
rc = spawn (argv);
rip ();
return rc;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package yast2-network for openSUSE:Factory
checked in at Mon May 4 18:39:04 CEST 2009.
--------
--- yast2-network/yast2-network.changes 2009-04-28 16:23:46.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-network/yast2-network.changes 2009-05-04 15:13:31.000000000 +0200
@@ -1,0 +2,7 @@
+Mon May 4 14:48:06 CEST 2009 - mzugec(a)suse.de
+
+- fixed: after autoinstall, dns and routing info are lost
+ (bnc#498993)
+- 2.18.31
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.u12088/_old 2009-05-04 18:38:48.000000000 +0200
+++ /var/tmp/diff_new_pack.u12088/_new 2009-05-04 18:38:48.000000000 +0200
@@ -20,7 +20,7 @@
Name: yast2-network
Version: 2.18.30
-Release: 1
+Release: 2
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -142,6 +142,10 @@
%exclude %{prefix}/share/doc/packages/yast2-network/COPYING
%exclude %{prefix}/share/doc/packages/yast2-network/README
%changelog
+* Mon May 04 2009 mzugec(a)suse.de
+- fixed: after autoinstall, dns and routing info are lost
+ (bnc#498993)
+- 2.18.31
* Tue Apr 28 2009 mzugec(a)suse.de
- correctly read/write module options (bnc#487656)
- 2.18.30
++++++ yast2-network-2.18.30.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.18.30/configure new/yast2-network-2.18.30/configure
--- old/yast2-network-2.18.30/configure 2009-04-25 02:21:55.000000000 +0200
+++ new/yast2-network-2.18.30/configure 2009-05-04 13:51:47.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-network 2.18.29.
+# Generated by GNU Autoconf 2.63 for yast2-network 2.18.30.
#
# Report bugs to <http://bugs.opensuse.org/>.
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-network'
PACKAGE_TARNAME='yast2-network'
-PACKAGE_VERSION='2.18.29'
-PACKAGE_STRING='yast2-network 2.18.29'
+PACKAGE_VERSION='2.18.30'
+PACKAGE_STRING='yast2-network 2.18.30'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1274,7 +1274,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-network 2.18.29 to adapt to many kinds of systems.
+\`configure' configures yast2-network 2.18.30 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1345,7 +1345,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-network 2.18.29:";;
+ short | recursive ) echo "Configuration of yast2-network 2.18.30:";;
esac
cat <<\_ACEOF
@@ -1425,7 +1425,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-network configure 2.18.29
+yast2-network configure 2.18.30
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1439,7 +1439,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-network $as_me 2.18.29, which was
+It was created by yast2-network $as_me 2.18.30, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2286,7 +2286,7 @@
# Define the identity of the package.
PACKAGE='yast2-network'
- VERSION='2.18.29'
+ VERSION='2.18.30'
cat >>confdefs.h <<_ACEOF
@@ -2510,7 +2510,7 @@
-VERSION="2.18.29"
+VERSION="2.18.30"
RPMNAME="yast2-network"
MAINTAINER="Michal Zugec <mzugec(a)suse.cz>"
@@ -3451,7 +3451,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-network $as_me 2.18.29, which was
+This file was extended by yast2-network $as_me 2.18.30, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3501,7 +3501,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-network config.status 2.18.29
+yast2-network config.status 2.18.30
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.18.30/configure.in new/yast2-network-2.18.30/configure.in
--- old/yast2-network-2.18.30/configure.in 2009-04-25 02:21:42.000000000 +0200
+++ new/yast2-network-2.18.30/configure.in 2009-05-04 13:51:36.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-network
dnl
-dnl -- This file is generated by y2autoconf 2.18.2 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.18.4 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-network, 2.18.29, http://bugs.opensuse.org/, yast2-network)
+AC_INIT(yast2-network, 2.18.30, http://bugs.opensuse.org/, yast2-network)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.18.29"
+VERSION="2.18.30"
RPMNAME="yast2-network"
MAINTAINER="Michal Zugec <mzugec(a)suse.cz>"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.18.30/Makefile.am new/yast2-network-2.18.30/Makefile.am
--- old/yast2-network-2.18.30/Makefile.am 2009-04-25 02:21:43.000000000 +0200
+++ new/yast2-network-2.18.30/Makefile.am 2009-05-04 13:51:36.000000000 +0200
@@ -32,10 +32,10 @@
# less strict; prefer bzip2
AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip
-# where devtools instal m4 snippets
+# where devtools install m4 snippets
# argh, executed literally
#ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal
-ACLOCAL_AMFLAGS = -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal
+ACLOCAL_AMFLAGS = -I . -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal
Makefile.am.common: $(DEVTOOLS_DIR)/admin/Makefile.am.common
cmp -s $< $@ || cp -f $< $@
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.18.30/Makefile.in new/yast2-network-2.18.30/Makefile.in
--- old/yast2-network-2.18.30/Makefile.in 2009-04-25 02:22:03.000000000 +0200
+++ new/yast2-network-2.18.30/Makefile.in 2009-05-04 13:51:56.000000000 +0200
@@ -226,10 +226,10 @@
# less strict; prefer bzip2
AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip
-# where devtools instal m4 snippets
+# where devtools install m4 snippets
# argh, executed literally
#ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal
-ACLOCAL_AMFLAGS = -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal
+ACLOCAL_AMFLAGS = -I . -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal
CLEANFILES =
MAINTAINERCLEANFILES = package/$(RPMNAME)-$(VERSION).tar.bz2 package/$(RPMNAME).spec
POT_DST = $(shell find -type d -name testsuite -prune , \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.18.30/src/clients/dns_auto.ycp new/yast2-network-2.18.30/src/clients/dns_auto.ycp
--- old/yast2-network-2.18.30/src/clients/dns_auto.ycp 2009-04-02 09:32:38.000000000 +0200
+++ new/yast2-network-2.18.30/src/clients/dns_auto.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,92 +0,0 @@
-/**
- * File: clients/dns_auto.ycp
- * Package: Network configuration
- * Summary: Client for autoinstallation
- * Authors: Michal Svec <msvec(a)suse.cz>
- *
- * $Id: dns_auto.ycp 20958 2005-01-25 16:34:37Z mvidner $
- *
- * This is a client for autoinstallation. It takes its arguments,
- * goes through the configuration and return the setting.
- * Does not do any changes to the configuration.
- */
-
-/**
- * @param function to execute
- * @param map/list of dns settings
- * @return map edited settings, Summary or boolean on success depending on called function
- * @example map mm = $[ "FAIL_DELAY" : "77" ];
- * @example map ret = WFM::CallFunction ("dns_auto", [ "Summary", mm ]);
- */
-
-{
-
-textdomain "network";
-
-y2milestone("----------------------------------------");
-y2milestone("DNS auto started");
-
-import "DNS";
-import "Wizard";
-
-include "network/services/dns.ycp";
-
-any ret = nil;
-string func = "";
-map param = $[];
-
-/* Check arguments */
-if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) {
- func = (string) WFM::Args(0);
- if(size(WFM::Args()) > 1 && is(WFM::Args(1), map))
- param = (map) WFM::Args(1);
-}
-y2debug("func=%1", func);
-y2debug("param=%1", param);
-
-/* Create a summary*/
-if(func == "Summary") {
- ret = DNS::Summary();
-}
-/* Reset configuration */
-else if (func == "Reset") {
- DNS::Import($[]);
- ret = $[];
-}
-/* Change configuration (run AutoSequence) */
-else if (func == "Change") {
- Wizard::CreateDialog();
- Wizard::SetDesktopIcon("dns");
- ret = DNSMainDialog(true);
- UI::CloseDialog();
-}
-/* Import configuration */
-else if (func == "Import") {
- ret = DNS::Import(param);
-}
-/* Return actual state */
-else if (func == "Export") {
- ret = DNS::Export();
-}
-/* Write givven settings */
-else if (func == "Write") {
- import "Progress";
- boolean progress_orig = Progress::set (false);
- // DNS::write_only = true;
- ret = DNS::Write();
- Progress::set (progress_orig);
-}
-/* Unknown function */
-else {
- y2error("Unknown function: %1", func);
- ret = false;
-}
-
-y2debug("ret=%1", ret);
-y2milestone("DNS auto finished");
-y2milestone("----------------------------------------");
-
-return ret;
-
-/* EOF */
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.18.30/src/clients/lan_auto.ycp new/yast2-network-2.18.30/src/clients/lan_auto.ycp
--- old/yast2-network-2.18.30/src/clients/lan_auto.ycp 2009-04-02 09:32:38.000000000 +0200
+++ new/yast2-network-2.18.30/src/clients/lan_auto.ycp 2009-05-04 13:39:15.000000000 +0200
@@ -284,6 +284,29 @@
ret = LanAutoSequence("");
}
else if(func == "Import") {
+ // see bnc#498993
+ // in case keep_install_network is set to true (in AY)
+ // and there is no dns and routing definition,
+ // we'll keep values from installation
+ if(param["keep_install_network"]:false==true) {
+ y2milestone("keep_install_network is enabled");
+ if(param["dns"]:$[]==$[] && param["routing"]:$[]==$[]){
+ y2milestone("DNS and routing are not defined in AY, will keep settings from installation");
+ // read settings from installation
+ Lan::Read(`cache);
+ // export settings into AY map
+ map from_system=Lan::Export();
+ map dns=from_system["dns"]:$[];
+ map routing=from_system["routing"]:$[];
+ // merge with param
+ param["dns"]=dns;
+ param["routing"]=routing;
+ y2milestone("", dns);
+ y2milestone("", routing);
+ } else{
+ y2milestone("DNS and routing defined in AY profile, will use it");
+ }
+ }
map new = FromAY(param);
Lan::Import(new);
ret = true;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.18.30/src/clients/routing_auto.ycp new/yast2-network-2.18.30/src/clients/routing_auto.ycp
--- old/yast2-network-2.18.30/src/clients/routing_auto.ycp 2009-04-02 09:32:38.000000000 +0200
+++ new/yast2-network-2.18.30/src/clients/routing_auto.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,91 +0,0 @@
-/**
- * File: clients/routing_auto.ycp
- * Package: Network configuration
- * Summary: Client for autoinstallation
- * Authors: Michal Svec <msvec(a)suse.cz>
- *
- * $Id: routing_auto.ycp 36863 2007-03-12 10:47:37Z mzugec $
- *
- * This is a client for autoinstallation. It takes its arguments,
- * goes through the configuration and return the setting.
- * Does not do any changes to the configuration.
- */
-
-/**
- * @param function to execute
- * @param map/list of routing settings
- * @return map edited settings, Summary or boolean on success depending on called function
- * @example map mm = $[ "FAIL_DELAY" : "77" ];
- * @example map ret = WFM::CallFunction ("routing_auto", [ "Summary", mm ]);
- */
-
-{
-
-textdomain "network";
-
-y2milestone("----------------------------------------");
-y2milestone("Routing auto started");
-
-import "Routing";
-import "Wizard";
-
-include "network/services/routing.ycp";
-
-any ret = nil;
-string func = "";
-map param = $[];
-
-/* Check arguments */
-if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) {
- func = (string) WFM::Args(0);
- if(size(WFM::Args()) > 1 && is(WFM::Args(1), map))
- param = (map) WFM::Args(1);
-}
-y2debug("func=%1", func);
-y2debug("param=%1", param);
-
-/* Create a summary*/
-if(func == "Summary") {
- ret = Routing::Summary();
-}
-/* Reset configuration */
-else if (func == "Reset") {
- Routing::Import($[]);
- ret = $[];
-}
-/* Change configuration (run AutoSequence) */
-else if (func == "Change") {
- Wizard::CreateDialog();
- Wizard::SetDesktopIcon("routing");
- ret = RoutingMainDialog();
- UI::CloseDialog();
-}
-/* Import configuration */
-else if (func == "Import") {
- ret = Routing::Import(param);
-}
-/* Return actual state */
-else if (func == "Export") {
- ret = Routing::Export();
-}
-/* Write givven settings */
-else if (func == "Write") {
- import "Progress";
- boolean progress_orig = Progress::set (false);
- ret = Routing::Write();
- Progress::set (progress_orig);
-}
-/* Unknown function */
-else {
- y2error("Unknown function: %1", func);
- ret = false;
-}
-
-y2debug("ret=%1", ret);
-y2milestone("Routing auto finished");
-y2milestone("----------------------------------------");
-
-return ret;
-
-/* EOF */
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.18.30/src/modules/InternetDevices.ycp new/yast2-network-2.18.30/src/modules/InternetDevices.ycp
--- old/yast2-network-2.18.30/src/modules/InternetDevices.ycp 2009-04-02 09:32:38.000000000 +0200
+++ new/yast2-network-2.18.30/src/modules/InternetDevices.ycp 2009-04-28 16:26:01.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Michal Svec <msvec(a)suse.cz>
* Arvin Schnell <arvin(a)suse.de>
*
- * $Id:$
+ * $Id: InternetDevices.ycp 57028 2009-04-29 10:58:09Z lslezak $
*/
{
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package xen for openSUSE:Factory
checked in at Mon May 4 18:37:56 CEST 2009.
--------
--- xen/xen.changes 2009-03-02 18:22:00.000000000 +0100
+++ /mounts/work_src_done/STABLE/xen/xen.changes 2009-04-29 22:09:21.000000000 +0200
@@ -1,0 +2,48 @@
+Fri Apr 22 17:30:02 CST 2009 - wkong(a)novell.com
+
+- Backport two qcow2 patches from qemu org
+ ioemu-6816-qcow2-revert-6404-6405-6407.patch
+ ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch
+
+-------------------------------------------------------------------
+Fri Apr 17 16:21:36 CST 2009 - wkong(a)novell.com
+- bnc#477890 - Patch: ioemu-qcow2-enhance-snapshot-create.patch
+
+-------------------------------------------------------------------
+Thu Apr 16 12:13:10 MDT 2009 - jfehlig(a)novell.com
+
+- Updated xend-domain-lock.patch
+ fate#303525, bnc#494892
+
+-------------------------------------------------------------------
+Thu Apr 9 18:36:23 CST 2009 - wkong(a)novell.com
+
+- Remove Patch155: xend-core-dump-loc.diff
+- Modify Patch110: xen-domUloader.diff,
+ remove symbol "bootfilter"
+
+-------------------------------------------------------------------
+Wed Apr 8 17:38:12 CST 2009 - wkong(a)novell.com
+
+- PATCH: network-nat-open-SuSEfirewall2-FORWARD.patch
+ fate#305354, bnc#472107
+ Open SuSEfirewall2 FORWARD rule when use xen nat
+- PATCH: network-nat-dhcpd-domain-info.patch
+ Add domain info for nat-dhcpd
+
+-------------------------------------------------------------------
+Thu Apr 2 16:52:04 MDT 2009 - jfehlig(a)novell.com
+
+- Fix domUloader to handle block device names with ':'
+
+-------------------------------------------------------------------
+Wed Mar 11 16:28:59 MDT 2009 - jfehlig(a)novell.com
+
+- Use pidofproc/checkproc in xend init script
+
+-------------------------------------------------------------------
+Tue Mar 3 16:11:39 CET 2009 - kukuk(a)suse.de
+
+- Don't load 8139* driver if xen-vnif works [bnc#480164]
+
+-------------------------------------------------------------------
@@ -8,0 +57,13 @@
+Thu Feb 26 15:05:38 MST 2009 - carnold(a)novell.com
+
+- bnc#474822 - L3: Win2003 i386 XEN VM can see only 2 TB with a
+ 4TB LUN.
+ int13_hardisk-64bit-lba.patch
+
+-------------------------------------------------------------------
+Wed Feb 25 11:52:16 MST 2009 - jfehlig(a)novell.com
+
+- bnc#477890 - Destroy domain if snapshot restore fails.
+ Updated snapshot-xend.patch
+
+-------------------------------------------------------------------
@@ -18,0 +80,13 @@
+Tue Feb 24 16:03:35 CET 2009 - kwolf(a)suse.de
+
+- bnc#477892 - Disable xend timeout for snapshots
+ Updated snapshot-xend.patch
+
+-------------------------------------------------------------------
+Tue Feb 24 14:28:52 CET 2009 - kwolf(a)suse.de
+
+- bnc#477895 - Fix detaching blktap disks from domains without
+ device model
+ Updated blktap-ioemu-close-fix.patch
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
18406-constify-microcode.patch
18412-x86-page-type-preemptible.patch
18420-x86-page-type-preemptible-fix.patch
18428-poll-single-port.patch
18446-vtd-dom0-passthrough.patch
18456-vtd-dom0-passthrough-cmdline.patch
18464-cpu-hotplug.patch
18468-therm-control-msr.patch
18471-cpu-hotplug.patch
18475-amd-microcode-update.patch
18481-amd-microcode-update-fix.patch
18483-intel-microcode-update.patch
18484-stubdom-ioemu-makefile.patch
18487-microcode-update-irq-context.patch
18488-microcode-free-fix.patch
18509-continue-hypercall-on-cpu.patch
18519-microcode-retval.patch
18520-per-CPU-GDT.patch
18521-per-CPU-TSS.patch
18523-per-CPU-misc.patch
18528-dump-evtchn.patch
18539-pirq-vector-mapping.patch
18547-pirq-vector-mapping-fix.patch
18573-move-pirq-logic.patch
18574-msi-free-vector.patch
18577-bad-assertion.patch
18583-passthrough-locking.patch
18584-evtchn-lock-rename.patch
18620-x86-page-type-preemptible-fix.patch
18637-vmx-set-dr7.patch
18654-xend-vcpus.patch
18656-vtd-alloc-checks.patch
18661-recursive-spinlocks.patch
18720-x86-dom-cleanup.patch
18722-x86-fixmap-reserved.patch
18723-unmap-dom-page-const.patch
18724-i386-highmem-assist.patch
18731-x86-dom-cleanup.patch
18735-x86-dom-cleanup.patch
18741-x86-dom-cleanup-no-hack.patch
18742-x86-partial-page-ref.patch
18745-xend-ioport-irq.patch
18747-x86-partial-page-ref.patch
18762-vtd-intremap-SMI-RTEs.patch
18764-cpu-affinity.patch
18771-reduce-GDT-switching.patch
18778-msi-irq-fix.patch
18780-cpu-affinity.patch
18785-vlapic-lowest-prio.patch
18788-vlapic-accel-dom-restore.patch
18795-x86-ioapic-guest-write.patch
18799-cpu-affinity.patch
18805-pv-driver-build.patch
18810-shadow-PAT.patch
18844-shared-page-EOI.patch
18852-shared-page-EOI-gmfn.patch
18870-vtd-flush-per-device.patch
18878-x86-cpufreq-less-verbose.patch
18879-cpufreq-params.patch
18880-x86-pirq-guest-bind-msg.patch
18887-vtd-error-handling.patch
18904-x86-local-irq.patch
18905-x86-ioapic-boot-panic.patch
18929-shadow-no-duplicates.patch
18930-xenoprof-dunnington.patch
18934-vtd-PCI-X-dev-assign.patch
18937-S3-MSI.patch
18943-amd-32bit-paging-limit.patch
18970-vmx-print-features.patch
19009-x86_64-note-init-p2m.patch
19027-hvmloader-SMBIOS-dev-mem-boundary.patch
19032-amd-iommu-pointer-reset.patch
19035-MSI-X-proper-enable.patch
19038-x86-no-apic.patch
19039-x86-propagate-nolapic.patch
19046-cross-bit-coredumping.patch
19048-cross-bit-coredumping.patch
19051-cross-bit-coredumping.patch
19072-vmx-pat.patch
19079-snp_ctl-1.patch
19088-x86-page-non-atomic-owner.patch
19089-x86_64-widen-page-refcounts.patch
19103-x86_64-fold-page-lock.patch
19151-xend-class-dereg.patch
19152-xm-man-page.patch
19153-xm-noxen-error.patch
19154-snoop-control.patch
19198-fix-snoop.patch
blktap-error-handling.patch
blktap-ioemu-close-fix.patch
ioemu-blktap-fix-open.patch
ioemu-qcow2-multiblock-aio.patch
ioemu-vpc-4gb-fix.patch
old-arbytes.patch
qemu-img-snapshot.patch
reenable-block-protocols.patch
rpmlint.diff
x86_64-page-info-pack.patch
x86_64-sh-next-shadow.patch
xen-3.3.1-testing-src.tar.bz2
New:
----
ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch
network-nat-open-SuSEfirewall2-FORWARD.patch
svm-lmsl.patch
tapdisk-ioemu-shutdown-fix.patch
x86_64-5Tb.patch
x86_64-note-init-p2m.patch
xen-3.4.0-testing-src.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package xen (Version 3.3.1_18546_12)
+# spec file for package xen (Version 3.4.0_19590_01)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,12 +20,12 @@
Name: xen
ExclusiveArch: %ix86 x86_64
-%define xvers 3.3
+%define xvers 3.4
%define xvermaj 3
-%define changeset 18546
-%define xen_build_dir xen-3.3.1-testing
-%define with_kmp 1
-BuildRequires: LibVNCServer-devel SDL-devel automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel ncurses-devel openssl openssl-devel pciutils-devel python-devel transfig
+%define changeset 19590
+%define xen_build_dir xen-3.4.0-testing
+%define with_kmp 0
+BuildRequires: LibVNCServer-devel SDL-devel automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel ncurses-devel openssl openssl-devel pciutils-devel python-devel texinfo transfig
%if %suse_version >= 1030
BuildRequires: texlive texlive-latex
%else
@@ -37,14 +37,14 @@
%if %{?with_kmp}0
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
%endif
-Version: 3.3.1_18546_12
-Release: 2
+Version: 3.4.0_19590_01
+Release: 1
License: GPL v2 only
Group: System/Kernel
AutoReqProv: on
PreReq: %insserv_prereq %fillup_prereq
Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel)
-Source0: xen-3.3.1-testing-src.tar.bz2
+Source0: xen-3.4.0-testing-src.tar.bz2
Source2: README.SuSE
Source3: boot.xen
Source4: boot.local.xenU
@@ -70,113 +70,24 @@
# sysconfig hook script for Xen
Source25: xen-updown.sh
# Upstream patches
-Patch0: 18406-constify-microcode.patch
-Patch1: 18412-x86-page-type-preemptible.patch
-Patch2: 18420-x86-page-type-preemptible-fix.patch
-Patch3: 18428-poll-single-port.patch
-Patch4: 18446-vtd-dom0-passthrough.patch
-Patch5: 18456-vtd-dom0-passthrough-cmdline.patch
-Patch6: 18464-cpu-hotplug.patch
-Patch7: 18468-therm-control-msr.patch
-Patch8: 18471-cpu-hotplug.patch
-Patch9: 18475-amd-microcode-update.patch
-Patch10: 18481-amd-microcode-update-fix.patch
-Patch11: 18483-intel-microcode-update.patch
-Patch12: 18484-stubdom-ioemu-makefile.patch
-Patch13: 18487-microcode-update-irq-context.patch
-Patch14: 18488-microcode-free-fix.patch
-Patch15: 18509-continue-hypercall-on-cpu.patch
-Patch16: 18519-microcode-retval.patch
-Patch17: 18520-per-CPU-GDT.patch
-Patch18: 18521-per-CPU-TSS.patch
-Patch19: 18523-per-CPU-misc.patch
-Patch20: 18528-dump-evtchn.patch
-Patch21: 18539-pirq-vector-mapping.patch
-Patch22: 18547-pirq-vector-mapping-fix.patch
-Patch23: 18573-move-pirq-logic.patch
-Patch24: 18574-msi-free-vector.patch
-Patch25: 18577-bad-assertion.patch
-Patch26: 18583-passthrough-locking.patch
-Patch27: 18584-evtchn-lock-rename.patch
-Patch28: 18620-x86-page-type-preemptible-fix.patch
-Patch29: 18637-vmx-set-dr7.patch
-Patch30: 18654-xend-vcpus.patch
-Patch31: 18656-vtd-alloc-checks.patch
-Patch32: 18661-recursive-spinlocks.patch
-Patch33: 18720-x86-dom-cleanup.patch
-Patch34: 18722-x86-fixmap-reserved.patch
-Patch35: 18723-unmap-dom-page-const.patch
-Patch36: 18724-i386-highmem-assist.patch
-Patch37: 18731-x86-dom-cleanup.patch
-Patch38: 18735-x86-dom-cleanup.patch
-Patch39: 18741-x86-dom-cleanup-no-hack.patch
-Patch40: 18742-x86-partial-page-ref.patch
-Patch41: 18745-xend-ioport-irq.patch
-Patch42: 18747-x86-partial-page-ref.patch
-Patch43: 18762-vtd-intremap-SMI-RTEs.patch
-Patch44: 18771-reduce-GDT-switching.patch
-Patch45: 18778-msi-irq-fix.patch
-Patch46: 18764-cpu-affinity.patch
-Patch47: 18780-cpu-affinity.patch
-Patch48: 18785-vlapic-lowest-prio.patch
-Patch49: 18788-vlapic-accel-dom-restore.patch
-Patch50: 18795-x86-ioapic-guest-write.patch
-Patch51: 18799-cpu-affinity.patch
-Patch52: 18805-pv-driver-build.patch
-Patch53: 18810-shadow-PAT.patch
-Patch54: 18844-shared-page-EOI.patch
-Patch55: 18852-shared-page-EOI-gmfn.patch
-Patch56: 18870-vtd-flush-per-device.patch
-Patch57: 18878-x86-cpufreq-less-verbose.patch
-Patch58: 18879-cpufreq-params.patch
-Patch59: 18880-x86-pirq-guest-bind-msg.patch
-Patch60: 18887-vtd-error-handling.patch
-Patch61: 18904-x86-local-irq.patch
-Patch62: 18905-x86-ioapic-boot-panic.patch
-Patch63: 18929-shadow-no-duplicates.patch
-Patch64: 18930-xenoprof-dunnington.patch
-Patch65: 18934-vtd-PCI-X-dev-assign.patch
-Patch66: 18937-S3-MSI.patch
-Patch67: 18943-amd-32bit-paging-limit.patch
-Patch68: 18970-vmx-print-features.patch
-Patch69: 19009-x86_64-note-init-p2m.patch
-Patch70: 19027-hvmloader-SMBIOS-dev-mem-boundary.patch
-Patch71: 19032-amd-iommu-pointer-reset.patch
-Patch72: 19035-MSI-X-proper-enable.patch
-Patch73: 19038-x86-no-apic.patch
-Patch74: 19039-x86-propagate-nolapic.patch
-Patch75: 19046-cross-bit-coredumping.patch
-Patch76: 19048-cross-bit-coredumping.patch
-Patch77: 19051-cross-bit-coredumping.patch
-Patch78: 19072-vmx-pat.patch
-Patch79: 19079-snp_ctl-1.patch
-Patch80: 19088-x86-page-non-atomic-owner.patch
-Patch81: 19089-x86_64-widen-page-refcounts.patch
-Patch82: 19103-x86_64-fold-page-lock.patch
-Patch83: 19151-xend-class-dereg.patch
-Patch84: 19152-xm-man-page.patch
-Patch85: 19153-xm-noxen-error.patch
-Patch86: 19154-snoop-control.patch
-Patch87: 19198-fix-snoop.patch
-Patch88: old-arbytes.patch
# Our patches
Patch100: xen-config.diff
Patch101: xend-config.diff
Patch102: xen-destdir.diff
Patch103: xen-rpmoptflags.diff
Patch104: xen-warnings.diff
-Patch106: xen-changeset.diff
-Patch107: xen-paths.diff
-Patch108: xen-xmexample.diff
-Patch109: xen-xmexample-vti.diff
-Patch110: xen-fixme-doc.diff
-Patch111: xen-domUloader.diff
-Patch112: xen-no-dummy-nfs-ip.diff
-Patch113: serial-split.patch
-Patch114: xen-xm-top-needs-root.diff
-Patch115: xen-tightvnc-args.diff
-Patch116: xen-max-free-mem.diff
-Patch119: xen-ioapic-ack-default.diff
+Patch105: xen-changeset.diff
+Patch106: xen-paths.diff
+Patch107: xen-xmexample.diff
+Patch108: xen-xmexample-vti.diff
+Patch109: xen-fixme-doc.diff
+Patch110: xen-domUloader.diff
+Patch111: xen-no-dummy-nfs-ip.diff
+Patch112: serial-split.patch
+Patch113: xen-xm-top-needs-root.diff
+Patch114: xen-tightvnc-args.diff
+Patch115: xen-max-free-mem.diff
+Patch116: xen-ioapic-ack-default.diff
Patch120: block-losetup-retry.diff
Patch121: block-flags.diff
Patch122: xen-hvm-default-bridge.diff
@@ -189,7 +100,6 @@
Patch134: xen-disable-qemu-monitor.diff
Patch135: supported_module.diff
Patch136: qemu-security-etch1.diff
-Patch137: rpmlint.diff
Patch140: cdrom-removable.patch
Patch150: bridge-opensuse.patch
Patch151: bridge-vlan.diff
@@ -198,8 +108,8 @@
Patch154: bridge-record-creation.patch
Patch155: xend-core-dump-loc.diff
Patch156: blktap.patch
-Patch157: xen-api-auth.patch
-Patch158: xen-qemu-iscsi-fix.patch
+Patch157: xen-qemu-iscsi-fix.patch
+Patch158: xen-api-auth.patch
Patch159: tools-gdbserver-build.diff
Patch160: network-route.patch
# Needs to go upstream sometime, when python 2.6 is widespread
@@ -208,51 +118,52 @@
Patch163: ioemu-vnc-resize.patch
# Needs to go upstream
Patch164: checkpoint-rename.patch
-Patch165: reenable-block-protocols.patch
-Patch166: network-nat.patch
-Patch167: ioemu-debuginfo.patch
+Patch165: network-nat.patch
+Patch166: ioemu-debuginfo.patch
# Patches for snapshot support
-Patch170: qemu-img-snapshot.patch
-Patch171: ioemu-blktap-fix-open.patch
-Patch172: snapshot-ioemu-save.patch
-Patch173: snapshot-ioemu-restore.patch
-Patch174: snapshot-ioemu-delete.patch
-Patch175: snapshot-xend.patch
-Patch180: ioemu-qcow2-multiblock-aio.patch
-Patch181: ioemu-blktap-image-format.patch
-Patch182: build-tapdisk-ioemu.patch
-Patch183: blktapctrl-default-to-ioemu.patch
-Patch184: ioemu-blktap-barriers.patch
-Patch185: tapdisk-ioemu-logfile.patch
-Patch186: blktap-ioemu-close-fix.patch
-Patch187: ioemu-blktap-zero-size.patch
-Patch188: blktap-error-handling.patch
-Patch189: ioemu-blktap-fv-init.patch
-Patch190: ioemu-vpc-4gb-fix.patch
-Patch191: qemu-dm-segfault.patch
+Patch200: snapshot-ioemu-save.patch
+Patch201: snapshot-ioemu-restore.patch
+Patch202: snapshot-ioemu-delete.patch
+Patch203: snapshot-xend.patch
+# ioemu part of blktap patch series
+Patch210: ioemu-blktap-fv-init.patch
+Patch211: ioemu-blktap-image-format.patch
+Patch212: build-tapdisk-ioemu.patch
+Patch213: tapdisk-ioemu-logfile.patch
+Patch214: ioemu-blktap-zero-size.patch
+Patch215: tapdisk-ioemu-shutdown-fix.patch
+# More random patches
+Patch220: qemu-dm-segfault.patch
+Patch221: blktapctrl-default-to-ioemu.patch
+Patch222: ioemu-blktap-barriers.patch
# Jim's domain lock patch
-Patch200: xend-domain-lock.patch
+Patch300: xend-domain-lock.patch
# Patches from Jan
-Patch240: dump-exec-state.patch
-Patch241: x86-show-page-walk-early.patch
-Patch242: x86-extra-trap-info.patch
-Patch243: x86-alloc-cpu-structs.patch
-Patch244: 32on64-extra-mem.patch
-Patch245: msi-enable.patch
-# PV Driver Patches
-Patch350: pv-driver-build.patch
-Patch351: xen-ioemu-hvm-pv-support.diff
-Patch352: pvdrv_emulation_control.patch
-Patch353: blktap-pv-cdrom.patch
-Patch354: x86-cpufreq-report.patch
-Patch355: dom-print.patch
-Patch356: x86_64-sh-next-shadow.patch
-Patch357: x86_64-page-info-pack.patch
-Patch358: disable_emulated_device.diff
+Patch340: x86_64-note-init-p2m.patch
+Patch341: x86-cpufreq-report.patch
+Patch342: dump-exec-state.patch
+Patch343: dom-print.patch
+Patch344: pv-driver-build.patch
+Patch345: x86-show-page-walk-early.patch
+Patch346: x86-extra-trap-info.patch
+Patch347: svm-lmsl.patch
+Patch348: x86_64-5Tb.patch
+# Other patches
+Patch400: x86-alloc-cpu-structs.patch
+Patch401: 32on64-extra-mem.patch
+Patch402: msi-enable.patch
+Patch403: xen-ioemu-hvm-pv-support.diff
+Patch404: pvdrv_emulation_control.patch
+Patch405: blktap-pv-cdrom.patch
+Patch406: network-nat-open-SuSEfirewall2-FORWARD.patch
+Patch407: ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch
+%if %{?with_kmp}0
+Patch450: disable_emulated_device.diff
+%endif
# novell_shim patches
-Patch400: hv_tools.patch
-Patch401: hv_xen_base.patch
-Patch402: hv_xen_extension.patch
+Patch500: hv_tools.patch
+Patch501: hv_xen_base.patch
+Patch502: hv_xen_extension.patch
Patch999: tmp_build.patch
Url: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -585,100 +496,12 @@
%prep
%setup -q -n %xen_build_dir
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch24 -p1
-%patch25 -p1
-%patch26 -p1
-%patch27 -p1
-%patch28 -p1
-%patch29 -p1
-%patch30 -p1
-%patch31 -p1
-%patch32 -p1
-%patch33 -p1
-%patch34 -p1
-%patch35 -p1
-%patch36 -p1
-%patch37 -p1
-%patch38 -p1
-%patch39 -p1
-%patch40 -p1
-%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
-%patch46 -p1
-%patch47 -p1
-%patch48 -p1
-%patch49 -p1
-%patch50 -p1
-%patch51 -p1
-%patch52 -p1
-%patch53 -p1
-%patch54 -p1
-%patch55 -p1
-%patch56 -p1
-%patch57 -p1
-%patch58 -p1
-%patch59 -p1
-%patch60 -p1
-%patch61 -p1
-%patch62 -p1
-%patch63 -p1
-%patch64 -p1
-%patch65 -p1
-%patch66 -p1
-%patch67 -p1
-%patch68 -p1
-%patch69 -p1
-%patch70 -p1
-%patch71 -p1
-%patch72 -p1
-%patch73 -p1
-%patch74 -p1
-%patch75 -p1
-%patch76 -p1
-%patch77 -p1
-%patch78 -p1
-%patch79 -p1
-%patch80 -p1
-%patch81 -p1
-%patch82 -p1
-%patch83 -p1
-%patch84 -p1
-%patch85 -p1
-%patch86 -p1
-%patch87 -p1
-%patch88 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
+%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
@@ -687,10 +510,9 @@
%patch111 -p1
%patch112 -p1
%patch113 -p1
-%patch114 -p1
+#%patch114 -p1 - vnc patch, may no longer be applicable.
%patch115 -p1
%patch116 -p1
-%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
@@ -703,12 +525,11 @@
%patch134 -p1
%patch135 -p1
%patch136 -p1
-%patch137 -p1
%patch140 -p1
%patch150 -p1
%patch151 -p1
%patch152 -p1
-#%patch153 -p1 hostonly
+#%patch153 -p1 - hostonly
%patch154 -p1
%patch155 -p1
%patch156 -p1
@@ -722,45 +543,44 @@
%patch164 -p1
%patch165 -p1
%patch166 -p1
-%patch167 -p1
-%patch170 -p1
-%patch171 -p1
-%patch172 -p1
-%patch173 -p1
-%patch174 -p1
-%patch175 -p1
-%patch180 -p1
-%patch181 -p1
-%patch182 -p1
-%patch183 -p1
-%patch184 -p1
-%patch185 -p1
-%patch186 -p1
-%patch187 -p1
-%patch188 -p1
-%patch189 -p1
-%patch190 -p1
-%patch191 -p1
%patch200 -p1
-%patch240 -p1
-%patch241 -p1
-%patch242 -p1
-%patch243 -p1
-%patch244 -p1
-%patch245 -p1
-%patch350 -p1
-%patch351 -p1
-%patch352 -p1
-%patch353 -p1
-%patch354 -p1
-%patch355 -p1
-%patch356 -p1
-%patch357 -p1
-%patch358 -p1
-%ifarch x86_64
-%patch400 -p1
+%patch201 -p1
+%patch202 -p1
+%patch203 -p1
+%patch210 -p1
+%patch211 -p1
+%patch212 -p1
+%patch213 -p1
+%patch214 -p1
+%patch215 -p1
+%patch220 -p1
+%patch221 -p1
+%patch222 -p1
+%patch300 -p1
+#%patch340 -p1 - Port Later if needed
+%patch341 -p1
+%patch342 -p1
+%patch343 -p1
+%patch344 -p1
+%patch345 -p1
+%patch346 -p1
+%patch347 -p1
+%patch348 -p1
+#%patch400 -p1 - Major Port or not needed
%patch401 -p1
-%patch402 -p1
+#%patch402 -p1 - Needed?
+%patch403 -p1
+%patch404 -p1
+%patch405 -p1
+%patch406 -p1
+%patch407 -p1
+%if %{?with_kmp}0
+%patch450 -p1
+%endif
+%ifarch x86_64
+%patch500 -p1
+%patch501 -p1
+%patch502 -p1
%endif
%patch999 -p1
@@ -884,6 +704,7 @@
# scripts
rm -f $RPM_BUILD_ROOT/etc/xen/scripts/block-*nbd
install -m755 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE16 %SOURCE17 $RPM_BUILD_ROOT/etc/xen/scripts/
+ln -s /etc/xen/scripts/xen-monitor $RPM_BUILD_ROOT/etc/xen/scripts/set-lock
# Xen API remote authentication files
install -d $RPM_BUILD_ROOT/etc/pam.d
install -m644 %SOURCE23 $RPM_BUILD_ROOT/etc/pam.d/xen-api
@@ -914,6 +735,7 @@
# udev support
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
mv $RPM_BUILD_ROOT/etc/udev/rules.d/xen-backend.rules $RPM_BUILD_ROOT/etc/udev/rules.d/40-xen.rules
+mv $RPM_BUILD_ROOT/etc/udev/rules.d/xend.rules $RPM_BUILD_ROOT/etc/udev/rules.d/40-xend.rules
#%find_lang xen-vm # po files are misnamed upstream
# Clean up unpackaged files
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/xen/qemu/
@@ -922,10 +744,12 @@
rm -rf $RPM_BUILD_ROOT/usr/share/xen/man/man1/qemu/qemu*
rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-sparc32
rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-sparc64
+rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-ppc
rm -f $RPM_BUILD_ROOT/usr/sbin/netfix
rm -f $RPM_BUILD_ROOT/%pysite/*.egg-info
rm -rf $RPM_BUILD_ROOT/html
rm -rf $RPM_BUILD_ROOT/usr/share/doc/xen/README.*
+rm -f $RPM_BUILD_ROOT/usr/share/doc/xen/create.dtd
rm -f $RPM_BUILD_ROOT/%{_libdir}/xen/bin/qemu-dm.debug
%files
@@ -959,6 +783,7 @@
/usr/bin/xentrace*
/usr/bin/pygrub
/usr/bin/qemu-img-xen
+/usr/bin/qemu-nbd-xen
/usr/bin/tapdisk-ioemu
/usr/bin/gdbserver-xen
/usr/sbin/blktapctrl
@@ -980,7 +805,7 @@
%dir /usr/lib/xen/bin
%endif
%dir /usr/lib/xen/boot
-%{_datadir}/xen/*.dtd
+#%{_datadir}/xen/*.dtd
%{_libdir}/xen/bin/readnotes
%{_libdir}/xen/bin/xc_restore
%{_libdir}/xen/bin/xc_save
@@ -1022,6 +847,7 @@
%dir /etc/udev
%dir /etc/udev/rules.d
/etc/udev/rules.d/40-xen.rules
+/etc/udev/rules.d/40-xend.rules
/etc/sysconfig/network/scripts/xen-updown.sh
/etc/sysconfig/network/if-up.d/xen
/etc/sysconfig/network/if-down.d/xen
@@ -1037,10 +863,12 @@
%dir %{_datadir}/xen
%dir %{_datadir}/xen/man
%dir %{_datadir}/xen/man/man1
+%dir %{_datadir}/xen/man/man8
%dir %{_datadir}/xen/qemu
%dir %{_datadir}/xen/qemu/keymaps
%{_datadir}/xen/qemu/*
%{_datadir}/xen/man/man1/*
+%{_datadir}/xen/man/man8/*
%{_libdir}/xen/bin/qemu-dm
%ifarch x86_64
/usr/lib/xen/bin/qemu-dm
++++++ 32on64-extra-mem.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,13 +1,13 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -2273,7 +2273,7 @@ class XendDomainInfo:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -2559,7 +2559,7 @@ class XendDomainInfo:
vtd_mem = ((vtd_mem + 1023) / 1024) * 1024
# Make sure there's enough RAM available for the domain
-- balloon.free(memory + shadow + vtd_mem)
-+ balloon.free(memory + shadow + vtd_mem + 512)
+- balloon.free(memory + shadow + vtd_mem, self)
++ balloon.free(memory + shadow + vtd_mem + 512, self)
# Set up the shadow memory
shadow_cur = xc.shadow_mem_control(self.domid, shadow / 1024)
++++++ blktapctrl-default-to-ioemu.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,211 +1,49 @@
-Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
+Index: xen-3.4.0-testing/tools/blktap/drivers/tapdisk.h
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/blktapctrl.c
-+++ xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
-@@ -65,6 +65,8 @@
- #define MAX_RAND_VAL 0xFFFF
- #define MAX_ATTEMPTS 10
-
-+#undef ALWAYS_USE_IOEMU
-+
- int run = 1;
- int max_timeout = MAX_TIMEOUT;
- int ctlfd = 0;
-@@ -148,7 +150,8 @@ static int get_tapdisk_pid(blkif_t *blki
- * return 0 on success, -1 on error.
- */
-
--static int test_path(char *path, char **dev, int *type, blkif_t **blkif)
-+static int test_path(char *path, char **dev, int *type, blkif_t **blkif,
-+ int* use_ioemu)
- {
- char *ptr, handle[10];
- int i, size, found = 0;
-@@ -174,6 +177,7 @@ static int test_path(char *path, char **
- }
-
- if (found) {
-+ *use_ioemu = dtypes[i]->use_ioemu;
- *type = dtypes[i]->idnum;
-
- if (dtypes[i]->single_handler == 1) {
-@@ -185,6 +189,7 @@ static int test_path(char *path, char **
- *blkif = active_disks[dtypes[i]
- ->idnum]->blkif;
- }
-+
- return 0;
- }
- }
-@@ -474,6 +479,7 @@ static int launch_tapdisk_provider(char
- return child;
- }
-
-+#ifndef ALWAYS_USE_IOEMU
- static int launch_tapdisk(char *wrctldev, char *rdctldev)
- {
- char *argv[] = { "tapdisk", wrctldev, rdctldev, NULL };
-@@ -483,6 +489,7 @@ static int launch_tapdisk(char *wrctldev
-
- return 0;
- }
-+#endif
-
- static int launch_tapdisk_ioemu(void)
- {
-@@ -505,7 +512,8 @@ static int connect_qemu(blkif_t *blkif,
- static int tapdisk_ioemu_pid = 0;
- static int dom0_readfd = 0;
- static int dom0_writefd = 0;
--
-+ int refresh_pid = 0;
-+
- if (asprintf(&rdctldev, BLKTAP_CTRL_DIR "/qemu-read-%d", domid) < 0)
- return -1;
-
-@@ -524,15 +532,23 @@ static int connect_qemu(blkif_t *blkif,
- if (tapdisk_ioemu_pid == 0 || kill(tapdisk_ioemu_pid, 0)) {
- /* No device model and tapdisk-ioemu doesn't run yet */
- DPRINTF("Launching tapdisk-ioemu\n");
-- tapdisk_ioemu_pid = launch_tapdisk_ioemu();
-+ launch_tapdisk_ioemu();
-
- dom0_readfd = open_ctrl_socket(wrctldev);
- dom0_writefd = open_ctrl_socket(rdctldev);
-+
-+ refresh_pid = 1;
- }
-
- DPRINTF("Using tapdisk-ioemu connection\n");
- blkif->fds[READ] = dom0_readfd;
- blkif->fds[WRITE] = dom0_writefd;
-+
-+ if (refresh_pid) {
-+ get_tapdisk_pid(blkif);
-+ tapdisk_ioemu_pid = blkif->tappid;
-+ }
-+
- } else if (access(rdctldev, R_OK | W_OK) == 0) {
- /* Use existing pipe to the device model */
- DPRINTF("Using qemu-dm connection\n");
-@@ -554,6 +570,7 @@ static int connect_qemu(blkif_t *blkif,
- return 0;
- }
-
-+#ifndef ALWAYS_USE_IOEMU
- /* Launch tapdisk instance */
- static int connect_tapdisk(blkif_t *blkif, int minor)
- {
-@@ -597,6 +614,7 @@ fail:
-
- return ret;
- }
-+#endif
-
- static int blktapctrl_new_blkif(blkif_t *blkif)
- {
-@@ -606,13 +624,14 @@ static int blktapctrl_new_blkif(blkif_t
- image_t *image;
- blkif_t *exist = NULL;
- static uint16_t next_cookie = 0;
-+ int use_ioemu;
-
- DPRINTF("Received a poll for a new vbd\n");
- if ( ((blk=blkif->info) != NULL) && (blk->params != NULL) ) {
- if (blktap_interface_create(ctlfd, &major, &minor, blkif) < 0)
- return -1;
-
-- if (test_path(blk->params, &ptr, &type, &exist) != 0) {
-+ if (test_path(blk->params, &ptr, &type, &exist, &use_ioemu) != 0) {
- DPRINTF("Error in blktap device string(%s).\n",
- blk->params);
- goto fail;
-@@ -621,13 +640,18 @@ static int blktapctrl_new_blkif(blkif_t
- blkif->cookie = next_cookie++;
-
- if (!exist) {
-- if (type == DISK_TYPE_IOEMU) {
-+#ifdef ALWAYS_USE_IOEMU
-+ if (connect_qemu(blkif, blkif->domid))
-+ goto fail;
-+#else
-+ if (use_ioemu) {
- if (connect_qemu(blkif, blkif->domid))
- goto fail;
- } else {
- if (connect_tapdisk(blkif, minor))
- goto fail;
- }
-+#endif
-
- } else {
- DPRINTF("Process exists!\n");
-Index: xen-3.3.1-testing/tools/blktap/drivers/tapdisk.h
-===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/tapdisk.h
-+++ xen-3.3.1-testing/tools/blktap/drivers/tapdisk.h
-@@ -145,6 +145,8 @@ typedef struct disk_info {
- char handle[10]; /* xend handle, e.g. 'ram' */
- int single_handler; /* is there a single controller for all */
- /* instances of disk type? */
-+ int use_ioemu; /* backend provider: 0 = tapdisk; 1 = ioemu */
-+
- #ifdef TAPDISK
- struct tap_disk *drv;
- #endif
-@@ -166,6 +168,7 @@ static disk_info_t aio_disk = {
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/tapdisk.h
++++ xen-3.4.0-testing/tools/blktap/drivers/tapdisk.h
+@@ -168,7 +168,7 @@ static disk_info_t aio_disk = {
"raw image (aio)",
"aio",
0,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_aio,
#endif
-@@ -176,6 +179,7 @@ static disk_info_t sync_disk = {
+@@ -179,7 +179,7 @@ static disk_info_t sync_disk = {
"raw image (sync)",
"sync",
0,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_sync,
#endif
-@@ -186,6 +190,7 @@ static disk_info_t vmdk_disk = {
+@@ -190,7 +190,7 @@ static disk_info_t vmdk_disk = {
"vmware image (vmdk)",
"vmdk",
1,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_vmdk,
#endif
-@@ -196,6 +201,7 @@ static disk_info_t ram_disk = {
- "ramdisk image (ram)",
- "ram",
- 1,
-+ 0,
- #ifdef TAPDISK
- &tapdisk_ram,
- #endif
-@@ -206,6 +212,7 @@ static disk_info_t qcow_disk = {
+@@ -212,7 +212,7 @@ static disk_info_t qcow_disk = {
"qcow disk (qcow)",
"qcow",
0,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_qcow,
#endif
-@@ -216,6 +223,7 @@ static disk_info_t qcow2_disk = {
+@@ -223,7 +223,7 @@ static disk_info_t qcow2_disk = {
"qcow2 disk (qcow2)",
"qcow2",
0,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_qcow2,
#endif
-@@ -226,6 +234,7 @@ static disk_info_t ioemu_disk = {
- "ioemu disk",
- "ioemu",
- 1,
-+ 1,
- #ifdef TAPDISK
- NULL
- #endif
++++++ blktap.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,11 +1,11 @@
bug #239173
bug #242953
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -2618,7 +2618,7 @@ class XendDomainInfo:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -2939,7 +2939,7 @@ class XendDomainInfo:
(fn, BOOTLOADER_LOOPBACK_DEVICE))
vbd = {
@@ -14,26 +14,26 @@
'device': BOOTLOADER_LOOPBACK_DEVICE,
}
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -151,9 +151,9 @@ void xenstore_parse_domain_config(int hv
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -311,9 +311,9 @@ void xenstore_parse_domain_config(int hv
{
- char **e = NULL;
- char *buf = NULL, *path;
+ char **e_danger = NULL;
+ char *buf = NULL;
- char *fpath = NULL, *bpath = NULL,
+ char *fpath = NULL, *bpath = NULL, *btype = NULL,
- *dev = NULL, *params = NULL, *type = NULL, *drv = NULL;
+ *dev = NULL, *params = NULL, *drv = NULL;
- int i, any_hdN = 0, ret;
+ int i, any_hdN = 0, ret, is_tap;
unsigned int len, num, hd_index, pci_devid = 0;
BlockDriverState *bs;
BlockDriver *format;
-@@ -188,6 +188,14 @@ void xenstore_parse_domain_config(int hv
- bpath = xs_read(xsh, XBT_NULL, buf, &len);
+@@ -353,6 +353,14 @@ void xenstore_parse_domain_config(int hv
+ e_danger[i]);
if (bpath == NULL)
- continue;
+ continue;
+ /* check to see if type is tap or not */
+ if (pasprintf(&buf, "%s/type", bpath) == -1)
+ continue;
@@ -45,11 +45,11 @@
/* read the name of the device */
if (pasprintf(&buf, "%s/dev", bpath) == -1)
continue;
-@@ -432,6 +440,7 @@ void xenstore_parse_domain_config(int hv
- free(type);
+@@ -662,6 +670,7 @@ void xenstore_parse_domain_config(int hv
+ free(danger_type);
free(params);
free(dev);
+ free(btype);
free(bpath);
free(buf);
- free(path);
+ free(danger_buf);
++++++ blktap-pv-cdrom.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,5 +1,7 @@
+Index: xen-3.4.0-testing/tools/blktap/drivers/block-cdrom.c
+===================================================================
--- /dev/null
-+++ b/tools/blktap/drivers/block-cdrom.c
++++ xen-3.4.0-testing/tools/blktap/drivers/block-cdrom.c
@@ -0,0 +1,536 @@
+/* block-cdrom.c
+ *
@@ -537,8 +539,10 @@
+ .td_get_parent_id = tdcdrom_get_parent_id,
+ .td_validate_parent = tdcdrom_validate_parent
+};
+Index: xen-3.4.0-testing/xen/include/public/io/cdromif.h
+===================================================================
--- /dev/null
-+++ b/xen/include/public/io/cdromif.h
++++ xen-3.4.0-testing/xen/include/public/io/cdromif.h
@@ -0,0 +1,120 @@
+/******************************************************************************
+ * cdromif.h
@@ -660,10 +664,12 @@
+ sizeof(struct vcd_generic_command) - sizeof(struct request_sense))
+
+#endif
---- a/tools/blktap/drivers/Makefile
-+++ b/tools/blktap/drivers/Makefile
-@@ -24,8 +24,9 @@ CRYPT_LIB := -lcrypto
- $(warning *** libgcrypt not installed: falling back to libcrypto ***)
+Index: xen-3.4.0-testing/tools/blktap/drivers/Makefile
+===================================================================
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/Makefile
++++ xen-3.4.0-testing/tools/blktap/drivers/Makefile
+@@ -20,8 +20,9 @@ CRYPT_LIB := -lcrypto
+ $(warning === libgcrypt not installed: falling back to libcrypto ===)
endif
-LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) -L../lib -lblktap
@@ -674,7 +680,7 @@
BLK-OBJS-y := block-aio.o
BLK-OBJS-y += block-sync.o
-@@ -33,6 +34,7 @@ BLK-OBJS-y += block-vmdk.o
+@@ -29,6 +30,7 @@ BLK-OBJS-y += block-vmdk.o
BLK-OBJS-y += block-ram.o
BLK-OBJS-y += block-qcow.o
BLK-OBJS-y += block-qcow2.o
@@ -682,8 +688,10 @@
BLK-OBJS-y += aes.o
BLK-OBJS-y += tapaio.o
BLK-OBJS-$(CONFIG_Linux) += blk_linux.o
---- a/tools/blktap/drivers/tapdisk.h
-+++ b/tools/blktap/drivers/tapdisk.h
+Index: xen-3.4.0-testing/tools/blktap/drivers/tapdisk.h
+===================================================================
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/tapdisk.h
++++ xen-3.4.0-testing/tools/blktap/drivers/tapdisk.h
@@ -137,6 +137,9 @@ struct tap_disk {
int (*td_get_parent_id) (struct disk_driver *dd, struct disk_id *id);
int (*td_validate_parent)(struct disk_driver *dd,
@@ -702,7 +710,7 @@
/*Define Individual Disk Parameters here */
-@@ -240,6 +244,17 @@ static disk_info_t ioemu_disk = {
+@@ -229,6 +233,17 @@ static disk_info_t qcow2_disk = {
#endif
};
@@ -720,26 +728,30 @@
/*Main disk info array */
static disk_info_t *dtypes[] = {
&aio_disk,
-@@ -249,6 +264,7 @@ static disk_info_t *dtypes[] = {
+@@ -237,6 +252,7 @@ static disk_info_t *dtypes[] = {
+ &ram_disk,
&qcow_disk,
&qcow2_disk,
- &ioemu_disk,
+ &cdrom_disk,
};
typedef struct driver_list_entry {
---- a/tools/blktap/lib/blktaplib.h
-+++ b/tools/blktap/lib/blktaplib.h
-@@ -221,6 +221,7 @@ typedef struct msg_pid {
+Index: xen-3.4.0-testing/tools/blktap/lib/blktaplib.h
+===================================================================
+--- xen-3.4.0-testing.orig/tools/blktap/lib/blktaplib.h
++++ xen-3.4.0-testing/tools/blktap/lib/blktaplib.h
+@@ -220,6 +220,7 @@ typedef struct msg_pid {
+ #define DISK_TYPE_RAM 3
#define DISK_TYPE_QCOW 4
#define DISK_TYPE_QCOW2 5
- #define DISK_TYPE_IOEMU 6
-+#define DISK_TYPE_CDROM 7
++#define DISK_TYPE_CDROM 6
/* xenstore/xenbus: */
#define DOMNAME "Domain-0"
---- a/xen/include/public/io/blkif.h
-+++ b/xen/include/public/io/blkif.h
+Index: xen-3.4.0-testing/xen/include/public/io/blkif.h
+===================================================================
+--- xen-3.4.0-testing.orig/xen/include/public/io/blkif.h
++++ xen-3.4.0-testing/xen/include/public/io/blkif.h
@@ -76,6 +76,10 @@
* "feature-flush-cache" node!
*/
@@ -751,8 +763,10 @@
/*
* Maximum scatter/gather segments per request.
---- a/tools/blktap/drivers/tapdisk.c
-+++ b/tools/blktap/drivers/tapdisk.c
+Index: xen-3.4.0-testing/tools/blktap/drivers/tapdisk.c
+===================================================================
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/tapdisk.c
++++ xen-3.4.0-testing/tools/blktap/drivers/tapdisk.c
@@ -735,6 +735,22 @@ static void get_io_request(struct td_sta
goto out;
}
@@ -776,16 +790,15 @@
default:
DPRINTF("Unknown block operation\n");
break;
---- a/tools/python/xen/xend/server/BlktapController.py
-+++ b/tools/python/xen/xend/server/BlktapController.py
-@@ -14,8 +14,8 @@ blktap_disk_types = [
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/BlktapController.py
+===================================================================
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/BlktapController.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/BlktapController.py
+@@ -14,6 +14,7 @@ blktap_disk_types = [
'ram',
'qcow',
'qcow2',
--
-- 'ioemu'
-+ 'ioemu',
+ 'cdrom',
- ]
- class BlktapController(BlkifController):
+ 'ioemu',
+ 'tapdisk',
++++++ block-flags.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/block
+Index: xen-3.4.0-testing/tools/hotplug/Linux/block
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/block
-+++ xen-3.3.1-testing/tools/examples/block
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/block
++++ xen-3.4.0-testing/tools/hotplug/Linux/block
@@ -225,11 +225,14 @@ case "$command" in
;;
++++++ block-iscsi ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -23,8 +23,7 @@
unset dev
for session in /sys/class/iscsi_session/session*; do
if [ "$1" = "`cat $session/targetname`" ]; then
- dev=`readlink $session/device/target*/*:0:*/block*`
- dev=${dev##*/}
+ dev=`basename $session/device/target*/*:0:*/block*/*`
return
fi
done
@@ -34,8 +33,7 @@
{
unset tgt
for session in /sys/class/iscsi_session/session*; do
- dev=`readlink $session/device/target*/*:0:*/block*`
- dev=${dev##*/}
+ dev=`basename $session/device/target*/*:0:*/block*/*`
if [ "$dev" = "$1" ]; then
tgt=`cat $session/targetname`
return
++++++ block-losetup-retry.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/block
+Index: xen-3.4.0-testing/tools/hotplug/Linux/block
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/block
-+++ xen-3.3.1-testing/tools/examples/block
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/block
++++ xen-3.4.0-testing/tools/hotplug/Linux/block
@@ -241,107 +241,111 @@ case "$command" in
mount it read-write in a guest domain."
fi
++++++ bridge-bonding.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.3.1-testing/tools/examples/network-bridge
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
@@ -241,6 +241,9 @@ op_start () {
return
fi
@@ -12,14 +12,19 @@
vlans=$(find_active_vlans "${netdev}")
for vlan in $vlans ; do ifdown $vlan ; done
-@@ -254,13 +257,27 @@ op_start () {
+@@ -258,18 +261,32 @@ op_start () {
ip link set ${netdev} down
ip addr flush ${netdev}
fi
- ip link set ${netdev} name ${pdev}
- ip link set ${tdev} name ${bridge}
-
+-
- setup_bridge_port ${pdev}
+
+- # Restore slaves
+- if [ -n "${slaves}" ]; then
+- ip link set ${pdev} up
+- ifenslave ${pdev} ${slaves}
+ if [ "x${bonded}" = "xyes" ]
+ then
+ ip link set ${tdev} name ${bridge}
@@ -36,12 +41,17 @@
+ ip link set ${tdev} name ${bridge}
+
+ setup_bridge_port ${pdev}
-
-- add_to_bridge2 ${bridge} ${pdev}
-- do_ifup ${bridge}
++
++ # Restore slaves
++ if [ -n "${slaves}" ]; then
++ ip link set ${pdev} up
++ ifenslave ${pdev} ${slaves}
++ fi
+ add_to_bridge2 ${bridge} ${pdev}
+ do_ifup ${bridge}
-+ fi
+ fi
+- add_to_bridge2 ${bridge} ${pdev}
+- do_ifup ${bridge}
for vlan in $vlans ; do ifup $vlan ; done
++++++ bridge-hostonly.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -22,11 +22,11 @@
tools/examples/network-bridge | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
-Index: xen-3.2.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.2.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.2.1-testing/tools/examples/network-bridge
-@@ -305,6 +305,31 @@ op_stop () {
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
+@@ -316,6 +316,31 @@ op_stop () {
for vlan in $vlans ; do ifup $vlan ; done
}
@@ -58,7 +58,7 @@
# adds $dev to $bridge but waits for $dev to be in running state first
add_to_bridge2() {
local bridge=$1
-@@ -330,11 +355,19 @@ add_to_bridge2() {
+@@ -341,11 +366,19 @@ add_to_bridge2() {
case "$command" in
start)
++++++ bridge-opensuse.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.3.1-testing/tools/examples/network-bridge
-@@ -253,18 +253,18 @@ op_stop () {
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
+@@ -262,18 +262,18 @@ op_stop () {
transfer_addrs ${bridge} ${pdev}
if ! ifdown ${bridge}; then
get_ip_info ${bridge}
++++++ bridge-record-creation.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.3.1-testing/tools/examples/network-bridge
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
@@ -249,6 +249,11 @@ op_start () {
create_bridge ${tdev}
@@ -13,8 +13,8 @@
+
preiftransfer ${netdev}
transfer_addrs ${netdev} ${tdev}
- if ! ifdown ${netdev}; then
-@@ -313,6 +318,13 @@ op_stop () {
+ # Remember slaves for bonding interface.
+@@ -322,6 +327,13 @@ op_stop () {
ip link set ${pdev} name ${netdev}
do_ifup ${netdev}
++++++ bridge-vlan.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.3.1-testing/tools/examples/network-bridge
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
@@ -191,6 +191,28 @@ antispoofing () {
iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT
}
@@ -41,7 +41,7 @@
create_bridge ${tdev}
preiftransfer ${netdev}
-@@ -237,6 +262,8 @@ op_start () {
+@@ -246,6 +271,8 @@ op_start () {
add_to_bridge2 ${bridge} ${pdev}
do_ifup ${bridge}
@@ -50,7 +50,7 @@
if [ ${antispoof} = 'yes' ] ; then
antispoofing
fi
-@@ -250,6 +277,9 @@ op_stop () {
+@@ -259,6 +286,9 @@ op_stop () {
return
fi
@@ -60,7 +60,7 @@
transfer_addrs ${bridge} ${pdev}
if ! ifdown ${bridge}; then
get_ip_info ${bridge}
-@@ -265,6 +295,8 @@ op_stop () {
+@@ -274,6 +304,8 @@ op_stop () {
ip link set ${pdev} down
ip link set ${pdev} name ${netdev}
do_ifup ${netdev}
++++++ build-tapdisk-ioemu.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,10 +1,27 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/Makefile
+From f1ebeae7802a5775422004f62630c42e46dcf664 Mon Sep 17 00:00:00 2001
+From: Kevin Wolf <kwolf(a)suse.de>
+Date: Tue, 10 Mar 2009 16:32:40 +0100
+Subject: [PATCH 3/6] ioemu: Build tapdisk-ioemu binary
+
+When changing away from the old ioemu, changes in the Makefiles
+resulted in tapdisk-ioemu appearing there, but actually not
+being built. This patch re-enables the build of tapdisk-ioemu.
+
+Signed-off-by: Kevin Wolf <kwolf(a)suse.de>
+---
+ Makefile | 22 +++++++++++++++-------
+ configure | 2 +-
+ qemu-tool.c | 2 +-
+ tapdisk-ioemu.c | 17 -----------------
+ 4 files changed, 17 insertions(+), 26 deletions(-)
+
+Index: xen-3.4.0-testing/tools/ioemu-remote/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/Makefile
-+++ xen-3.3.1-testing/tools/ioemu-remote/Makefile
-@@ -31,13 +31,6 @@ subdir-%: libqemu_common.a
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/Makefile
++++ xen-3.4.0-testing/tools/ioemu-remote/Makefile
+@@ -46,13 +46,6 @@ $(filter %-user,$(SUBDIR_RULES)): libqem
- recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS))
+ recurse-all: $(SUBDIR_RULES)
-tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
-tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
@@ -16,9 +33,9 @@
#######################################################################
# BLOCK_OBJS is code used by both qemu system emulation and qemu-img
-@@ -46,6 +39,21 @@ BLOCK_OBJS+=block-cow.o block-qcow.o aes
- BLOCK_OBJS+=block-dmg.o block-bochs.o block-vpc.o block-vvfat.o
- BLOCK_OBJS+=block-qcow2.o block-parallels.o
+@@ -71,6 +64,21 @@ endif
+ BLOCK_OBJS += block-raw-posix.o
+ endif
+#######################################################################
+# tapdisk-ioemu
@@ -32,22 +49,91 @@
+tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
+tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
+tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/include
-+tapdisk-ioemu: tapdisk-ioemu.o $(BLOCK_OBJS) qemu-img-block.o qemu-img-block-raw-posix.o hw/tapdisk-xen_blktap.o
++tapdisk-ioemu: tapdisk-ioemu.o $(BLOCK_OBJS) qemu-tool.o hw/tapdisk-xen_blktap.o
+ $(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
+
######################################################################
# libqemu_common.a: Target independent part of system emulation. The
# long term path is to suppress *all* target specific code in case of
-Index: xen-3.3.1-testing/tools/ioemu-remote/configure
+Index: xen-3.4.0-testing/tools/ioemu-remote/configure
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/configure
-+++ xen-3.3.1-testing/tools/ioemu-remote/configure
-@@ -1150,7 +1150,7 @@ fi
-
- echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/configure
++++ xen-3.4.0-testing/tools/ioemu-remote/configure
+@@ -1508,7 +1508,7 @@ bsd)
+ ;;
+ esac
-tools=
+tools="tapdisk-ioemu"
if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
tools="qemu-img\$(EXESUF) $tools"
- fi
+ if [ "$linux" = "yes" ] ; then
+Index: xen-3.4.0-testing/tools/ioemu-remote/qemu-tool.c
+===================================================================
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/qemu-tool.c
++++ xen-3.4.0-testing/tools/ioemu-remote/qemu-tool.c
+@@ -68,7 +68,7 @@ void qemu_bh_delete(QEMUBH *bh)
+ qemu_free(bh);
+ }
+
+-int qemu_set_fd_handler2(int fd,
++int __attribute__((weak)) qemu_set_fd_handler2(int fd,
+ IOCanRWHandler *fd_read_poll,
+ IOHandler *fd_read,
+ IOHandler *fd_write,
+Index: xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
+===================================================================
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
++++ xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
+@@ -12,34 +12,12 @@
+
+ extern void qemu_aio_init(void);
+ extern void qemu_aio_poll(void);
+-extern void bdrv_init(void);
+-
+-extern void *qemu_mallocz(size_t size);
+-extern void qemu_free(void *ptr);
+
+ extern void *fd_start;
+
+ int domid = 0;
+ FILE* logfile;
+
+-void term_printf(const char *fmt, ...)
+-{
+- va_list ap;
+- va_start(ap, fmt);
+- vprintf(fmt, ap);
+- va_end(ap);
+-}
+-
+-void term_print_filename(const char *filename)
+-{
+- term_printf(filename);
+-}
+-
+-
+-typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size);
+-typedef int IOCanRWHandler(void *opaque);
+-typedef void IOHandler(void *opaque);
+-
+ typedef struct IOHandlerRecord {
+ int fd;
+ IOCanRWHandler *fd_read_poll;
+@@ -103,7 +81,6 @@ int main(void)
+ logfile = stderr;
+
+ bdrv_init();
+- qemu_aio_init();
+ init_blktap();
+
+ /* Daemonize */
+@@ -115,8 +92,6 @@ int main(void)
+ * completed aio operations.
+ */
+ while (1) {
+- qemu_aio_poll();
+-
+ max_fd = -1;
+ FD_ZERO(&rfds);
+ for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next)
++++++ cdrom-removable.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/HalDaemon.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/HalDaemon.py
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/HalDaemon.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/HalDaemon.py
@@ -0,0 +1,243 @@
+#!/usr/bin/env python
+# -*- mode: python; -*-
@@ -246,10 +246,10 @@
+ print 'Falling off end'
+
+
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/Hald.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/Hald.py
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/Hald.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/Hald.py
@@ -0,0 +1,125 @@
+#============================================================================
+# This library is free software; you can redistribute it and/or
@@ -376,10 +376,10 @@
+ watcher.run()
+ time.sleep(10)
+ watcher.shutdown()
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/SrvServer.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/SrvServer.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/SrvServer.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/SrvServer.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/SrvServer.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/SrvServer.py
@@ -56,6 +56,7 @@ from xen.web.SrvDir import SrvDir
from SrvRoot import SrvRoot
@@ -397,12 +397,12 @@
def create():
root = SrvDir()
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -333,6 +333,19 @@ void xenstore_parse_domain_config(int hv
- if (bdrv_open2(bs, params, 0 /* snapshot */, format) < 0)
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -503,6 +503,19 @@ void xenstore_parse_domain_config(int hv
+ if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0)
fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0");
}
+ /* if cdrom pyhsical put a watch on media-present */
@@ -420,8 +420,8 @@
+ }
drives_table[nb_drives].bdrv = bs;
- nb_drives++;
-@@ -631,6 +644,50 @@ void xenstore_record_dm_state(char *stat
+ drives_table[nb_drives].used = 1;
+@@ -920,6 +933,50 @@ void xenstore_record_dm_state(const char
xenstore_record_dm("state", state);
}
@@ -472,7 +472,7 @@
void xenstore_process_event(void *opaque)
{
char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL;
-@@ -650,6 +707,11 @@ void xenstore_process_event(void *opaque
+@@ -939,6 +996,11 @@ void xenstore_process_event(void *opaque
goto out;
}
++++++ checkpoint-rename.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendCheckpoint.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendCheckpoint.py
-@@ -144,7 +144,7 @@ def save(fd, dominfo, network, live, dst
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
+@@ -151,7 +151,7 @@ def save(fd, dominfo, network, live, dst
dominfo.destroy()
dominfo.testDeviceComplete()
try:
++++++ disable_emulated_device.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
+Index: xen-3.4.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
===================================================================
---- xen-3.3.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c 2009-01-05 13:27:56.000000000 -0700
-+++ xen-3.3.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c 2009-02-24 12:09:53.000000000 -0700
-@@ -296,6 +296,11 @@
+--- xen-3.4.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
++++ xen-3.4.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
+@@ -301,6 +301,11 @@ static int __devinit platform_pci_init(s
platform_mmio = mmio_addr;
platform_mmiolen = mmio_len;
++++++ dom-print.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,6 +1,8 @@
---- a/xen/arch/x86/domain.c
-+++ b/xen/arch/x86/domain.c
-@@ -135,7 +135,7 @@ void dump_pageframe_info(struct domain *
+Index: xen-3.4.0-testing/xen/arch/x86/domain.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/domain.c
++++ xen-3.4.0-testing/xen/arch/x86/domain.c
+@@ -143,7 +143,7 @@ void dump_pageframe_info(struct domain *
printk("Memory pages belonging to domain %u:\n", d->domain_id);
@@ -9,9 +11,9 @@
{
printk(" DomPage list too long to display\n");
}
-@@ -143,6 +143,15 @@ void dump_pageframe_info(struct domain *
+@@ -151,6 +151,15 @@ void dump_pageframe_info(struct domain *
{
- list_for_each_entry ( page, &d->page_list, list )
+ page_list_for_each ( page, &d->page_list )
{
+ if ( d->tot_pages > 16 )
+ {
@@ -25,17 +27,3 @@
printk(" DomPage %p: caf=%08lx, taf=%" PRtype_info "\n",
_p(page_to_mfn(page)),
page->count_info, page->u.inuse.type_info);
---- a/xen/common/keyhandler.c
-+++ b/xen/common/keyhandler.c
-@@ -192,9 +192,9 @@ static void dump_domains(unsigned char k
- {
- printk("General information for domain %u:\n", d->domain_id);
- cpuset_print(tmpstr, sizeof(tmpstr), d->domain_dirty_cpumask);
-- printk(" refcnt=%d nr_pages=%d xenheap_pages=%d "
-+ printk(" refcnt=%d dying=%d nr_pages=%d xenheap_pages=%d "
- "dirty_cpus=%s\n",
-- atomic_read(&d->refcnt),
-+ atomic_read(&d->refcnt), d->is_dying,
- d->tot_pages, d->xenheap_pages, tmpstr);
- printk(" handle=%02x%02x%02x%02x-%02x%02x-%02x%02x-"
- "%02x%02x-%02x%02x%02x%02x%02x%02x vm_assist=%08lx\n",
++++++ domUloader.py ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -164,7 +164,7 @@
for line in fd.readlines():
line = line.strip()
verbose_print("kpartx -l: %s" % (line,))
- (pname, params) = line.split(':')
+ (pname, params) = line.split(' : ')
pname = pname.strip()
pno = int(traildigits(pname))
#if pname.rfind('/') != -1:
++++++ dump-exec-state.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/xen/arch/ia64/linux-xen/smp.c
+Index: xen-3.4.0-testing/xen/arch/ia64/linux-xen/smp.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/ia64/linux-xen/smp.c
-+++ xen-3.3.1-testing/xen/arch/ia64/linux-xen/smp.c
-@@ -175,7 +175,7 @@ handle_IPI (int irq, void *dev_id, struc
+--- xen-3.4.0-testing.orig/xen/arch/ia64/linux-xen/smp.c
++++ xen-3.4.0-testing/xen/arch/ia64/linux-xen/smp.c
+@@ -190,7 +190,7 @@ handle_IPI (int irq, void *dev_id, struc
* At this point the structure may be gone unless
* wait is true.
*/
@@ -11,10 +11,10 @@
/* Notify the sending CPU that the task is done. */
mb();
-Index: xen-3.3.1-testing/xen/arch/x86/smp.c
+Index: xen-3.4.0-testing/xen/arch/x86/smp.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/smp.c
-+++ xen-3.3.1-testing/xen/arch/x86/smp.c
+--- xen-3.4.0-testing.orig/xen/arch/x86/smp.c
++++ xen-3.4.0-testing/xen/arch/x86/smp.c
@@ -356,7 +356,7 @@ fastcall void smp_call_function_interrup
if ( call_data->wait )
@@ -33,10 +33,10 @@
}
irq_exit();
-Index: xen-3.3.1-testing/xen/common/keyhandler.c
+Index: xen-3.4.0-testing/xen/common/keyhandler.c
===================================================================
---- xen-3.3.1-testing.orig/xen/common/keyhandler.c
-+++ xen-3.3.1-testing/xen/common/keyhandler.c
+--- xen-3.4.0-testing.orig/xen/common/keyhandler.c
++++ xen-3.4.0-testing/xen/common/keyhandler.c
@@ -91,14 +91,25 @@ static void show_handlers(unsigned char
key_table[i].desc);
}
@@ -83,10 +83,10 @@
on_selected_cpus(cpumask_of_cpu(cpu), __dump_execstate, NULL, 1, 1);
}
-Index: xen-3.3.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
+Index: xen-3.4.0-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
===================================================================
---- xen-3.3.1-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h
-+++ xen-3.3.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
+--- xen-3.4.0-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h
++++ xen-3.4.0-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
@@ -278,7 +278,7 @@ struct switch_stack {
# define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1)
# define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr)
++++++ hv_tools.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,81 +1,83 @@
-Index: xen-3.3.1-testing/tools/python/xen/lowlevel/xc/xc.c
+Index: xen-3.4.0-testing/tools/python/xen/lowlevel/xc/xc.c
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c
-+++ xen-3.3.1-testing/tools/python/xen/lowlevel/xc/xc.c
+--- xen-3.4.0-testing.orig/tools/python/xen/lowlevel/xc/xc.c
++++ xen-3.4.0-testing/tools/python/xen/lowlevel/xc/xc.c
@@ -890,14 +890,14 @@ static PyObject *pyxc_hvm_build(XcObject
int i;
#endif
char *image;
-- int memsize, vcpus = 1, acpi = 0, apic = 1;
-+ int memsize, vcpus = 1, acpi = 0, apic = 1, extid = 0;
+- int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1;
++ int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1, extid=0;
static char *kwd_list[] = { "domid",
-- "memsize", "image", "vcpus", "acpi",
-+ "memsize", "image", "vcpus", "extid", "acpi",
- "apic", NULL };
-- if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iii", kwd_list,
-+ if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiii", kwd_list,
- &dom, &memsize,
-- &image, &vcpus, &acpi, &apic) )
-+ &image, &vcpus, &extid, &acpi, &apic) )
+- "memsize", "image", "target", "vcpus", "acpi",
+- "apic", NULL };
+- if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiii", kwd_list,
+- &dom, &memsize, &image, &target, &vcpus,
+- &acpi, &apic) )
++ "memsize", "image", "target", "vcpus", "extid",
++ "acpi", "apic", NULL };
++ if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiiii", kwd_list,
++ &dom, &memsize, &image, &target, &extid,
++ &vcpus, &acpi, &apic) )
return NULL;
- if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
-@@ -922,6 +922,7 @@ static PyObject *pyxc_hvm_build(XcObject
- va_hvm->checksum = -sum;
+ if ( target == -1 )
+@@ -923,6 +923,7 @@ static PyObject *pyxc_hvm_build(XcObject
+ va_hvm->checksum -= sum;
munmap(va_map, XC_PAGE_SIZE);
#endif
+ xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_EXTEND_HYPERVISOR, extid);
return Py_BuildValue("{}");
}
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendConfig.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendConfig.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
-@@ -141,6 +141,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendConfig.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendConfig.py
+@@ -143,6 +143,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
'monitor': int,
'nographic': int,
'pae' : int,
-+ 'extid': int,
++ 'extid': int,
'rtc_timeoffset': int,
'serial': str,
'sdl': int,
-Index: xen-3.3.1-testing/tools/python/xen/xend/image.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/image.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/image.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/image.py
-@@ -703,6 +703,7 @@ class HVMImageHandler(ImageHandler):
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/image.py
++++ xen-3.4.0-testing/tools/python/xen/xend/image.py
+@@ -764,6 +764,7 @@ class HVMImageHandler(ImageHandler):
self.apic = int(vmConfig['platform'].get('apic', 0))
self.acpi = int(vmConfig['platform'].get('acpi', 0))
+ self.extid = int(vmConfig['platform'].get('extid', 0))
self.guest_os_type = vmConfig['platform'].get('guest_os_type')
-
-@@ -809,6 +810,7 @@ class HVMImageHandler(ImageHandler):
- log.debug("store_evtchn = %d", store_evtchn)
- log.debug("memsize = %d", mem_mb)
+
+@@ -880,6 +881,7 @@ class HVMImageHandler(ImageHandler):
+ log.debug("memsize = %d", memmax_mb)
+ log.debug("target = %d", mem_mb)
log.debug("vcpus = %d", self.vm.getVCpuCount())
+ log.debug("extid = %d", self.extid)
log.debug("acpi = %d", self.acpi)
log.debug("apic = %d", self.apic)
-@@ -816,6 +818,7 @@ class HVMImageHandler(ImageHandler):
- image = self.loader,
- memsize = mem_mb,
+@@ -888,6 +890,7 @@ class HVMImageHandler(ImageHandler):
+ memsize = memmax_mb,
+ target = mem_mb,
vcpus = self.vm.getVCpuCount(),
+ extid = self.extid,
acpi = self.acpi,
apic = self.apic)
rc['notes'] = { 'SUSPEND_CANCEL': 1 }
-Index: xen-3.3.1-testing/tools/python/xen/xm/create.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/create.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/create.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/create.py
-@@ -218,6 +218,10 @@ gopts.var('timer_mode', val='TIMER_MODE'
- use="""Timer mode (0=delay virtual time when ticks are missed;
- 1=virtual time is always wallclock time.""")
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/create.py
++++ xen-3.4.0-testing/tools/python/xen/xm/create.py
+@@ -229,6 +229,10 @@ gopts.var('viridian', val='VIRIDIAN',
+ use="""Expose Viridian interface to x86 HVM guest?
+ (Default is 0).""")
+gopts.var('extid', val='EXTID',
+ fn=set_int, default=0,
@@ -84,7 +86,7 @@
gopts.var('acpi', val='ACPI',
fn=set_int, default=1,
use="Disable or enable ACPI of HVM domain.")
-@@ -858,7 +862,7 @@ def configure_vifs(config_devs, vals):
+@@ -925,7 +929,7 @@ def configure_vifs(config_devs, vals):
def configure_hvm(config_image, vals):
"""Create the config for HVM devices.
"""
++++++ hv_xen_base.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,9 +1,9 @@
%patch
-Index: xen-3.3.1-testing/xen/include/asm-x86/hvm/domain.h
+Index: xen-3.4.0-testing/xen/include/asm-x86/hvm/domain.h
===================================================================
---- xen-3.3.1-testing.orig/xen/include/asm-x86/hvm/domain.h 2009-01-05 13:27:58.000000000 -0700
-+++ xen-3.3.1-testing/xen/include/asm-x86/hvm/domain.h 2009-02-12 10:18:31.000000000 -0700
-@@ -82,6 +82,7 @@
+--- xen-3.4.0-testing.orig/xen/include/asm-x86/hvm/domain.h
++++ xen-3.4.0-testing/xen/include/asm-x86/hvm/domain.h
+@@ -89,6 +89,7 @@ struct hvm_domain {
struct vmx_domain vmx;
struct svm_domain svm;
};
@@ -11,22 +11,22 @@
};
#endif /* __ASM_X86_HVM_DOMAIN_H__ */
-Index: xen-3.3.1-testing/xen/arch/x86/hvm/Makefile
+Index: xen-3.4.0-testing/xen/arch/x86/hvm/Makefile
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/hvm/Makefile 2009-01-05 13:27:57.000000000 -0700
-+++ xen-3.3.1-testing/xen/arch/x86/hvm/Makefile 2009-02-12 10:18:31.000000000 -0700
+--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/Makefile
++++ xen-3.4.0-testing/xen/arch/x86/hvm/Makefile
@@ -1,5 +1,6 @@
subdir-y += svm
subdir-y += vmx
-+subdir-y += hyperv
++subdir-y += hyperv
obj-y += emulate.o
obj-y += hvm.o
-Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
+Index: xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/hvm/hvm.c 2009-02-12 10:18:30.000000000 -0700
-+++ xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c 2009-02-12 10:18:31.000000000 -0700
-@@ -44,6 +44,7 @@
+--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/hvm.c
++++ xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
+@@ -45,6 +45,7 @@
#include <asm/mc146818rtc.h>
#include <asm/spinlock.h>
#include <asm/hvm/hvm.h>
@@ -34,7 +34,7 @@
#include <asm/hvm/vpt.h>
#include <asm/hvm/support.h>
#include <asm/hvm/cacheattr.h>
-@@ -361,6 +362,7 @@
+@@ -373,6 +374,7 @@ void hvm_domain_relinquish_resources(str
void hvm_domain_destroy(struct domain *d)
{
@@ -42,7 +42,7 @@
hvm_funcs.domain_destroy(d);
rtc_deinit(d);
stdvga_deinit(d);
-@@ -662,8 +664,14 @@
+@@ -673,8 +675,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
{
int rc;
@@ -57,7 +57,7 @@
if ( (rc = hvm_funcs.vcpu_initialise(v)) != 0 )
goto fail2;
-@@ -710,12 +718,14 @@
+@@ -721,12 +729,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
hvm_funcs.vcpu_destroy(v);
fail2:
vlapic_destroy(v);
@@ -72,8 +72,8 @@
hvm_vcpu_cacheattr_destroy(v);
vlapic_destroy(v);
hvm_funcs.vcpu_destroy(v);
-@@ -1663,7 +1673,7 @@
- struct vcpu *v = current;
+@@ -1678,7 +1688,7 @@ void hvm_cpuid(unsigned int input, unsig
+ return;
if ( cpuid_hypervisor_leaves(input, eax, ebx, ecx, edx) )
- return;
@@ -81,7 +81,7 @@
domain_cpuid(v->domain, input, *ecx, eax, ebx, ecx, edx);
-@@ -1675,6 +1685,8 @@
+@@ -1690,6 +1700,8 @@ void hvm_cpuid(unsigned int input, unsig
if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
__clear_bit(X86_FEATURE_APIC & 31, edx);
}
@@ -90,16 +90,16 @@
}
void hvm_rdtsc_intercept(struct cpu_user_regs *regs)
-@@ -1765,6 +1777,8 @@
- break;
+@@ -1789,6 +1801,8 @@ int hvm_msr_read_intercept(struct cpu_us
+ break;
default:
+ if (hyperx_intercept_do_msr_read(ecx, regs))
-+ return X86EMUL_OKAY;
++ return X86EMUL_OKAY;
return hvm_funcs.msr_read_intercept(regs);
}
-@@ -1853,6 +1867,8 @@
+@@ -1877,6 +1891,8 @@ int hvm_msr_write_intercept(struct cpu_u
break;
default:
@@ -108,23 +108,23 @@
return hvm_funcs.msr_write_intercept(regs);
}
-@@ -2020,6 +2036,10 @@
+@@ -2044,6 +2060,10 @@ int hvm_do_hypercall(struct cpu_user_reg
case 0:
break;
}
-+ if (hyperx_intercept_do_hypercall(regs))
++ if (hyperx_intercept_do_hypercall(regs))
+ {
+ return HVM_HCALL_completed;
+ }
- if ( (eax >= NR_hypercalls) || !hvm_hypercall32_table[eax] )
- {
-@@ -2521,6 +2541,15 @@
+ if ( (eax & 0x80000000) && is_viridian_domain(curr->domain) )
+ return viridian_hypercall(regs);
+@@ -2560,6 +2580,15 @@ long do_hvm_op(unsigned long op, XEN_GUE
rc = -EINVAL;
break;
+ case HVM_PARAM_EXTEND_HYPERVISOR:
-+ if ((a.value == 1) && hyperv_initialize(d))
++ if ((a.value == 1) && hyperv_initialize(d))
+ {
+ if (a.value != 1)
+ rc = -EINVAL;
@@ -135,22 +135,13 @@
}
if ( rc == 0 )
-Index: xen-3.3.1-testing/xen/include/public/arch-x86/hvm/save.h
+Index: xen-3.4.0-testing/xen/include/public/arch-x86/hvm/save.h
===================================================================
---- xen-3.3.1-testing.orig/xen/include/public/arch-x86/hvm/save.h 2009-01-05 13:27:58.000000000 -0700
-+++ xen-3.3.1-testing/xen/include/public/arch-x86/hvm/save.h 2009-02-12 10:18:31.000000000 -0700
-@@ -38,7 +38,7 @@
- uint32_t version; /* File format version */
- uint64_t changeset; /* Version of Xen that saved this file */
- uint32_t cpuid; /* CPUID[0x01][%eax] on the saving machine */
-- uint32_t pad0;
-+ uint32_t pad0;
- };
-
- DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
-@@ -421,9 +421,23 @@
+--- xen-3.4.0-testing.orig/xen/include/public/arch-x86/hvm/save.h
++++ xen-3.4.0-testing/xen/include/public/arch-x86/hvm/save.h
+@@ -432,9 +432,26 @@ struct hvm_viridian_context {
- DECLARE_HVM_SAVE_TYPE(MTRR, 14, struct hvm_hw_mtrr);
+ DECLARE_HVM_SAVE_TYPE(VIRIDIAN, 15, struct hvm_viridian_context);
+struct hvm_hyperv_dom {
+ uint64_t guestid_msr;
@@ -158,25 +149,28 @@
+ uint32_t long_mode;
+ uint32_t ext_id;
+};
-+DECLARE_HVM_SAVE_TYPE(HYPERV_DOM, 15, struct hvm_hyperv_dom);
++
++DECLARE_HVM_SAVE_TYPE(HYPERV_DOM, 16, struct hvm_hyperv_dom);
+
+struct hvm_hyperv_cpu {
+ uint64_t control_msr;
+ uint64_t version_msr;
+ uint64_t pad[27]; //KYS: sles10 sp2 compatibility
+};
-+DECLARE_HVM_SAVE_TYPE(HYPERV_CPU, 16, struct hvm_hyperv_cpu);
++
++DECLARE_HVM_SAVE_TYPE(HYPERV_CPU, 17, struct hvm_hyperv_cpu);
++
/*
* Largest type-code in use
*/
--#define HVM_SAVE_CODE_MAX 14
-+#define HVM_SAVE_CODE_MAX 16
+-#define HVM_SAVE_CODE_MAX 15
++#define HVM_SAVE_CODE_MAX 17
#endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */
-Index: xen-3.3.1-testing/xen/arch/x86/hvm/vlapic.c
+Index: xen-3.4.0-testing/xen/arch/x86/hvm/vlapic.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/hvm/vlapic.c 2009-02-12 10:18:30.000000000 -0700
-+++ xen-3.3.1-testing/xen/arch/x86/hvm/vlapic.c 2009-02-12 10:18:31.000000000 -0700
+--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/vlapic.c
++++ xen-3.4.0-testing/xen/arch/x86/hvm/vlapic.c
@@ -34,6 +34,7 @@
#include <asm/hvm/hvm.h>
#include <asm/hvm/io.h>
@@ -185,7 +179,7 @@
#include <asm/hvm/vmx/vmx.h>
#include <public/hvm/ioreq.h>
#include <public/hvm/params.h>
-@@ -307,6 +308,7 @@
+@@ -307,6 +308,7 @@ static int vlapic_accept_sipi(struct vcp
hvm_vcpu_reset_state(v, trampoline_vector << 8, 0);
vcpu_unpause(v);
@@ -193,17 +187,17 @@
return X86EMUL_OKAY;
}
-Index: xen-3.3.1-testing/xen/include/public/hvm/params.h
+Index: xen-3.4.0-testing/xen/include/public/hvm/params.h
===================================================================
---- xen-3.3.1-testing.orig/xen/include/public/hvm/params.h 2009-01-05 13:27:58.000000000 -0700
-+++ xen-3.3.1-testing/xen/include/public/hvm/params.h 2009-02-12 10:18:31.000000000 -0700
-@@ -93,6 +93,8 @@
- /* ACPI S state: currently support S0 and S3 on x86. */
- #define HVM_PARAM_ACPI_S_STATE 14
+--- xen-3.4.0-testing.orig/xen/include/public/hvm/params.h
++++ xen-3.4.0-testing/xen/include/public/hvm/params.h
+@@ -106,6 +106,8 @@
+ /* Boolean: Enable aligning all periodic vpts to reduce interrupts */
+ #define HVM_PARAM_VPT_ALIGN 16
--#define HVM_NR_PARAMS 15
-+#define HVM_PARAM_EXTEND_HYPERVISOR 15
+-#define HVM_NR_PARAMS 17
++#define HVM_PARAM_EXTEND_HYPERVISOR 17
+
-+#define HVM_NR_PARAMS 16
++#define HVM_NR_PARAMS 18
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
++++++ hv_xen_extension.patch ++++++
++++ 1238 lines (skipped)
++++ between xen/hv_xen_extension.patch
++++ and /mounts/work_src_done/STABLE/xen/hv_xen_extension.patch
++++++ init.xend ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -21,8 +21,7 @@
. /etc/rc.status
rc_reset
-XEND=`ps ax | grep -w xend | grep -w python | awk '{ print $1 }'`
-XEND=`echo $XEND`
+XEND=`pidofproc /usr/sbin/xend`
await_daemons_up()
{
@@ -115,7 +114,7 @@
if [ ! -z "$XEND" ]; then
echo -n "(pid $XEND) "
fi
- xend status
+ checkproc /usr/sbin/xend
;;
restart|reload)
check $1
++++++ ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch ++++++
qcow2 corruption: Fix alloc_cluster_link_l2 (Kevin Wolf)
This patch fixes a qcow2 corruption bug introduced in SVN Rev 5861. L2 tables
are big endian, so entries must be converted before being passed to functions.
This bug is easy to trigger. The following script will create and destroy a
qcow2 image (the header is gone after three loop iterations):
#!/bin/bash
qemu-img create -f qcow2 test.qcow 1M
for i in $(seq 1 10); do
qemu-system-x86_64 -hda test.qcow -monitor stdio > /dev/null 2>&1 <<EOF
savevm test-$i
quit
EOF
done
Signed-off-by: Kevin Wolf <kwolf(a)redhat.com>
Index: xen-3.4.0-testing/tools/ioemu-remote/block-qcow2.c
===================================================================
--- xen-3.4.0-testing.orig/tools/ioemu-remote/block-qcow2.c
+++ xen-3.4.0-testing/tools/ioemu-remote/block-qcow2.c
@@ -916,7 +916,7 @@ static int alloc_cluster_link_l2(BlockDr
goto err;
for (i = 0; i < j; i++)
- free_any_clusters(bs, old_cluster[i], 1);
+ free_any_clusters(bs, be64_to_cpu(old_cluster[i]), 1);
ret = 0;
err:
++++++ ioemu-blktap-barriers.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-@@ -357,6 +357,15 @@ static void qemu_send_responses(void* op
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
+@@ -362,6 +362,15 @@ static void qemu_send_responses(void* op
}
/**
@@ -18,7 +18,7 @@
* Callback function for the IO message pipe. Reads requests from the ring
* and processes them (call qemu read/write functions).
*
-@@ -375,6 +384,7 @@ static void handle_blktap_iomsg(void* pr
+@@ -380,6 +389,7 @@ static void handle_blktap_iomsg(void* pr
blkif_t *blkif = s->blkif;
tapdev_info_t *info = s->ring_info;
int page_size = getpagesize();
@@ -26,7 +26,7 @@
struct aiocb_info *aiocb_info;
-@@ -407,7 +417,7 @@ static void handle_blktap_iomsg(void* pr
+@@ -412,7 +422,7 @@ static void handle_blktap_iomsg(void* pr
/* Don't allow writes on readonly devices */
if ((s->flags & TD_RDONLY) &&
@@ -35,7 +35,7 @@
blkif->pending_list[idx].status = BLKIF_RSP_ERROR;
goto send_response;
}
-@@ -428,7 +438,7 @@ static void handle_blktap_iomsg(void* pr
+@@ -433,7 +443,7 @@ static void handle_blktap_iomsg(void* pr
DPRINTF("Sector request failed:\n");
DPRINTF("%s request, idx [%d,%d] size [%llu], "
"sector [%llu,%llu]\n",
@@ -44,7 +44,7 @@
"WRITE" : "READ"),
idx,i,
(long long unsigned)
-@@ -441,8 +451,14 @@ static void handle_blktap_iomsg(void* pr
+@@ -446,8 +456,14 @@ static void handle_blktap_iomsg(void* pr
blkif->pending_list[idx].secs_pending += nsects;
@@ -60,7 +60,7 @@
case BLKIF_OP_WRITE:
aiocb_info = malloc(sizeof(*aiocb_info));
-@@ -462,6 +478,10 @@ static void handle_blktap_iomsg(void* pr
+@@ -467,6 +483,10 @@ static void handle_blktap_iomsg(void* pr
DPRINTF("ERROR: bdrv_write() == NULL\n");
goto send_response;
}
++++++ ioemu-blktap-fv-init.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,16 +1,16 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_machine_fv.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_machine_fv.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_machine_fv.c
-@@ -185,6 +185,7 @@ void qemu_invalidate_map_cache(void)
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_machine_fv.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c
+@@ -266,6 +266,7 @@ void qemu_invalidate_entry(uint8_t *buff
#endif /* defined(MAPCACHE) */
+extern void init_blktap(void);
static void xen_init_fv(ram_addr_t ram_size, int vga_ram_size,
- const char *boot_device, DisplayState *ds,
-@@ -210,6 +211,11 @@ static void xen_init_fv(ram_addr_t ram_s
+ const char *boot_device,
+@@ -291,6 +292,11 @@ static void xen_init_fv(ram_addr_t ram_s
}
#endif
++++++ ioemu-blktap-image-format.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,51 +1,25 @@
-Index: xen-3.3.1-testing/tools/blktap/drivers/tapdisk.h
+From 5ac882a6d7499e4a36103db071203bf4d1ddfe1f Mon Sep 17 00:00:00 2001
+From: Kevin Wolf <kwolf(a)suse.de>
+Date: Tue, 10 Mar 2009 16:26:45 +0100
+Subject: [PATCH 2/6] ioemu: Use the image format sent by blktapctrl
+
+Currently the blktap backend in ioemu lets qemu guess which format an
+image is in. This was a security problem and the blktap backend
+doesn't work any more since this was fixed in qemu.
+
+This patch changes ioemu to respect the format it gets from blktapctrl.
+
+Signed-off-by: Kevin Wolf <kwolf(a)suse.de>
+---
+ hw/xen_blktap.c | 22 +++++++++++++++++++---
+ hw/xen_blktap.h | 14 ++++++++++++++
+ 2 files changed, 33 insertions(+), 3 deletions(-)
+
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/tapdisk.h
-+++ xen-3.3.1-testing/tools/blktap/drivers/tapdisk.h
-@@ -159,16 +159,6 @@ extern struct tap_disk tapdisk_ram;
- extern struct tap_disk tapdisk_qcow;
- extern struct tap_disk tapdisk_qcow2;
-
--#define MAX_DISK_TYPES 20
--
--#define DISK_TYPE_AIO 0
--#define DISK_TYPE_SYNC 1
--#define DISK_TYPE_VMDK 2
--#define DISK_TYPE_RAM 3
--#define DISK_TYPE_QCOW 4
--#define DISK_TYPE_QCOW2 5
--#define DISK_TYPE_IOEMU 6
--
-
- /*Define Individual Disk Parameters here */
- static disk_info_t aio_disk = {
-Index: xen-3.3.1-testing/tools/blktap/lib/blktaplib.h
-===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/lib/blktaplib.h
-+++ xen-3.3.1-testing/tools/blktap/lib/blktaplib.h
-@@ -211,6 +211,17 @@ typedef struct msg_pid {
- #define CTLMSG_PID 9
- #define CTLMSG_PID_RSP 10
-
-+/* disk driver types */
-+#define MAX_DISK_TYPES 20
-+
-+#define DISK_TYPE_AIO 0
-+#define DISK_TYPE_SYNC 1
-+#define DISK_TYPE_VMDK 2
-+#define DISK_TYPE_RAM 3
-+#define DISK_TYPE_QCOW 4
-+#define DISK_TYPE_QCOW2 5
-+#define DISK_TYPE_IOEMU 6
-+
- /* xenstore/xenbus: */
- #define DOMNAME "Domain-0"
- int setup_probe_watch(struct xs_handle *h);
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-@@ -222,9 +222,10 @@ static int map_new_dev(struct td_state *
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
+@@ -220,9 +220,10 @@ static int map_new_dev(struct td_state *
return -1;
}
@@ -57,7 +31,7 @@
char* devname;
static int devnumber = 0;
int i;
-@@ -234,7 +235,22 @@ static int open_disk(struct td_state *s,
+@@ -232,7 +233,22 @@ static int open_disk(struct td_state *s,
bs = bdrv_new(devname);
free(devname);
@@ -81,7 +55,7 @@
fprintf(stderr, "Could not open image file %s\n", path);
return -ENOMEM;
}
-@@ -529,7 +545,7 @@ static void handle_blktap_ctrlmsg(void*
+@@ -527,7 +543,7 @@ static void handle_blktap_ctrlmsg(void*
s = state_init();
/*Open file*/
@@ -90,13 +64,13 @@
msglen = sizeof(msg_hdr_t);
msg->type = CTLMSG_IMG_FAIL;
msg->len = msglen;
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.h
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.h
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.h
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.h
-@@ -50,4 +50,19 @@ typedef struct fd_list_entry {
- struct fd_list_entry **pprev, *next;
- } fd_list_entry_t;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.h
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.h
+@@ -52,4 +52,18 @@ typedef struct fd_list_entry {
+
+ int init_blktap(void);
+typedef struct disk_info {
+ int idnum;
@@ -109,7 +83,6 @@
+ { DISK_TYPE_VMDK, &bdrv_vmdk },
+ { DISK_TYPE_QCOW, &bdrv_qcow },
+ { DISK_TYPE_QCOW2, &bdrv_qcow2 },
-+ { DISK_TYPE_IOEMU, NULL },
+ { -1, NULL }
+};
+
++++++ ioemu-blktap-zero-size.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,16 +1,22 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
+From cb982fd919a52ff86f01025d0f92225bc7b2a956 Mon Sep 17 00:00:00 2001
+From: Kevin Wolf <kwolf(a)suse.de>
+Date: Tue, 10 Mar 2009 16:44:31 +0100
+Subject: [PATCH 5/6] ioemu: Fail on too small blktap disks
+
+The blktap infrastructure doesn't seems to be able to cope with images
+that are smaller than a sector, it produced hangs for me. Such an
+image isn't really useful anyway, so just fail gracefully.
+
+Signed-off-by: Kevin Wolf <kwolf(a)suse.de>
+---
+ hw/xen_blktap.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-@@ -67,6 +67,7 @@ int read_fd;
- int write_fd;
-
- static pid_t process;
-+int connected_disks = 0;
- fd_list_entry_t *fd_start = NULL;
-
- extern char* get_snapshot_name(int devid);
-@@ -260,6 +261,12 @@ static int open_disk(struct td_state *s,
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
+@@ -258,6 +258,12 @@ static int open_disk(struct td_state *s,
s->size = bs->total_sectors;
s->sector_size = 512;
@@ -23,82 +29,11 @@
s->info = ((s->flags & TD_RDONLY) ? VDISK_READONLY : 0);
#ifndef QEMU_TOOL
-@@ -563,6 +570,7 @@ static void handle_blktap_ctrlmsg(void*
-
- /* Allocate the disk structs */
- s = state_init();
-+ connected_disks++;
-
- /*Open file*/
- if (s == NULL || open_disk(s, path, msg->drivertype, msg->readonly)) {
-@@ -645,7 +653,8 @@ static void handle_blktap_ctrlmsg(void*
- case CTLMSG_CLOSE:
- s = get_state(msg->cookie);
- if (s) unmap_disk(s);
-- break;
-+ connected_disks--;
-+ break;
-
- case CTLMSG_PID:
- memset(buf, 0x00, MSG_SIZE);
-Index: xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
-@@ -18,6 +18,7 @@ extern void *qemu_mallocz(size_t size);
- extern void qemu_free(void *ptr);
-
- extern void *fd_start;
-+extern int connected_disks;
-
- int domid = 0;
- FILE* logfile;
-@@ -98,7 +99,7 @@ int main(void)
- int max_fd;
- fd_set rfds;
- struct timeval tv;
-- void *old_fd_start = NULL;
-+ int old_connected_disks = 0;
-
- /* Daemonize */
- if (fork() != 0)
-@@ -153,11 +154,17 @@ int main(void)
- pioh = &ioh->next;
- }
-
-+ if (old_connected_disks != connected_disks)
-+ fprintf(stderr, "connected disks: %d => %d\n",
-+ old_connected_disks, connected_disks);
-+
- /* Exit when the last image has been closed */
-- if (old_fd_start != NULL && fd_start == NULL)
-+ if (old_connected_disks != 0 && connected_disks == 0) {
-+ fprintf(stderr, "Last image is closed, exiting.\n");
- exit(0);
-+ }
-
-- old_fd_start = fd_start;
-+ old_connected_disks = connected_disks;
- }
- return 0;
- }
-Index: xen-3.3.1-testing/tools/examples/blktap
-===================================================================
---- xen-3.3.1-testing.orig/tools/examples/blktap
-+++ xen-3.3.1-testing/tools/examples/blktap
-@@ -75,6 +75,7 @@ fi
- if [ "$command" = 'add' ]
- then
- [ -e "$file" ] || { fatal $file does not exist; }
-+ [ $(stat --format="%s" "$file") -ge 512 ] || { fatal $file is too small; }
-
- FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
- FRONTEND_UUID=$(xenstore_read "/local/domain/$FRONTEND_ID/vm")
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/DevController.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/DevController.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/DevController.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/DevController.py
-@@ -182,7 +182,7 @@ class DevController:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/DevController.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/DevController.py
+@@ -155,7 +155,7 @@ class DevController:
(devid, self.deviceClass))
elif status == Error:
++++++ ioemu-debuginfo.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,21 +1,21 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/Makefile
+Index: xen-3.4.0-testing/tools/ioemu-remote/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/Makefile
-+++ xen-3.3.1-testing/tools/ioemu-remote/Makefile
-@@ -205,7 +205,7 @@ endif
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/Makefile
++++ xen-3.4.0-testing/tools/ioemu-remote/Makefile
+@@ -242,7 +242,7 @@ endif
install: all $(if $(BUILD_DOCS),install-doc)
mkdir -p "$(DESTDIR)$(bindir)"
ifneq ($(TOOLS),)
- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
+ $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)"
endif
+ ifneq ($(BLOBS),)
mkdir -p "$(DESTDIR)$(datadir)"
- set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
-Index: xen-3.3.1-testing/tools/ioemu-remote/Makefile.target
+Index: xen-3.4.0-testing/tools/ioemu-remote/Makefile.target
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/Makefile.target
-+++ xen-3.3.1-testing/tools/ioemu-remote/Makefile.target
-@@ -707,7 +707,7 @@ clean:
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/Makefile.target
++++ xen-3.4.0-testing/tools/ioemu-remote/Makefile.target
+@@ -754,7 +754,7 @@ clean:
install: all install-hook
ifneq ($(PROGS),)
++++++ ioemu-vnc-resize.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,35 +1,8 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/vnc.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/vnc.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/vnc.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/vnc.c
-@@ -352,6 +352,11 @@ static void vnc_dpy_update(DisplayState
- {
- VncState *vs = ds->opaque;
-
-+ x = MIN(x, vs->width);
-+ y = MIN(y, vs->height);
-+ w = MIN(w, vs->width - x);
-+ h = MIN(h, vs->height - y);
-+
- set_bits_in_row(vs, vs->dirty_row, x, y, w, h);
- }
-
-@@ -419,9 +424,13 @@ static void vnc_dpy_resize_shared(Displa
- size_changed = ds->width != w || ds->height != h;
- ds->width = w;
- ds->height = h;
-- if (vs->csock != -1 && vs->has_resize && size_changed) {
-+ if (size_changed) {
- vs->width = ds->width;
- vs->height = ds->height;
-+ VNC_DEBUG("vs->width = %d, vs->height = %d\n",
-+ ds->width, ds->height);
-+ }
-+ if (vs->csock != -1 && vs->has_resize && size_changed) {
- if (vs->update_requested) {
- vnc_write_u8(vs, 0); /* msg id */
- vnc_write_u8(vs, 0);
-@@ -1808,6 +1817,31 @@ static int protocol_client_msg(VncState
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/vnc.c
++++ xen-3.4.0-testing/tools/ioemu-remote/vnc.c
+@@ -1713,6 +1713,31 @@ static int protocol_client_msg(VncState
}
set_encodings(vs, (int32_t *)(data + 4), limit);
@@ -48,13 +21,13 @@
+ vnc_write_u8(vs, 0); /* msg id */
+ vnc_write_u8(vs, 0);
+ vnc_write_u16(vs, 1); /* number of rects */
-+ vnc_framebuffer_update(vs, 0, 0, vs->ds->width, vs->ds->height, -223);
++ vnc_framebuffer_update(vs, 0, 0, vs->serverds.width, vs->serverds.height, -223);
+
+ /* Ensure that the new area is updated */
+ vnc_write_u8(vs, 0); /* msg id */
+ vnc_write_u8(vs, 0);
+ vnc_write_u16(vs, 1); /* number of rects */
-+ send_framebuffer_update(vs, 0, 0, vs->ds->width, vs->ds->height);
++ send_framebuffer_update(vs, 0, 0, vs->serverds.width, vs->serverds.height);
+
+ vnc_flush(vs);
+ }
++++++ libxen_permissive.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/libxen/src/xen_common.c
+Index: xen-3.4.0-testing/tools/libxen/src/xen_common.c
===================================================================
---- xen-3.3.1-testing.orig/tools/libxen/src/xen_common.c
-+++ xen-3.3.1-testing/tools/libxen/src/xen_common.c
-@@ -902,8 +902,15 @@ static void parse_into(xen_session *s, x
+--- xen-3.4.0-testing.orig/tools/libxen/src/xen_common.c
++++ xen-3.4.0-testing/tools/libxen/src/xen_common.c
+@@ -904,8 +904,15 @@ static void parse_into(xen_session *s, x
0 != strcmp((char *)value_node->children->name, "struct") ||
value_node->children->children == NULL)
{
++++++ network-nat-open-SuSEfirewall2-FORWARD.patch ++++++
Open SuSEfirewall2 FORWARD rule when use xen nat
diff -uNrp xen-3.4.0-testing/tools/hotplug/Linux/network-nat xen-3.4.0-testing/tools/hotplug/Linux/network-nat
--- xen-3.4.0-testing/tools/hotplug/Linux/network-nat 2009-04-08 17:31:50.000000000 +0800
+++ xen-3.4.0-testing/tools/hotplug/Linux/network-nat 2009-04-08 17:33:20.000000000 +0800
@@ -82,6 +82,7 @@ function dhcp_stop()
op_start() {
echo 1 >/proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ${netdev} -j MASQUERADE
+ iptables -P FORWARD ACCEPT
[ "$dhcp" != 'no' ] && dhcp_start
}
@@ -89,6 +90,7 @@ op_start() {
op_stop() {
[ "$dhcp" != 'no' ] && dhcp_stop
iptables -t nat -D POSTROUTING -o ${netdev} -j MASQUERADE
+ iptables -P FORWARD DROP
}
++++++ network-nat.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-nat
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-nat
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-nat
-+++ xen-3.3.1-testing/tools/examples/network-nat
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-nat
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-nat
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
++++++ network-route.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-route
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-route
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-route
-+++ xen-3.3.1-testing/tools/examples/network-route
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-route
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-route
@@ -21,7 +21,7 @@ dir=$(dirname "$0")
evalVariables "$@"
++++++ pv-driver-build.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,5 +1,7 @@
---- a/unmodified_drivers/linux-2.6/blkfront/Kbuild
-+++ b/unmodified_drivers/linux-2.6/blkfront/Kbuild
+Index: xen-3.4.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild
+===================================================================
+--- xen-3.4.0-testing.orig/unmodified_drivers/linux-2.6/blkfront/Kbuild
++++ xen-3.4.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild
@@ -3,3 +3,4 @@ include $(M)/overrides.mk
obj-m += xen-vbd.o
++++++ pvdrv_emulation_control.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,12 +1,12 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_platform.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_platform.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_platform.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_platform.c
-@@ -101,6 +101,19 @@ static void platform_ioport_write(void *
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_platform.c
+@@ -356,6 +356,19 @@ static void platform_ioport_write(void *
net_tap_shutdown_all();
fprintf(logfile, "Done.\n");
break;
-+ case 8:
++ case 8:
+ if (val ==1 ) {
+ fprintf(logfile, "Disconnect IDE hard disk...\n");
+ ide_unplug_harddisks();
++++++ python2.6-fixes.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/python/xen/util/acmpolicy.py
+Index: xen-3.4.0-testing/tools/python/xen/util/acmpolicy.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/util/acmpolicy.py
-+++ xen-3.3.1-testing/tools/python/xen/util/acmpolicy.py
+--- xen-3.4.0-testing.orig/tools/python/xen/util/acmpolicy.py
++++ xen-3.4.0-testing/tools/python/xen/util/acmpolicy.py
@@ -17,7 +17,10 @@
#============================================================================
@@ -14,10 +14,10 @@
import stat
import array
import struct
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendAPI.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendAPI.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendAPI.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendAPI.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendAPI.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendAPI.py
@@ -18,7 +18,6 @@
import inspect
import os
@@ -26,7 +26,7 @@
import string
import sys
import traceback
-@@ -116,13 +115,13 @@ event_registrations = {}
+@@ -119,7 +118,7 @@ event_registrations = {}
def event_register(session, reg_classes):
if session not in event_registrations:
event_registrations[session] = {
@@ -35,10 +35,11 @@
'queue' : Queue.Queue(EVENT_QUEUE_LENGTH),
'next-id' : 1
}
- if not reg_classes:
- reg_classes = classes
-- event_registrations[session]['classes'].union_update(reg_classes)
-+ event_registrations[session]['classes'].update(reg_classes)
+@@ -131,7 +130,6 @@ def event_register(session, reg_classes)
+ event_registrations[session]['classes'].update(reg_classes)
+-
def event_unregister(session, unreg_classes):
+ if session not in event_registrations:
+ return
++++++ qemu-dm-segfault.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,86 +1,85 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/ide.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/ide.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/ide.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/ide.c
-@@ -908,8 +908,12 @@ static inline void ide_dma_submit_check(
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/ide.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/ide.c
+@@ -934,8 +934,9 @@ static inline void ide_dma_submit_check(
static inline void ide_set_irq(IDEState *s)
{
- BMDMAState *bm = s->bmdma;
-- if (!s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
+ BMDMAState *bm;
-+
-+ if (!s || !s->bs) return; /* yikes */
-+
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
+ bm = s->bmdma;
-+
if (!(s->cmd & IDE_CMD_DISABLE_IRQ)) {
if (bm) {
bm->status |= BM_STATUS_INT;
-@@ -1094,15 +1098,13 @@ static void ide_read_dma_cb(void *opaque
+@@ -1223,14 +1224,14 @@ static void ide_read_dma_cb(void *opaque
int n;
int64_t sector_num;
-+ if (!s || !s->bs) return; /* yikes */
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
+
if (ret < 0) {
+ dma_buf_commit(s, 1);
ide_dma_error(s);
return;
}
-- if (!s->bs) return; /* yikes */
--
-- if (!s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
-
n = s->io_buffer_size >> 9;
sector_num = ide_get_sector(s);
if (n > 0) {
-@@ -1222,15 +1224,13 @@ static void ide_write_dma_cb(void *opaqu
+@@ -1334,6 +1335,8 @@ static void ide_write_flush_cb(void *opa
+ BMDMAState *bm = opaque;
+ IDEState *s = bm->ide_if;
+
++ if (!s) return; /* yikes */
++
+ if (ret != 0) {
+ ide_dma_error(s);
+ return;
+@@ -1365,13 +1368,13 @@ static void ide_write_dma_cb(void *opaqu
int n;
int64_t sector_num;
-+ if (!s || !s->bs) return; /* yikes */
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
+
if (ret < 0) {
- ide_dma_error(s);
- return;
+ if (ide_handle_write_error(s, -ret, BM_STATUS_DMA_RETRY))
+ return;
}
-- if (!s->bs) return; /* yikes */
--
-- if (!s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
-
n = s->io_buffer_size >> 9;
sector_num = ide_get_sector(s);
if (n > 0) {
-@@ -1290,7 +1290,7 @@ static void ide_flush_cb(void *opaque, i
+@@ -1428,7 +1431,7 @@ static void ide_flush_cb(void *opaque, i
{
IDEState *s = opaque;
-- if (!s->bs) return; /* yikes */
-+ if (!s || !s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see below) */
++ if (!s || !s->bs) return; /* ouch! (see below) */
if (ret) {
/* We are completely doomed. The IDE spec does not permit us
-@@ -1536,9 +1536,7 @@ static void ide_atapi_cmd_read_dma_cb(vo
+@@ -1685,7 +1688,7 @@ static void ide_atapi_cmd_read_dma_cb(vo
IDEState *s = bm->ide_if;
int data_offset, n;
-- if (!s->bs) return; /* yikes */
--
-- if (!s->bs) return; /* yikes */
-+ if (!s || !s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
if (ret < 0) {
ide_atapi_io_error(s, ret);
-@@ -2119,9 +2117,7 @@ static void cdrom_change_cb(void *opaque
+@@ -2363,7 +2366,7 @@ static void cdrom_change_cb(void *opaque
IDEState *s = opaque;
uint64_t nb_sectors;
-- if (!s->bs) return; /* yikes */
--
-- if (!s->bs) return; /* yikes */
-+ if (!s || !s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
- /* XXX: send interrupt too */
bdrv_get_geometry(s->bs, &nb_sectors);
+ s->nb_sectors = nb_sectors;
++++++ qemu-security-etch1.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,21 +1,7 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/block.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/ne2000.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/block.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/block.c
-@@ -630,6 +630,9 @@ int bdrv_write(BlockDriverState *bs, int
- return 0;
- }
- } else {
-+ unsigned int ns = sector_num * 512;
-+ if (ns < 0)
-+ return -1;
- return drv->bdrv_write(bs, sector_num, buf, nb_sectors);
- }
- }
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/ne2000.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/ne2000.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/ne2000.c
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/ne2000.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/ne2000.c
@@ -218,7 +218,7 @@ static int ne2000_can_receive(void *opaq
NE2000State *s = opaque;
@@ -25,11 +11,11 @@
return !ne2000_buffer_full(s);
}
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/pc.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/pc.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/pc.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/pc.c
-@@ -387,7 +387,8 @@ static void bochs_bios_write(void *opaqu
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/pc.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/pc.c
+@@ -409,7 +409,8 @@ static void bochs_bios_write(void *opaqu
case 0x400:
case 0x401:
fprintf(stderr, "BIOS panic at rombios.c, line %d\n", val);
@@ -39,7 +25,7 @@
case 0x402:
case 0x403:
#ifdef DEBUG_BIOS
-@@ -410,8 +411,9 @@ static void bochs_bios_write(void *opaqu
+@@ -432,8 +433,9 @@ static void bochs_bios_write(void *opaqu
/* LGPL'ed VGA BIOS messages */
case 0x501:
case 0x502:
@@ -50,65 +36,3 @@
case 0x500:
case 0x503:
#ifdef DEBUG_BIOS
-Index: xen-3.3.1-testing/tools/ioemu-remote/target-i386/translate.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/target-i386/translate.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/target-i386/translate.c
-@@ -5661,6 +5661,7 @@ static target_ulong disas_insn(DisasCont
- gen_jmp_im(pc_start - s->cs_base);
- gen_op_into(s->pc - pc_start);
- break;
-+#ifdef WANT_ICEBP
- case 0xf1: /* icebp (undocumented, exits to external debugger) */
- if (gen_svm_check_intercept(s, pc_start, SVM_EXIT_ICEBP))
- break;
-@@ -5672,6 +5673,7 @@ static target_ulong disas_insn(DisasCont
- cpu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM);
- #endif
- break;
-+#endif /* icebp */
- case 0xfa: /* cli */
- if (!s->vm86) {
- if (s->cpl <= s->iopl) {
-Index: xen-3.3.1-testing/tools/ioemu-remote/vl.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/vl.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/vl.c
-@@ -4380,8 +4380,8 @@ typedef struct NetSocketState {
- VLANClientState *vc;
- int fd;
- int state; /* 0 = getting length, 1 = getting data */
-- int index;
-- int packet_len;
-+ unsigned int index;
-+ unsigned int packet_len;
- uint8_t buf[4096];
- struct sockaddr_in dgram_dst; /* contains inet host and port destination iff connectionless (SOCK_DGRAM) */
- } NetSocketState;
-@@ -4412,7 +4412,8 @@ static void net_socket_receive_dgram(voi
- static void net_socket_send(void *opaque)
- {
- NetSocketState *s = opaque;
-- int l, size, err;
-+ int size, err;
-+ unsigned l;
- uint8_t buf1[4096];
- const uint8_t *buf;
-
-@@ -4451,7 +4452,15 @@ static void net_socket_send(void *opaque
- l = s->packet_len - s->index;
- if (l > size)
- l = size;
-- memcpy(s->buf + s->index, buf, l);
-+ if (s->index + l <= sizeof(s->buf)) {
-+ memcpy(s->buf + s->index, buf, l);
-+ } else {
-+ fprintf(stderr, "serious error: oversized packet received,"
-+ "connection terminated.\n");
-+ s->state = 0;
-+ goto eoc;
-+ }
-+
- s->index += l;
- buf += l;
- size -= l;
++++++ serial-split.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/misc/serial-split/Makefile
+Index: xen-3.4.0-testing/tools/misc/serial-split/Makefile
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/misc/serial-split/Makefile
++++ xen-3.4.0-testing/tools/misc/serial-split/Makefile
@@ -0,0 +1,20 @@
+CC ?= gcc
+CFLAGS ?= -Wall -Os
@@ -23,10 +23,10 @@
+
+%.o: %.c Makefile
+ $(CC) $(CFLAGS) -c -o $@ $<
-Index: xen-3.3.1-testing/tools/misc/serial-split/serial-split.c
+Index: xen-3.4.0-testing/tools/misc/serial-split/serial-split.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/misc/serial-split/serial-split.c
++++ xen-3.4.0-testing/tools/misc/serial-split/serial-split.c
@@ -0,0 +1,422 @@
+/*
+ * serial-split.c
++++++ snapshot-ioemu-delete.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,13 +1,12 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -671,6 +671,18 @@ static void xenstore_process_dm_command_
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -919,6 +919,18 @@ static void xenstore_process_dm_command_
}
snapshot_name = xs_read(xsh, XBT_NULL, path, &len);
+ } else if (!strncmp(command, "snapshot-delete", len)) {
-+
+ if (pasprintf(&path,
+ "/local/domain/0/device-model/%u/parameter", domid) == -1) {
+ fprintf(logfile, "out of memory reading dm command parameter\n");
@@ -18,23 +17,15 @@
+ goto out;
+ if (delete_disk_snapshots(par) == 0)
+ xenstore_record_dm_state("snapshot-deleted");
++ free(par);
} else if (!strncmp(command, "continue", len)) {
fprintf(logfile, "dm-command: continue after state save\n");
xen_pause_requested = 0;
-Index: xen-3.3.1-testing/tools/ioemu-remote/xen-vl-extra.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/savevm.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xen-vl-extra.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xen-vl-extra.c
-@@ -16,6 +16,8 @@ static int qemu_savevm_state(QEMUFile *f
- static int qemu_loadvm_state(QEMUFile *f);
-
- static int bdrv_can_snapshot(BlockDriverState *bs);
-+static int bdrv_has_snapshot(BlockDriverState *bs);
-+static BlockDriverState *get_bs_snapshots(void);
- static int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
- const char *name);
-
-@@ -166,6 +168,35 @@ the_end:
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/savevm.c
++++ xen-3.4.0-testing/tools/ioemu-remote/savevm.c
+@@ -1096,6 +1096,35 @@ the_end:
return ret;
}
@@ -67,14 +58,14 @@
+ return 0;
+}
+
- struct qemu_alarm_timer;
- static int unix_start_timer(struct qemu_alarm_timer *t) { return 0; }
- static void unix_stop_timer(struct qemu_alarm_timer *t) { }
-Index: xen-3.3.1-testing/tools/ioemu-remote/qemu-xen.h
+ #ifndef CONFIG_DM
+
+ void do_savevm(const char *name)
+Index: xen-3.4.0-testing/tools/ioemu-remote/qemu-xen.h
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/qemu-xen.h
-+++ xen-3.3.1-testing/tools/ioemu-remote/qemu-xen.h
-@@ -22,6 +22,7 @@ enum {
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/qemu-xen.h
++++ xen-3.4.0-testing/tools/ioemu-remote/qemu-xen.h
+@@ -42,6 +42,7 @@ enum {
/* xen-vl-extra.c */
int save_disk_snapshots(const char* name);
++++++ snapshot-ioemu-restore.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
+Index: xen-3.4.0-testing/tools/blktap/drivers/blktapctrl.c
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/blktapctrl.c
-+++ xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
-@@ -305,6 +305,7 @@ static int write_msg(int fd, int msgtype
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/blktapctrl.c
++++ xen-3.4.0-testing/tools/blktap/drivers/blktapctrl.c
+@@ -346,6 +346,7 @@ static int write_msg(int fd, int msgtype
msg_dev = (msg_newdev_t *)(buf + sizeof(msg_hdr_t));
msg_dev->devnum = blkif->minor;
msg_dev->domid = blkif->domid;
@@ -10,10 +10,10 @@
break;
-Index: xen-3.3.1-testing/tools/blktap/lib/blktaplib.h
+Index: xen-3.4.0-testing/tools/blktap/lib/blktaplib.h
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/lib/blktaplib.h
-+++ xen-3.3.1-testing/tools/blktap/lib/blktaplib.h
+--- xen-3.4.0-testing.orig/tools/blktap/lib/blktaplib.h
++++ xen-3.4.0-testing/tools/blktap/lib/blktaplib.h
@@ -189,6 +189,7 @@ typedef struct msg_hdr {
typedef struct msg_newdev {
uint8_t devnum;
@@ -22,11 +22,11 @@
} msg_newdev_t;
typedef struct msg_pid {
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-@@ -69,6 +69,8 @@ int write_fd;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
+@@ -67,6 +67,8 @@ int write_fd;
static pid_t process;
fd_list_entry_t *fd_start = NULL;
@@ -35,7 +35,7 @@
static void handle_blktap_iomsg(void* private);
struct aiocb_info {
-@@ -502,6 +504,10 @@ static void handle_blktap_ctrlmsg(void*
+@@ -500,6 +502,10 @@ static void handle_blktap_ctrlmsg(void*
char buf[MSG_SIZE];
@@ -46,7 +46,7 @@
length = read(read_fd, buf, MSG_SIZE);
if (length > 0 && length >= sizeof(msg_hdr_t))
-@@ -557,7 +563,39 @@ static void handle_blktap_ctrlmsg(void*
+@@ -555,7 +561,39 @@ static void handle_blktap_ctrlmsg(void*
if (s != NULL) {
ret = ((map_new_dev(s, msg_dev->devnum)
== msg_dev->devnum ? 0: -1));
@@ -87,11 +87,11 @@
memset(buf, 0x00, MSG_SIZE);
msglen = sizeof(msg_hdr_t);
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -37,6 +37,8 @@ static QEMUTimer *insert_timer = NULL;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -38,6 +38,8 @@ static QEMUTimer *insert_timer = NULL;
#define UWAIT_MAX (30*1000000) /* thirty seconds */
#define UWAIT (100000) /* 1/10th second */
@@ -100,15 +100,15 @@
static int pasprintf(char **buf, const char *fmt, ...)
{
va_list ap;
-@@ -363,8 +365,33 @@ void xenstore_parse_domain_config(int hv
+@@ -533,8 +535,33 @@ void xenstore_parse_domain_config(int hv
}
}
pstrcpy(bs->filename, sizeof(bs->filename), params);
-- if (bdrv_open2(bs, params, 0 /* snapshot */, format) < 0)
-+ if (bdrv_open2(bs, params, 0 /* snapshot */, format) < 0) {
+- if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0)
++ if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) {
fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0");
+ } else {
-+ char* snapshot = get_snapshot_name(atoi(e[i]));
++ char* snapshot = get_snapshot_name(atoi(e_danger[i]));
+ if (snapshot) {
+ fprintf(stderr, "Using snapshot %s\n", snapshot);
+ ret = bdrv_snapshot_goto(bs, snapshot);
@@ -135,8 +135,8 @@
}
/* if cdrom pyhsical put a watch on media-present */
if (bdrv_get_type_hint(bs) == BDRV_TYPE_CDROM) {
-@@ -474,6 +485,23 @@ void xenstore_parse_domain_config(int hv
- return;
+@@ -726,6 +753,23 @@ int xenstore_parse_disable_pf_config ()
+ return disable_pf;
}
+
++++++ snapshot-ioemu-save.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,28 +1,17 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/xen-vl-extra.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/savevm.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xen-vl-extra.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xen-vl-extra.c
-@@ -8,12 +8,18 @@
- * there is only one place where this file is included. */
-
- #include "qemu-xen.h"
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/savevm.c
++++ xen-3.4.0-testing/tools/ioemu-remote/savevm.c
+@@ -28,6 +28,7 @@
+ #include "sysemu.h"
+ #include "qemu-timer.h"
+ #include "qemu-char.h"
+#include "block_int.h"
-
- /* forward declarations of things in vl.c */
-
- static int qemu_savevm_state(QEMUFile *f);
- static int qemu_loadvm_state(QEMUFile *f);
-
-+static int bdrv_can_snapshot(BlockDriverState *bs);
-+static int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
-+ const char *name);
-+
-+
- /* We use simpler state save/load functions for Xen */
-
- void do_savevm(const char *name)
-@@ -85,6 +91,81 @@ void do_loadvm(const char *name)
- vm_start();
+ #include "block.h"
+ #include "audio/audio.h"
+ #include "migration.h"
+@@ -1015,6 +1016,86 @@ static int bdrv_snapshot_find(BlockDrive
+ return ret;
}
+int save_disk_snapshots(const char* name)
@@ -35,11 +24,16 @@
+ int i;
+ int ret = 0;
+
++ /* Deal with all aio submit */
++ qemu_aio_flush();
++ /* Do fsync at backend fs */
++ ret = bdrv_flush_all();
++ if (ret)
++ fprintf(stderr, "Fsync error[%d] when do snapshot[%s]\n", ret, name);
++
+ saved_vm_running = vm_running;
+ vm_stop(0);
+
-+ qemu_aio_flush();
-+
+ /* Ensure that all images support snapshots or are read-only */
+ for(i = 0; i < MAX_DRIVES; i++) {
+ bs = drives_table[i].bdrv;
@@ -100,14 +94,14 @@
+ return ret;
+}
+
- struct qemu_alarm_timer;
- static int unix_start_timer(struct qemu_alarm_timer *t) { return 0; }
- static void unix_stop_timer(struct qemu_alarm_timer *t) { }
-Index: xen-3.3.1-testing/tools/ioemu-remote/i386-dm/helper2.c
+ #ifndef CONFIG_DM
+
+ void do_savevm(const char *name)
+Index: xen-3.4.0-testing/tools/ioemu-remote/i386-dm/helper2.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/i386-dm/helper2.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/i386-dm/helper2.c
-@@ -101,6 +101,9 @@ int send_vcpu = 0;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/i386-dm/helper2.c
++++ xen-3.4.0-testing/tools/ioemu-remote/i386-dm/helper2.c
+@@ -109,6 +109,9 @@ int send_vcpu = 0;
#define NR_CPUS 32
evtchn_port_t ioreq_local_port[NR_CPUS];
@@ -117,7 +111,7 @@
CPUX86State *cpu_x86_init(const char *cpu_model)
{
CPUX86State *env;
-@@ -547,6 +550,7 @@ int main_loop(void)
+@@ -551,6 +554,7 @@ int main_loop(void)
int evtchn_fd = xce_handle == -1 ? -1 : xc_evtchn_fd(xce_handle);
char *qemu_file;
fd_set fds;
@@ -125,7 +119,7 @@
main_loop_prepare();
-@@ -574,11 +578,43 @@ int main_loop(void)
+@@ -578,11 +582,43 @@ int main_loop(void)
main_loop_wait(1); /* For the select() on events */
/* Save the device state */
@@ -173,11 +167,11 @@
/* Wait to be allowed to continue */
while (xen_pause_requested) {
-Index: xen-3.3.1-testing/tools/ioemu-remote/qemu-xen.h
+Index: xen-3.4.0-testing/tools/ioemu-remote/qemu-xen.h
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/qemu-xen.h
-+++ xen-3.3.1-testing/tools/ioemu-remote/qemu-xen.h
-@@ -14,6 +14,15 @@ void qemu_invalidate_map_cache(void)
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/qemu-xen.h
++++ xen-3.4.0-testing/tools/ioemu-remote/qemu-xen.h
+@@ -34,6 +34,15 @@ void qemu_invalidate_map_cache(void)
#define mapcache_lock() ((void)0)
#define mapcache_unlock() ((void)0)
@@ -193,18 +187,18 @@
/* helper2.c */
extern long time_offset;
void timeoffset_get(void);
-@@ -43,6 +52,7 @@ int xenstore_fd(void);
+@@ -68,6 +77,7 @@ int xenstore_fd(void);
void xenstore_process_event(void *opaque);
- void xenstore_record_dm(char *subpath, char *state);
- void xenstore_record_dm_state(char *state);
+ void xenstore_record_dm(const char *subpath, const char *state);
+ void xenstore_record_dm_state(const char *state);
+void xenstore_record_dm_error(char *errmsg);
void xenstore_check_new_media_present(int timeout);
void xenstore_write_vncport(int vnc_display);
void xenstore_read_vncpasswd(int domid, char *pwbuf, size_t pwbuflen);
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
@@ -24,6 +24,7 @@
#include "exec-all.h"
@@ -213,7 +207,7 @@
#include "hw.h"
#include "pci.h"
-@@ -601,6 +602,7 @@ static void xenstore_process_dm_command_
+@@ -849,6 +850,7 @@ static void xenstore_process_dm_command_
{
char *path = NULL, *command = NULL, *par = NULL;
unsigned int len;
@@ -221,7 +215,7 @@
if (pasprintf(&path,
"/local/domain/0/device-model/%u/command", domid) == -1) {
-@@ -613,7 +615,18 @@ static void xenstore_process_dm_command_
+@@ -861,7 +863,18 @@ static void xenstore_process_dm_command_
if (!strncmp(command, "save", len)) {
fprintf(logfile, "dm-command: pause and save state\n");
@@ -241,7 +235,7 @@
} else if (!strncmp(command, "continue", len)) {
fprintf(logfile, "dm-command: continue after state save\n");
xen_pause_requested = 0;
-@@ -677,6 +690,13 @@ void xenstore_record_dm_state(char *stat
+@@ -966,6 +979,13 @@ void xenstore_record_dm_state(const char
xenstore_record_dm("state", state);
}
++++++ snapshot-xend.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,17 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/image.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/image.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/image.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/image.py
-@@ -447,6 +447,12 @@ class ImageHandler:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/image.py
++++ xen-3.4.0-testing/tools/python/xen/xend/image.py
+@@ -447,7 +447,7 @@ class ImageHandler:
+ # have a callback but sadly we don't have Twisted in xend
+ self.sentinel_thread = thread.start_new_thread(self._sentinel_watch,())
+
+- def signalDeviceModel(self, cmd, ret, par = None):
++ def signalDeviceModel(self, cmd, ret, par = None, timeout = True):
+ if self.device_model is None:
+ return
+ # Signal the device model to for action
+@@ -470,10 +470,17 @@ class ImageHandler:
while state != ret:
state = xstransact.Read("/local/domain/0/device-model/%i/state"
% self.vm.getDomid())
@@ -13,37 +22,45 @@
+ raise VmError(msg)
+
time.sleep(0.1)
- count += 1
- if count > 100:
-@@ -476,6 +482,10 @@ class ImageHandler:
- # but this can easily lead to very rapid restart loops against
- # which we currently have no protection
+- count += 1
+- if count > 100:
+- raise VmError('Timed out waiting for device model action')
++ if timeout:
++ count += 1
++ if count > 100:
++ raise VmError('Timed out waiting for device model action')
+
+ #resotre orig state
+ xstransact.Store("/local/domain/0/device-model/%i"
+@@ -498,6 +505,10 @@ class ImageHandler:
+ except:
+ pass
+ def snapshotDeviceModel(self, name):
+ # Signal the device model to perform snapshot operation
-+ self.signalDeviceModel('snapshot', 'paused', name)
++ self.signalDeviceModel('snapshot', 'paused', name, False)
+
def recreate(self):
if self.device_model is None:
return
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/blkif.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/blkif.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py
-@@ -84,6 +84,9 @@ class BlkifController(DevController):
- if uuid:
- back['uuid'] = uuid
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/blkif.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/blkif.py
+@@ -88,6 +88,9 @@ class BlkifController(DevController):
+ if bootable != None:
+ back['bootable'] = str(bootable)
+ if 'snapshotname' in self.vm.info:
+ back['snapshot'] = self.vm.info['snapshotname']
+
- if security.on() == xsconstants.XS_POLICY_ACM:
+ if security.on() == xsconstants.XS_POLICY_USE:
self.do_access_control(config, uname)
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/SrvDomain.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/SrvDomain.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/SrvDomain.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/SrvDomain.py
@@ -95,6 +95,31 @@ class SrvDomain(SrvDir):
def do_save(self, _, req):
return self.xd.domain_save(self.dom.domid, req.args['file'][0])
@@ -76,7 +93,7 @@
def op_dump(self, op, req):
self.acceptCommand(req)
return req.threadRequest(self.do_dump, op, req)
-@@ -230,7 +255,7 @@ class SrvDomain(SrvDir):
+@@ -231,7 +256,7 @@ class SrvDomain(SrvDir):
def render_GET(self, req):
op = req.args.get('op')
@@ -85,25 +102,20 @@
return self.perform(req)
#
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendCheckpoint.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendCheckpoint.py
-@@ -65,10 +65,12 @@ def insert_after(list, pred, value):
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
+@@ -65,7 +65,7 @@ def insert_after(list, pred, value):
return
-def save(fd, dominfo, network, live, dst, checkpoint=False, node=-1):
+def save(fd, dominfo, network, live, dst, checkpoint=False, node=-1, name=None, diskonly=False):
- write_exact(fd, SIGNATURE, "could not write guest state file: signature")
-
- sxprep = dominfo.sxpr()
-+ if name:
-+ sxprep.append(['snapshotname', name])
-
- if node > -1:
- insert_after(sxprep,'vcpus',['node', str(node)])
-@@ -91,52 +93,60 @@ def save(fd, dominfo, network, live, dst
+ try:
+ if not os.path.isdir("/var/lib/xen"):
+ os.makedirs("/var/lib/xen")
+@@ -98,52 +98,59 @@ def save(fd, dominfo, network, live, dst
image_cfg = dominfo.info.get('image', {})
hvm = dominfo.info.is_hvm()
@@ -123,7 +135,7 @@
- if line == "suspend":
- log.debug("Suspending %d ...", dominfo.getDomid())
- dominfo.shutdown('suspend')
-- dominfo.waitForShutdown()
+- dominfo.waitForSuspend()
- if line in ('suspend', 'suspended'):
- dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
- domain_name)
@@ -161,7 +173,7 @@
+ # libxenguest; see the comments and/or code in xc_linux_save() for
+ # more information.
+ cmd = [xen.util.auxbin.pathTo(XC_SAVE), str(fd),
-+ str(dominfo.getDomid()), "0", "0",
++ str(dominfo.getDomid()), "0", "0",
+ str(int(live) | (int(hvm) << 2)) ]
+ log.debug("[xc_save]: %s", string.join(cmd))
+
@@ -170,7 +182,7 @@
+ if line == "suspend":
+ log.debug("Suspending %d ...", dominfo.getDomid())
+ dominfo.shutdown('suspend')
-+ dominfo.waitForShutdown()
++ dominfo.waitForSuspend()
+ if line in ('suspend', 'suspended'):
+ dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
+ domain_name)
@@ -206,11 +218,10 @@
+
+ if name:
+ dominfo.image.snapshotDeviceModel(name)
-+
if checkpoint:
dominfo.resumeDomain()
-@@ -193,6 +203,63 @@ def restore(xd, fd, dominfo = None, paus
+@@ -207,6 +214,71 @@ def restore(xd, fd, dominfo = None, paus
if othervm is not None and othervm.domid is not None:
raise VmError("Domain '%s' already exists with ID '%d'" % (domconfig["name_label"], othervm.domid))
@@ -222,7 +233,7 @@
+ ret = False
+ if cur < end:
+ ret = True
-+
++
+ os.lseek(fd, cur, 0)
+ return ret
+ except OSError, (errno, strerr):
@@ -247,10 +258,13 @@
+ dominfo.waitForDevices() # Wait for backends to set up
+ except Exception, exn:
+ log.exception(exn)
++ if lock:
++ XendDomain.instance().domains_lock.acquire()
++ raise
+
+ if lock:
+ XendDomain.instance().domains_lock.acquire()
-+
++
+
+ if not contains_state(fd):
+ # Disk-only snapshot. Just start the vm from config (which should
@@ -265,16 +279,21 @@
+ log.debug("### starting domain through XendDomain.create()")
+ dominfo = xd.domain_create(vmconfig)
+
-+ wait_devs(dominfo)
++ try:
++ wait_devs(dominfo)
++ except:
++ dominfo.destroy()
++ raise
++
+ dominfo.unpause()
-+
++
+ # Done if disk only snapshot
+ return dominfo
-+
++
if dominfo:
dominfo.resume()
else:
-@@ -308,27 +375,8 @@ def restore(xd, fd, dominfo = None, paus
+@@ -322,26 +394,7 @@ def restore(xd, fd, dominfo = None, paus
dominfo.completeRestore(handler.store_mfn, handler.console_mfn)
@@ -298,37 +317,35 @@
-
- if lock:
- XendDomain.instance().domains_lock.acquire()
--
+ wait_devs(dominfo)
-+
+
if not paused:
dominfo.unpause()
-
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendConfig.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendConfig.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
-@@ -209,6 +209,7 @@ XENAPI_CFG_TYPES = {
- 'cpuid_check' : dict,
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendConfig.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendConfig.py
+@@ -220,6 +220,7 @@ XENAPI_CFG_TYPES = {
'machine_address_size': int,
'suppress_spurious_page_faults': bool0,
+ 's3_integrity' : int,
+ 'snapshotname': str,
}
# List of legacy configuration keys that have no equivalent in the
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomain.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomain.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomain.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomain.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomain.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomain.py
@@ -52,6 +52,7 @@ from xen.xend.xenstore.xstransact import
from xen.xend.xenstore.xswatch import xswatch
- from xen.util import mkdir
+ from xen.util import mkdir, rwlock
from xen.xend import uuid
+from xen.xend import sxp
xc = xen.lowlevel.xc.xc()
xoptions = XendOptions.instance()
-@@ -1400,6 +1401,181 @@ class XendDomain:
+@@ -1418,6 +1419,181 @@ class XendDomain:
raise XendError("can't write guest state file %s: %s" %
(dst, ex[1]))
@@ -343,7 +360,7 @@
+ @type dst: bool
+ @rtype: None
+ @raise XendError: Failed to snapshot domain
-+ @raise XendInvalidDomain: Domain is not valid
++ @raise XendInvalidDomain: Domain is not valid
+ """
+ try:
+ dominfo = self.domain_lookup_nr(domid)
@@ -405,7 +422,7 @@
+ @param domid: Domain ID or Name
+ @type domid: int or string.
+ @rtype: list of snapshot names
-+ @raise XendInvalidDomain: Domain is not valid
++ @raise XendInvalidDomain: Domain is not valid
+ """
+ try:
+ dominfo = self.domain_lookup_nr(domid)
@@ -417,7 +434,7 @@
+
+ if not os.access(snap_path, os.R_OK):
+ return []
-+
++
+ return os.listdir(snap_path)
+
+ except:
@@ -432,7 +449,7 @@
+ @type dst: string
+ @rtype: None
+ @raise XendError: Failed to apply snapshot
-+ @raise XendInvalidDomain: Domain is not valid
++ @raise XendInvalidDomain: Domain is not valid
+ """
+ try:
+ dominfo = self.domain_lookup_nr(domid)
@@ -473,7 +490,7 @@
+ @param name: Snapshot name
+ @type domid: string
+ @rtype: None
-+ @raise XendInvalidDomain: Domain is not valid
++ @raise XendInvalidDomain: Domain is not valid
+ """
+ dominfo = self.domain_lookup_nr(domid)
+ if not dominfo:
@@ -510,11 +527,11 @@
def domain_pincpu(self, domid, vcpu, cpumap):
"""Set which cpus vcpu can use
-Index: xen-3.3.1-testing/tools/python/xen/xm/main.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/main.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/main.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/main.py
-@@ -126,6 +126,14 @@ SUBCOMMAND_HELP = {
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/main.py
++++ xen-3.4.0-testing/tools/python/xen/xm/main.py
+@@ -120,6 +120,14 @@ SUBCOMMAND_HELP = {
'Restore a domain from a saved state.'),
'save' : ('[-c] <Domain> <CheckpointFile>',
'Save a domain state to restore later.'),
@@ -529,7 +546,7 @@
'shutdown' : ('<Domain> [-waRH]', 'Shutdown a domain.'),
'top' : ('', 'Monitor a host and the domains in real time.'),
'unpause' : ('<Domain>', 'Unpause a paused domain.'),
-@@ -282,6 +290,9 @@ SUBCOMMAND_OPTIONS = {
+@@ -276,6 +284,9 @@ SUBCOMMAND_OPTIONS = {
'save': (
('-c', '--checkpoint', 'Leave domain running after creating snapshot'),
),
@@ -539,7 +556,7 @@
'restore': (
('-p', '--paused', 'Do not unpause domain after restoring it'),
),
-@@ -308,6 +319,10 @@ common_commands = [
+@@ -302,6 +313,10 @@ common_commands = [
"restore",
"resume",
"save",
@@ -550,7 +567,7 @@
"shell",
"shutdown",
"start",
-@@ -339,6 +354,10 @@ domain_commands = [
+@@ -333,6 +348,10 @@ domain_commands = [
"restore",
"resume",
"save",
@@ -561,14 +578,14 @@
"shutdown",
"start",
"suspend",
-@@ -730,6 +749,62 @@ def xm_event_monitor(args):
+@@ -724,6 +743,62 @@ def xm_event_monitor(args):
#
#########################################################################
+def xm_snapshot_create(args):
+
+ arg_check(args, "snapshot-create", 2, 3)
-+
++
+ try:
+ (options, params) = getopt.gnu_getopt(args, 'd', ['diskonly'])
+ except getopt.GetoptError, opterr:
@@ -584,7 +601,7 @@
+ err("Wrong number of parameters")
+ usage('snapshot-create')
+
-+ if serverType == SERVER_XEN_API:
++ if serverType == SERVER_XEN_API:
+ server.xenapi.VM.snapshot_create(get_single_vm(params[0]), params[1], diskonly)
+ else:
+ server.xend.domain.snapshot_create(params[0], params[1], diskonly)
@@ -593,7 +610,7 @@
+ arg_check(args, "snapshot-list", 1, 2)
+
+ snapshots = None
-+ if serverType == SERVER_XEN_API:
++ if serverType == SERVER_XEN_API:
+ snapshots = server.xenapi.VM.snapshot_list(get_single_vm(args[0]))
+ else:
+ snapshots = server.xend.domain.snapshot_list(args[0])
@@ -607,16 +624,16 @@
+
+def xm_snapshot_apply(args):
+ arg_check(args, "snapshot-apply", 2, 3)
-+
-+ if serverType == SERVER_XEN_API:
++
++ if serverType == SERVER_XEN_API:
+ server.xenapi.VM.snapshot_apply(get_single_vm(args[0]), args[1])
+ else:
+ server.xend.domain.snapshot_apply(args[0], args[1])
-+
++
+def xm_snapshot_delete(args):
+ arg_check(args, "snapshot-delete", 2, 3)
-+
-+ if serverType == SERVER_XEN_API:
++
++ if serverType == SERVER_XEN_API:
+ server.xenapi.VM.snapshot_delete(get_single_vm(args[0]), args[1])
+ else:
+ server.xend.domain.snapshot_delete(args[0], args[1])
@@ -624,7 +641,7 @@
def xm_save(args):
arg_check(args, "save", 2, 3)
-@@ -2762,6 +2837,10 @@ commands = {
+@@ -2853,6 +2928,10 @@ commands = {
"restore": xm_restore,
"resume": xm_resume,
"save": xm_save,
++++++ supported_module.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -2,10 +2,10 @@
Signed-off-by: K. Y. Srinivasan <ksrinivasan(a)novell.com>
-Index: xen-3.3.1-testing/unmodified_drivers/linux-2.6/Module.supported
+Index: xen-3.4.0-testing/unmodified_drivers/linux-2.6/Module.supported
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/unmodified_drivers/linux-2.6/Module.supported
++++ xen-3.4.0-testing/unmodified_drivers/linux-2.6/Module.supported
@@ -0,0 +1,5 @@
+xen-vbd
+xen-platform-pci
++++++ svm-lmsl.patch ++++++
Index: xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
===================================================================
--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/hvm.c
+++ xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
@@ -537,11 +537,12 @@ static int hvm_load_cpu_ctxt(struct doma
return -EINVAL;
}
- if ( (ctxt.msr_efer & ~(EFER_FFXSE | EFER_LME | EFER_LMA |
+ if ( (ctxt.msr_efer & ~(EFER_FFXSE | EFER_LMSLE | EFER_LME | EFER_LMA |
EFER_NX | EFER_SCE)) ||
((sizeof(long) != 8) && (ctxt.msr_efer & EFER_LME)) ||
(!cpu_has_nx && (ctxt.msr_efer & EFER_NX)) ||
(!cpu_has_syscall && (ctxt.msr_efer & EFER_SCE)) ||
+ (!cpu_has_lmsl && (ctxt.msr_efer & EFER_LMSLE)) ||
(!cpu_has_ffxsr && (ctxt.msr_efer & EFER_FFXSE)) ||
((ctxt.msr_efer & (EFER_LME|EFER_LMA)) == EFER_LMA) )
{
@@ -818,10 +819,11 @@ int hvm_set_efer(uint64_t value)
value &= ~EFER_LMA;
- if ( (value & ~(EFER_FFXSE | EFER_LME | EFER_NX | EFER_SCE)) ||
+ if ( (value & ~(EFER_FFXSE | EFER_LMSLE | EFER_LME | EFER_NX | EFER_SCE)) ||
((sizeof(long) != 8) && (value & EFER_LME)) ||
(!cpu_has_nx && (value & EFER_NX)) ||
(!cpu_has_syscall && (value & EFER_SCE)) ||
+ (!cpu_has_lmsl && (value & EFER_LMSLE)) ||
(!cpu_has_ffxsr && (value & EFER_FFXSE)) )
{
gdprintk(XENLOG_WARNING, "Trying to set reserved bit in "
Index: xen-3.4.0-testing/xen/arch/x86/hvm/svm/svm.c
===================================================================
--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/svm/svm.c
+++ xen-3.4.0-testing/xen/arch/x86/hvm/svm/svm.c
@@ -53,6 +53,11 @@
u32 svm_feature_flags;
+#ifdef __x86_64__
+/* indicate whether guest may use EFER.LMSLE */
+unsigned char cpu_has_lmsl = 0;
+#endif
+
#define set_segment_register(name, value) \
asm volatile ( "movw %%ax ,%%" STR(name) "" : : "a" (value) )
@@ -875,6 +880,22 @@ int start_svm(struct cpuinfo_x86 *c)
/* Initialize core's ASID handling. */
svm_asid_init(c);
+#ifdef __x86_64__
+ /*
+ * Check whether EFER.LMSLE can be written.
+ * Unfortunately there's no feature bit defined for this.
+ */
+ eax = read_efer();
+ edx = read_efer() >> 32;
+ if ( wrmsr_safe(MSR_EFER, eax | EFER_LMSLE, edx) == 0 )
+ rdmsr(MSR_EFER, eax, edx);
+ if ( eax & EFER_LMSLE )
+ {
+ cpu_has_lmsl = 1;
+ wrmsr(MSR_EFER, eax ^ EFER_LMSLE, edx);
+ }
+#endif
+
if ( cpu != 0 )
return 1;
Index: xen-3.4.0-testing/xen/include/asm-x86/hvm/hvm.h
===================================================================
--- xen-3.4.0-testing.orig/xen/include/asm-x86/hvm/hvm.h
+++ xen-3.4.0-testing/xen/include/asm-x86/hvm/hvm.h
@@ -134,6 +134,12 @@ struct hvm_function_table {
extern struct hvm_function_table hvm_funcs;
extern int hvm_enabled;
+#ifdef __i386__
+# define cpu_has_lmsl 0
+#else
+extern unsigned char cpu_has_lmsl;
+#endif
+
int hvm_domain_initialise(struct domain *d);
void hvm_domain_relinquish_resources(struct domain *d);
void hvm_domain_destroy(struct domain *d);
++++++ tapdisk-ioemu-logfile.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,21 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
+From 903a145f3eace5e3ae914f0335ab6c4e33635d2f Mon Sep 17 00:00:00 2001
+From: Kevin Wolf <kwolf(a)suse.de>
+Date: Tue, 10 Mar 2009 16:36:23 +0100
+Subject: [PATCH 4/6] tapdisk-ioemu: Write messages to a logfile
+
+Typically, tapdisk-ioemu runs as a daemon and messages to stderr are
+simply lost. Write them to a logfile instead.
+
+Signed-off-by: Kevin Wolf <kwolf(a)suse.de>
+---
+ tapdisk-ioemu.c | 19 +++++++++++++------
+ 1 files changed, 13 insertions(+), 6 deletions(-)
+
+Index: xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
-@@ -100,16 +100,23 @@ int main(void)
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
++++ xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
+@@ -78,15 +78,22 @@ int main(void)
struct timeval tv;
void *old_fd_start = NULL;
@@ -13,7 +26,6 @@
+ exit(0);
+
bdrv_init();
- qemu_aio_init();
init_blktap();
- /* Daemonize */
++++++ tapdisk-ioemu-shutdown-fix.patch ++++++
>From 9062564d79cb45029403cc998b48410e42ead924 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf(a)suse.de>
Date: Tue, 10 Mar 2009 16:45:44 +0100
Subject: [PATCH 6/6] tapdisk-ioemu: Fix shutdown condition
Even when opening the only image a tapdisk-ioemu instance is
responsible for fails, it can't immediately shut down. blktapctrl
still wants to communicate with tapdisk-ioemu and close the disk.
This patch changes tapdisk-ioemu to count the connections to
blktapctrl rather than the number of opened disk images.
Signed-off-by: Kevin Wolf <kwolf(a)suse.de>
---
hw/xen_blktap.c | 5 ++++-
tapdisk-ioemu.c | 13 ++++++++++---
2 files changed, 14 insertions(+), 4 deletions(-)
Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
+++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
@@ -65,6 +65,7 @@ int read_fd;
int write_fd;
static pid_t process;
+int connected_disks = 0;
fd_list_entry_t *fd_start = NULL;
extern char* get_snapshot_name(int devid);
@@ -547,6 +548,7 @@ static void handle_blktap_ctrlmsg(void*
/* Allocate the disk structs */
s = state_init();
+ connected_disks++;
/*Open file*/
if (s == NULL || open_disk(s, path, msg->drivertype, msg->readonly)) {
@@ -629,7 +631,8 @@ static void handle_blktap_ctrlmsg(void*
case CTLMSG_CLOSE:
s = get_state(msg->cookie);
if (s) unmap_disk(s);
- break;
+ connected_disks--;
+ break;
case CTLMSG_PID:
memset(buf, 0x00, MSG_SIZE);
Index: xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
===================================================================
--- xen-3.4.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
+++ xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
@@ -14,6 +14,7 @@ extern void qemu_aio_init(void);
extern void qemu_aio_poll(void);
extern void *fd_start;
+extern int connected_disks;
int domid = 0;
FILE* logfile;
@@ -76,7 +77,7 @@ int main(void)
int max_fd;
fd_set rfds;
struct timeval tv;
- void *old_fd_start = NULL;
+ int old_connected_disks = 0;
/* Daemonize */
if (fork() != 0)
@@ -128,11 +129,17 @@ int main(void)
pioh = &ioh->next;
}
+ if (old_connected_disks != connected_disks)
+ fprintf(stderr, "connected disks: %d => %d\n",
+ old_connected_disks, connected_disks);
+
/* Exit when the last image has been closed */
- if (old_fd_start != NULL && fd_start == NULL)
+ if (old_connected_disks != 0 && connected_disks == 0) {
+ fprintf(stderr, "Last image is closed, exiting.\n");
exit(0);
+ }
- old_fd_start = fd_start;
+ old_connected_disks = connected_disks;
}
return 0;
}
++++++ tmp_build.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/xenstore/Makefile
+Index: xen-3.4.0-testing/tools/xenstore/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/Makefile
-+++ xen-3.3.1-testing/tools/xenstore/Makefile
-@@ -60,6 +60,7 @@ $(CLIENTS_DOMU): xenstore
+--- xen-3.4.0-testing.orig/tools/xenstore/Makefile
++++ xen-3.4.0-testing/tools/xenstore/Makefile
+@@ -56,6 +56,7 @@ $(CLIENTS_DOMU): xenstore
xenstore: xenstore_client.o $(LIBXENSTORE)
$(CC) $(CFLAGS) $(LDFLAGS) $< -L. -lxenstore $(SOCKET_LIBS) -o $@
@@ -10,11 +10,11 @@
xenstore-control: xenstore_control.o $(LIBXENSTORE)
$(CC) $(CFLAGS) $(LDFLAGS) $< -L. -lxenstore $(SOCKET_LIBS) -o $@
-@@ -108,10 +109,11 @@ install: all
+@@ -104,10 +105,11 @@ install: all
$(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
- $(INSTALL_PROG) xenstore $(DESTDIR)/usr/bin
+ $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
set -e ; for c in $(CLIENTS) ; do \
-- ln -f $(DESTDIR)/usr/bin/xenstore $(DESTDIR)/usr/bin/$${c} ; \
+- ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
+ ln -fs /usr/bin/xenstore $(DESTDIR)/usr/bin/$${c} ; \
done
+ $(INSTALL_PROG) domu-xenstore $(DESTDIR)/bin
++++++ tools-gdbserver-build.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
+Index: xen-3.4.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
===================================================================
---- xen-3.3.1-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
-+++ xen-3.3.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
+--- xen-3.4.0-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
++++ xen-3.4.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
@@ -90,7 +90,7 @@ INCLUDE_CFLAGS = -I. -I${srcdir} -I$(src
GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
#PROFILE_CFLAGS = -pg
++++++ tools-kboot.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -13,10 +13,10 @@
tools/kboot/select-kernel | 59 +
9 files changed, 2111 insertions(+)
-Index: xen-3.3.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32
+Index: xen-3.4.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32
++++ xen-3.4.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32
@@ -0,0 +1,874 @@
+#
+# Automatically generated make config: don't edit
@@ -892,10 +892,10 @@
+CONFIG_X86_NO_TSS=y
+CONFIG_X86_NO_IDT=y
+CONFIG_KTIME_SCALAR=y
-Index: xen-3.3.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64
+Index: xen-3.4.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64
++++ xen-3.4.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64
@@ -0,0 +1,653 @@
+#
+# Automatically generated make config: don't edit
@@ -1550,17 +1550,17 @@
+# CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
-Index: xen-3.3.1-testing/buildconfigs/mk.linux-2.6-xenUboot
+Index: xen-3.4.0-testing/buildconfigs/mk.linux-2.6-xenUboot
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/buildconfigs/mk.linux-2.6-xenUboot
++++ xen-3.4.0-testing/buildconfigs/mk.linux-2.6-xenUboot
@@ -0,0 +1,2 @@
+EXTRAVERSION = xenUboot
+include buildconfigs/mk.linux-2.6-xen
-Index: xen-3.3.1-testing/tools/kboot/Makefile
+Index: xen-3.4.0-testing/tools/kboot/Makefile
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/Makefile
++++ xen-3.4.0-testing/tools/kboot/Makefile
@@ -0,0 +1,23 @@
+#
+# tools/kboot/Makefile
@@ -1585,10 +1585,10 @@
+kboot.initramfs: mkinitramfs init select-kernel ../xcutils/xc_kexec
+ sh ./mkinitramfs | tee $@
+
-Index: xen-3.3.1-testing/tools/kboot/README
+Index: xen-3.4.0-testing/tools/kboot/README
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/README
++++ xen-3.4.0-testing/tools/kboot/README
@@ -0,0 +1,43 @@
+
+This is a simple kexec-based boot loader
@@ -1633,10 +1633,10 @@
+
+--
+Gerd Hoffmann <kraxel(a)suse.de>
-Index: xen-3.3.1-testing/tools/kboot/init
+Index: xen-3.4.0-testing/tools/kboot/init
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/init
++++ xen-3.4.0-testing/tools/kboot/init
@@ -0,0 +1,309 @@
+#!/bin/sh
+
@@ -1947,10 +1947,10 @@
+msg "bye ..."
+banner "boot $guestos"
+xc_kexec -e
-Index: xen-3.3.1-testing/tools/kboot/mkinitramfs
+Index: xen-3.4.0-testing/tools/kboot/mkinitramfs
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/mkinitramfs
++++ xen-3.4.0-testing/tools/kboot/mkinitramfs
@@ -0,0 +1,111 @@
+#!/bin/sh
+
@@ -2063,10 +2063,10 @@
+ echo "file $LIB/$(basename $lib) $lib 0755 0 0"
+done
+echo
-Index: xen-3.3.1-testing/tools/kboot/select-kernel
+Index: xen-3.4.0-testing/tools/kboot/select-kernel
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/select-kernel
++++ xen-3.4.0-testing/tools/kboot/select-kernel
@@ -0,0 +1,59 @@
+#!/bin/sh
+
@@ -2127,10 +2127,10 @@
+msg "using $kernelname"
+echo "$kernelname"
+
-Index: xen-3.3.1-testing/make-kboot
+Index: xen-3.4.0-testing/make-kboot
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/make-kboot
++++ xen-3.4.0-testing/make-kboot
@@ -0,0 +1,37 @@
+#!/bin/sh
+
++++++ tools-xc_kexec.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -23,20 +23,20 @@
tools/xcutils/xc_kexec.c | 503 +++++++++++++++
19 files changed, 4988 insertions(+), 2 deletions(-)
-Index: xen-3.3.1-testing/tools/xcutils/Makefile
+Index: xen-3.4.0-testing/tools/xcutils/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/xcutils/Makefile
-+++ xen-3.3.1-testing/tools/xcutils/Makefile
-@@ -18,7 +18,7 @@ CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_
- CFLAGS += -Wp,-MD,.$((a)F).d
- PROG_DEP = .*.d
+--- xen-3.4.0-testing.orig/tools/xcutils/Makefile
++++ xen-3.4.0-testing/tools/xcutils/Makefile
+@@ -14,7 +14,7 @@ include $(XEN_ROOT)/tools/Rules.mk
+ CFLAGS += -Werror
+ CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
-PROGRAMS = xc_restore xc_save readnotes lsevtchn
+PROGRAMS = xc_restore xc_save readnotes lsevtchn xc_kexec
LDLIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
-@@ -31,6 +31,11 @@ build: $(PROGRAMS)
+@@ -27,6 +27,11 @@ build: $(PROGRAMS)
$(PROGRAMS): %: %.o
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
@@ -48,17 +48,17 @@
.PHONY: install
install: build
$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
-@@ -41,5 +46,6 @@ install: build
+@@ -37,5 +42,6 @@ install: build
clean:
$(RM) *.o $(PROGRAMS)
- $(RM) $(PROG_DEP)
+ $(RM) $(DEPS)
+ make -C helper clean
- -include $(PROG_DEP)
-Index: xen-3.3.1-testing/tools/xcutils/helper/Makefile
+ -include $(DEPS)
+Index: xen-3.4.0-testing/tools/xcutils/helper/Makefile
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/Makefile
++++ xen-3.4.0-testing/tools/xcutils/helper/Makefile
@@ -0,0 +1,39 @@
+
+XEN_ROOT = ../../..
@@ -99,10 +99,10 @@
+# dependencies
+
+$(XEN_TARGET_ARCH)/entry.o: $(XEN_TARGET_ARCH)/entry.S $(XEN_TARGET_ARCH)/offsets.h
-Index: xen-3.3.1-testing/tools/xcutils/helper/console.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/console.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/console.c
++++ xen-3.4.0-testing/tools/xcutils/helper/console.c
@@ -0,0 +1,69 @@
+#include <inttypes.h>
+
@@ -173,10 +173,10 @@
+
+ return printed_len;
+}
-Index: xen-3.3.1-testing/tools/xcutils/helper/ctype.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/ctype.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/ctype.c
++++ xen-3.4.0-testing/tools/xcutils/helper/ctype.c
@@ -0,0 +1,35 @@
+/*
+ * linux/lib/ctype.c
@@ -213,10 +213,10 @@
+_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */
+
+EXPORT_SYMBOL(_ctype);
-Index: xen-3.3.1-testing/tools/xcutils/helper/ctype.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/ctype.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/ctype.h
++++ xen-3.4.0-testing/tools/xcutils/helper/ctype.h
@@ -0,0 +1,54 @@
+#ifndef _LINUX_CTYPE_H
+#define _LINUX_CTYPE_H
@@ -272,10 +272,10 @@
+#define toupper(c) __toupper(c)
+
+#endif
-Index: xen-3.3.1-testing/tools/xcutils/helper/helper.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/helper.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/helper.h
++++ xen-3.4.0-testing/tools/xcutils/helper/helper.h
@@ -0,0 +1,107 @@
+#include <stdarg.h>
+#include <stddef.h>
@@ -384,10 +384,10 @@
+int sprintf(char * buf, const char *fmt, ...);
+int vsscanf(const char * buf, const char * fmt, va_list args);
+int sscanf(const char * buf, const char * fmt, ...);
-Index: xen-3.3.1-testing/tools/xcutils/helper/main.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/main.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/main.c
++++ xen-3.4.0-testing/tools/xcutils/helper/main.c
@@ -0,0 +1,651 @@
+#include <xenctrl.h>
+#include "hypercall.h"
@@ -1040,10 +1040,10 @@
+ printk("\r\n");
+ start_kernel();
+}
-Index: xen-3.3.1-testing/tools/xcutils/helper/make-offsets.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/make-offsets.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/make-offsets.c
++++ xen-3.4.0-testing/tools/xcutils/helper/make-offsets.c
@@ -0,0 +1,28 @@
+#include <stdio.h>
+#include <xenctrl.h>
@@ -1073,10 +1073,10 @@
+ vcpu_off("cr3", ctrlreg[3]);
+ return 0;
+}
-Index: xen-3.3.1-testing/tools/xcutils/helper/printk.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/printk.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/printk.c
++++ xen-3.4.0-testing/tools/xcutils/helper/printk.c
@@ -0,0 +1,1051 @@
+/*
+ * linux/kernel/printk.c
@@ -2129,10 +2129,10 @@
+ printk_ratelimit_burst);
+}
+EXPORT_SYMBOL(printk_ratelimit);
-Index: xen-3.3.1-testing/tools/xcutils/helper/string.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/string.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/string.c
++++ xen-3.4.0-testing/tools/xcutils/helper/string.c
@@ -0,0 +1,601 @@
+/*
+ * linux/lib/string.c
@@ -2735,10 +2735,10 @@
+}
+EXPORT_SYMBOL(memchr);
+#endif
-Index: xen-3.3.1-testing/tools/xcutils/helper/vsprintf.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/vsprintf.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/vsprintf.c
++++ xen-3.4.0-testing/tools/xcutils/helper/vsprintf.c
@@ -0,0 +1,842 @@
+/*
+ * linux/lib/vsprintf.c
@@ -3582,10 +3582,10 @@
+}
+
+EXPORT_SYMBOL(sscanf);
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_32/div64.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_32/div64.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_32/div64.h
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_32/div64.h
@@ -0,0 +1,48 @@
+#ifndef __I386_DIV64
+#define __I386_DIV64
@@ -3635,10 +3635,10 @@
+
+}
+#endif
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_32/entry.S
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_32/entry.S
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_32/entry.S
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_32/entry.S
@@ -0,0 +1,49 @@
+#include "offsets.h"
+
@@ -3689,10 +3689,10 @@
+ nop
+ .align 4096
+hypercall_end:
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_32/hypercall.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_32/hypercall.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_32/hypercall.h
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_32/hypercall.h
@@ -0,0 +1,359 @@
+/******************************************************************************
+ * hypercall.h
@@ -4053,10 +4053,10 @@
+
+
+#endif /* __HYPERCALL_H__ */
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_64/div64.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_64/div64.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_64/div64.h
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_64/div64.h
@@ -0,0 +1,57 @@
+#ifndef _ASM_GENERIC_DIV64_H
+#define _ASM_GENERIC_DIV64_H
@@ -4115,10 +4115,10 @@
+#endif /* BITS_PER_LONG */
+
+#endif /* _ASM_GENERIC_DIV64_H */
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_64/entry.S
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_64/entry.S
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_64/entry.S
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_64/entry.S
@@ -0,0 +1,50 @@
+#include "offsets.h"
+
@@ -4170,10 +4170,10 @@
+ nop
+ .align 4096
+hypercall_end:
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_64/hypercall.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_64/hypercall.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_64/hypercall.h
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_64/hypercall.h
@@ -0,0 +1,354 @@
+/******************************************************************************
+ * hypercall.h
@@ -4529,10 +4529,10 @@
+}
+
+#endif /* __HYPERCALL_H__ */
-Index: xen-3.3.1-testing/tools/xcutils/kexec-syscall.h
+Index: xen-3.4.0-testing/tools/xcutils/kexec-syscall.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/kexec-syscall.h
++++ xen-3.4.0-testing/tools/xcutils/kexec-syscall.h
@@ -0,0 +1,80 @@
+#ifndef KEXEC_SYSCALL_H
+#define KEXEC_SYSCALL_H
@@ -4614,10 +4614,10 @@
+#define KEXEC_MAX_SEGMENTS 16
+
+#endif /* KEXEC_SYSCALL_H */
-Index: xen-3.3.1-testing/tools/xcutils/xc_kexec.c
+Index: xen-3.4.0-testing/tools/xcutils/xc_kexec.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/xc_kexec.c
++++ xen-3.4.0-testing/tools/xcutils/xc_kexec.c
@@ -0,0 +1,503 @@
+#include <stdio.h>
+#include <stdlib.h>
@@ -4629,7 +4629,7 @@
+
+#include <xg_private.h>
+#include <xc_dom.h>
-+#include <xen/libelf.h>
++#include <xen/libelf/libelf.h>
+
+#include "kexec-syscall.h"
+
++++++ udev-rules.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/examples/xen-backend.rules
+Index: xen-3.4.0-testing/tools/hotplug/Linux/xen-backend.rules
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xen-backend.rules
-+++ xen-3.3.1-testing/tools/examples/xen-backend.rules
-@@ -7,3 +7,4 @@ SUBSYSTEM=="xen-backend", KERNEL=="vscsi
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/xen-backend.rules
++++ xen-3.4.0-testing/tools/hotplug/Linux/xen-backend.rules
+@@ -6,3 +6,4 @@ SUBSYSTEM=="xen-backend", KERNEL=="vscsi
SUBSYSTEM=="xen-backend", ACTION=="remove", RUN+="/etc/xen/scripts/xen-hotplug-cleanup"
KERNEL=="evtchn", NAME="xen/%k"
KERNEL=="blktap[0-9]*", NAME="xen/%k"
++++++ x86_64-5Tb.patch ++++++
Index: xen-3.4.0-testing/xen/arch/x86/boot/head.S
===================================================================
--- xen-3.4.0-testing.orig/xen/arch/x86/boot/head.S
+++ xen-3.4.0-testing/xen/arch/x86/boot/head.S
@@ -33,7 +33,7 @@ ENTRY(start)
/* Checksum: must be the negated sum of the first two fields. */
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
- .section .init.text
+ .section .init.text, "ax"
.Lbad_cpu_msg: .asciz "ERR: Not a 64-bit CPU!"
.Lbad_ldr_msg: .asciz "ERR: Not a Multiboot bootloader!"
@@ -128,13 +128,13 @@ __start:
loop 1b
/* Initialise L3 xen-map page directory entry. */
mov $(sym_phys(l2_xenmap)+7),%eax
- mov %eax,sym_phys(l3_xenmap) + (50*8)
+ mov %eax,sym_phys(l3_xenmap) + l3_table_offset(XEN_VIRT_START)*8
/* Hook identity-map and xen-map L3 tables into PML4. */
mov $(sym_phys(l3_identmap)+7),%eax
mov %eax,sym_phys(idle_pg_table) + ( 0*8) /* PML4[ 0]: 1:1 map */
- mov %eax,sym_phys(idle_pg_table) + (262*8) /* PML4[262]: 1:1 map */
+ mov %eax,sym_phys(idle_pg_table) + l4_table_offset(DIRECTMAP_VIRT_START)*8
mov $(sym_phys(l3_xenmap)+7),%eax
- mov %eax,sym_phys(idle_pg_table) + (261*8) /* PML4[261]: xen map */
+ mov %eax,sym_phys(idle_pg_table) + l4_table_offset(XEN_VIRT_START)*8
#else
/* Initialize low and high mappings of memory with 2MB pages */
mov $sym_phys(idle_pg_table_l2),%edi
Index: xen-3.4.0-testing/xen/arch/x86/e820.c
===================================================================
--- xen-3.4.0-testing.orig/xen/arch/x86/e820.c
+++ xen-3.4.0-testing/xen/arch/x86/e820.c
@@ -467,15 +467,19 @@ static void __init machine_specific_memo
"can be accessed by Xen in 32-bit mode.");
#else
{
- unsigned long limit, mpt_limit, pft_limit;
+ unsigned long limit, mpt_limit, ro_mpt_limit, pft_limit;
limit = DIRECTMAP_VIRT_END - DIRECTMAP_VIRT_START;
mpt_limit = ((RDWR_MPT_VIRT_END - RDWR_MPT_VIRT_START)
/ sizeof(unsigned long)) << PAGE_SHIFT;
+ ro_mpt_limit = ((RO_MPT_VIRT_END - RO_MPT_VIRT_START)
+ / sizeof(unsigned long)) << PAGE_SHIFT;
pft_limit = ((FRAMETABLE_VIRT_END - FRAMETABLE_VIRT_START)
/ sizeof(struct page_info)) << PAGE_SHIFT;
if ( limit > mpt_limit )
limit = mpt_limit;
+ if ( limit > ro_mpt_limit )
+ limit = ro_mpt_limit;
if ( limit > pft_limit )
limit = pft_limit;
clip_to_limit(limit,
Index: xen-3.4.0-testing/xen/include/asm-x86/config.h
===================================================================
--- xen-3.4.0-testing.orig/xen/include/asm-x86/config.h
+++ xen-3.4.0-testing/xen/include/asm-x86/config.h
@@ -124,10 +124,12 @@ extern unsigned int video_mode, video_fl
#define PML4_ADDR(_slot) \
((((_slot ## UL) >> 8) * 0xffff000000000000UL) | \
(_slot ## UL << PML4_ENTRY_BITS))
+#define GB(_gb) (_gb ## UL << 30)
#else
#define PML4_ENTRY_BYTES (1 << PML4_ENTRY_BITS)
#define PML4_ADDR(_slot) \
(((_slot >> 8) * 0xffff000000000000) | (_slot << PML4_ENTRY_BITS))
+#define GB(_gb) (_gb << 30)
#endif
/*
@@ -151,21 +153,19 @@ extern unsigned int video_mode, video_fl
* 0xffff828000000000 - 0xffff8283ffffffff [16GB, 2^34 bytes, PML4:261]
* Machine-to-phys translation table.
* 0xffff828400000000 - 0xffff8287ffffffff [16GB, 2^34 bytes, PML4:261]
- * Page-frame information array.
- * 0xffff828800000000 - 0xffff828bffffffff [16GB, 2^34 bytes, PML4:261]
* ioremap()/fixmap area.
- * 0xffff828c00000000 - 0xffff828c3fffffff [1GB, 2^30 bytes, PML4:261]
+ * 0xffff828800000000 - 0xffff82883fffffff [1GB, 2^30 bytes, PML4:261]
* Compatibility machine-to-phys translation table.
- * 0xffff828c40000000 - 0xffff828c7fffffff [1GB, 2^30 bytes, PML4:261]
+ * 0xffff828840000000 - 0xffff82887fffffff [1GB, 2^30 bytes, PML4:261]
* High read-only compatibility machine-to-phys translation table.
- * 0xffff828c80000000 - 0xffff828cbfffffff [1GB, 2^30 bytes, PML4:261]
+ * 0xffff828880000000 - 0xffff8288bfffffff [1GB, 2^30 bytes, PML4:261]
* Xen text, static data, bss.
- * 0xffff828cc0000000 - 0xffff82ffffffffff [461GB, PML4:261]
+ * 0xffff8288c0000000 - 0xffff82ffffffffff [221GB, PML4:261]
* Reserved for future use.
- * 0xffff830000000000 - 0xffff83ffffffffff [1TB, 2^40 bytes, PML4:262-263]
+ * 0xffff82c000000000 - 0xffff82ffffffffff [256GB, 2^38 bytes, PML4:261]
+ * Page-frame information array.
+ * 0xffff830000000000 - 0xffff87ffffffffff [5TB, 5*2^40 bytes, PML4:262-271]
* 1:1 direct mapping of all physical memory.
- * 0xffff840000000000 - 0xffff87ffffffffff [4TB, 2^42 bytes, PML4:264-271]
- * Reserved for future use.
* 0xffff880000000000 - 0xffffffffffffffff [120TB, PML4:272-511]
* Guest-defined use.
*
@@ -206,25 +206,25 @@ extern unsigned int video_mode, video_fl
#define PERDOMAIN_MBYTES ((unsigned long)GDT_LDT_MBYTES)
/* Slot 261: machine-to-phys conversion table (16GB). */
#define RDWR_MPT_VIRT_START (PML4_ADDR(261))
-#define RDWR_MPT_VIRT_END (RDWR_MPT_VIRT_START + (16UL<<30))
-/* Slot 261: page-frame information array (16GB). */
-#define FRAMETABLE_VIRT_START (RDWR_MPT_VIRT_END)
-#define FRAMETABLE_VIRT_END (FRAMETABLE_VIRT_START + (16UL<<30))
+#define RDWR_MPT_VIRT_END (RDWR_MPT_VIRT_START + GB(16))
/* Slot 261: ioremap()/fixmap area (16GB). */
-#define IOREMAP_VIRT_START (FRAMETABLE_VIRT_END)
-#define IOREMAP_VIRT_END (IOREMAP_VIRT_START + (16UL<<30))
+#define IOREMAP_VIRT_START RDWR_MPT_VIRT_END
+#define IOREMAP_VIRT_END (IOREMAP_VIRT_START + GB(16))
/* Slot 261: compatibility machine-to-phys conversion table (1GB). */
#define RDWR_COMPAT_MPT_VIRT_START IOREMAP_VIRT_END
-#define RDWR_COMPAT_MPT_VIRT_END (RDWR_COMPAT_MPT_VIRT_START + (1UL << 30))
+#define RDWR_COMPAT_MPT_VIRT_END (RDWR_COMPAT_MPT_VIRT_START + GB(1))
/* Slot 261: high read-only compat machine-to-phys conversion table (1GB). */
#define HIRO_COMPAT_MPT_VIRT_START RDWR_COMPAT_MPT_VIRT_END
-#define HIRO_COMPAT_MPT_VIRT_END (HIRO_COMPAT_MPT_VIRT_START + (1UL << 30))
+#define HIRO_COMPAT_MPT_VIRT_END (HIRO_COMPAT_MPT_VIRT_START + GB(1))
/* Slot 261: xen text, static data and bss (1GB). */
#define XEN_VIRT_START (HIRO_COMPAT_MPT_VIRT_END)
-#define XEN_VIRT_END (XEN_VIRT_START + (1UL << 30))
-/* Slot 262-263: A direct 1:1 mapping of all of physical memory. */
+#define XEN_VIRT_END (XEN_VIRT_START + GB(1))
+/* Slot 261: page-frame information array (256GB). */
+#define FRAMETABLE_VIRT_END DIRECTMAP_VIRT_START
+#define FRAMETABLE_VIRT_START (FRAMETABLE_VIRT_END - GB(256))
+/* Slot 262-271: A direct 1:1 mapping of all of physical memory. */
#define DIRECTMAP_VIRT_START (PML4_ADDR(262))
-#define DIRECTMAP_VIRT_END (DIRECTMAP_VIRT_START + PML4_ENTRY_BYTES*2)
+#define DIRECTMAP_VIRT_END (DIRECTMAP_VIRT_START + PML4_ENTRY_BYTES*10)
#ifndef __ASSEMBLY__
Index: xen-3.4.0-testing/xen/include/asm-x86/x86_64/page.h
===================================================================
--- xen-3.4.0-testing.orig/xen/include/asm-x86/x86_64/page.h
+++ xen-3.4.0-testing/xen/include/asm-x86/x86_64/page.h
@@ -16,8 +16,8 @@
#define L4_PAGETABLE_ENTRIES (1<<PAGETABLE_ORDER)
#define ROOT_PAGETABLE_ENTRIES L4_PAGETABLE_ENTRIES
-#define __PAGE_OFFSET (0xFFFF830000000000)
-#define __XEN_VIRT_START (0xFFFF828C80000000)
+#define __PAGE_OFFSET DIRECTMAP_VIRT_START
+#define __XEN_VIRT_START XEN_VIRT_START
/* These are architectural limits. Current CPUs support only 40-bit phys. */
#define PADDR_BITS 52
++++++ x86_64-note-init-p2m.patch ++++++
--- 2009-01-08.orig/tools/include/xen-foreign/reference.size 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/tools/include/xen-foreign/reference.size 2009-01-08 10:56:30.000000000 +0100
@@ -1,7 +1,7 @@
structs | x86_32 x86_64 ia64
-start_info | 1104 1152 1152
+start_info | 1112 1168 1168
trap_info | 8 16 -
pt_fpreg | - - 16
cpu_user_regs | 68 200 -
--- 2009-01-08.orig/xen/arch/x86/domain_build.c 2009-01-08 10:56:13.000000000 +0100
+++ 2009-01-08/xen/arch/x86/domain_build.c 2009-01-08 11:44:42.000000000 +0100
@@ -341,6 +341,12 @@ int __init construct_dom0(
#endif
}
+ if ( (parms.p2m_base != UNSET_ADDR) && elf_32bit(&elf) )
+ {
+ printk(XENLOG_WARNING "P2M table base ignored\n");
+ parms.p2m_base = UNSET_ADDR;
+ }
+
domain_set_alloc_bitsize(d);
/*
@@ -359,6 +365,8 @@ int __init construct_dom0(
vphysmap_end = vphysmap_start + (nr_pages * (!is_pv_32on64_domain(d) ?
sizeof(unsigned long) :
sizeof(unsigned int)));
+ if ( parms.p2m_base != UNSET_ADDR )
+ vphysmap_end = vphysmap_start;
vstartinfo_start = round_pgup(vphysmap_end);
vstartinfo_end = (vstartinfo_start +
sizeof(struct start_info) +
@@ -400,6 +408,11 @@ int __init construct_dom0(
/* Ensure that our low-memory 1:1 mapping covers the allocation. */
page = alloc_domheap_pages(d, order, MEMF_bits(30));
#else
+ if ( parms.p2m_base != UNSET_ADDR )
+ {
+ vphysmap_start = parms.p2m_base;
+ vphysmap_end = vphysmap_start + nr_pages * sizeof(unsigned long);
+ }
page = alloc_domheap_pages(d, order, 0);
#endif
if ( page == NULL )
@@ -740,8 +753,109 @@ int __init construct_dom0(
snprintf(si->magic, sizeof(si->magic), "xen-3.0-x86_%d%s",
elf_64bit(&elf) ? 64 : 32, parms.pae ? "p" : "");
+ count = d->tot_pages;
+#ifdef __x86_64__
+ /* Set up the phys->machine table if not part of the initial mapping. */
+ if ( parms.p2m_base != UNSET_ADDR )
+ {
+ unsigned long va = vphysmap_start;
+
+ if ( v_start <= vphysmap_end && vphysmap_start <= v_end )
+ panic("DOM0 P->M table overlaps initial mapping");
+
+ while ( va < vphysmap_end )
+ {
+ if ( d->tot_pages + ((round_pgup(vphysmap_end) - va)
+ >> PAGE_SHIFT) + 3 > nr_pages )
+ panic("Dom0 allocation too small for initial P->M table.\n");
+
+ l4tab = l4start + l4_table_offset(va);
+ if ( !l4e_get_intpte(*l4tab) )
+ {
+ page = alloc_domheap_pages(d, 0, 0);
+ if ( !page )
+ break;
+ /* No mapping, PGC_allocated + page-table page. */
+ page->count_info = PGC_allocated | 2;
+ page->u.inuse.type_info =
+ PGT_l3_page_table | PGT_validated | 1;
+ clear_page(page_to_virt(page));
+ *l4tab = l4e_from_page(page, L4_PROT);
+ }
+ l3tab = page_to_virt(l4e_get_page(*l4tab));
+ l3tab += l3_table_offset(va);
+ if ( !l3e_get_intpte(*l3tab) )
+ {
+ if ( cpu_has_page1gb &&
+ !(va & ((1UL << L3_PAGETABLE_SHIFT) - 1)) &&
+ vphysmap_end >= va + (1UL << L3_PAGETABLE_SHIFT) &&
+ (page = alloc_domheap_pages(d,
+ L3_PAGETABLE_SHIFT -
+ PAGE_SHIFT,
+ 0)) != NULL )
+ {
+ *l3tab = l3e_from_page(page,
+ L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
+ va += 1UL << L3_PAGETABLE_SHIFT;
+ continue;
+ }
+ else if ( (page = alloc_domheap_pages(d, 0, 0)) == NULL )
+ break;
+ else
+ {
+ /* No mapping, PGC_allocated + page-table page. */
+ page->count_info = PGC_allocated | 2;
+ page->u.inuse.type_info =
+ PGT_l2_page_table | PGT_validated | 1;
+ clear_page(page_to_virt(page));
+ *l3tab = l3e_from_page(page, L3_PROT);
+ }
+ }
+ l2tab = page_to_virt(l3e_get_page(*l3tab));
+ l2tab += l2_table_offset(va);
+ if ( !l2e_get_intpte(*l2tab) )
+ {
+ if ( !(va & ((1UL << L2_PAGETABLE_SHIFT) - 1)) &&
+ vphysmap_end >= va + (1UL << L2_PAGETABLE_SHIFT) &&
+ (page = alloc_domheap_pages(d,
+ L2_PAGETABLE_SHIFT -
+ PAGE_SHIFT,
+ 0)) != NULL )
+ {
+ *l2tab = l2e_from_page(page,
+ L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
+ va += 1UL << L2_PAGETABLE_SHIFT;
+ continue;
+ }
+ else if ( (page = alloc_domheap_pages(d, 0, 0)) == NULL )
+ break;
+ else
+ {
+ /* No mapping, PGC_allocated + page-table page. */
+ page->count_info = PGC_allocated | 2;
+ page->u.inuse.type_info =
+ PGT_l1_page_table | PGT_validated | 1;
+ clear_page(page_to_virt(page));
+ *l2tab = l2e_from_page(page, L2_PROT);
+ }
+ }
+ l1tab = page_to_virt(l2e_get_page(*l2tab));
+ l1tab += l1_table_offset(va);
+ BUG_ON(l1e_get_intpte(*l1tab));
+ page = alloc_domheap_pages(d, 0, 0);
+ if ( !page )
+ break;
+ *l1tab = l1e_from_page(page, L1_PROT|_PAGE_DIRTY);
+ va += PAGE_SIZE;
+ va &= PAGE_MASK;
+ }
+ if ( !page )
+ panic("Not enough RAM for DOM0 P->M table.\n");
+ }
+#endif
+
/* Write the phys->machine and machine->phys table entries. */
- for ( pfn = 0; pfn < d->tot_pages; pfn++ )
+ for ( pfn = 0; pfn < count; pfn++ )
{
mfn = pfn + alloc_spfn;
#ifndef NDEBUG
@@ -755,6 +869,26 @@ int __init construct_dom0(
((unsigned int *)vphysmap_start)[pfn] = mfn;
set_gpfn_from_mfn(mfn, pfn);
}
+ si->first_p2m_pfn = pfn;
+ si->nr_p2m_frames = d->tot_pages - count;
+ list_for_each_entry ( page, &d->page_list, list )
+ {
+ mfn = page_to_mfn(page);
+ if ( get_gpfn_from_mfn(mfn) >= count )
+ {
+ BUG_ON(is_pv_32bit_domain(d));
+ if ( !page->u.inuse.type_info &&
+ !get_page_and_type(page, d, PGT_writable_page) )
+ BUG();
+ ((unsigned long *)vphysmap_start)[pfn] = mfn;
+ set_gpfn_from_mfn(mfn, pfn);
+ ++pfn;
+#ifndef NDEBUG
+ ++alloc_epfn;
+#endif
+ }
+ }
+ BUG_ON(pfn != d->tot_pages);
while ( pfn < nr_pages )
{
if ( (page = alloc_chunk(d, nr_pages - d->tot_pages)) == NULL )
--- 2009-01-08.orig/xen/arch/x86/mm.c 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/arch/x86/mm.c 2009-01-08 10:56:30.000000000 +0100
@@ -1013,7 +1013,8 @@ static int put_page_from_l2e(l2_pgentry_
{
unsigned long mfn = l2e_get_pfn(l2e), m = mfn;
int writeable = l2e_get_flags(l2e) & _PAGE_RW;
- ASSERT(opt_allow_hugepage && !(mfn & (L1_PAGETABLE_ENTRIES-1)));
+
+ ASSERT(!(mfn & (L1_PAGETABLE_ENTRIES-1)));
do {
put_data_page(mfn_to_page(m), writeable);
} while ( m++ < (mfn + (L1_PAGETABLE_ENTRIES-1)) );
@@ -1031,14 +1032,28 @@ static int __put_page_type(struct page_i
static int put_page_from_l3e(l3_pgentry_t l3e, unsigned long pfn,
int partial, int preemptible)
{
- if ( (l3e_get_flags(l3e) & _PAGE_PRESENT) &&
- (l3e_get_pfn(l3e) != pfn) )
+ if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) || (l3e_get_pfn(l3e) == pfn) )
+ return 1;
+
+#ifdef __x86_64__
+ if ( unlikely(l3e_get_flags(l3e) & _PAGE_PSE) )
{
- if ( unlikely(partial > 0) )
- return __put_page_type(l3e_get_page(l3e), preemptible);
- return put_page_and_type_preemptible(l3e_get_page(l3e), preemptible);
+ unsigned long mfn = l3e_get_pfn(l3e);
+ int writeable = l3e_get_flags(l3e) & _PAGE_RW;
+
+ ASSERT(!(mfn & ((1UL << (L3_PAGETABLE_SHIFT - PAGE_SHIFT)) - 1)));
+ do {
+ put_data_page(mfn_to_page(mfn), writeable);
+ } while ( ++mfn & ((1UL << (L3_PAGETABLE_SHIFT - PAGE_SHIFT)) - 1) );
+
+ return 0;
}
- return 1;
+#endif
+
+ if ( unlikely(partial > 0) )
+ return __put_page_type(l3e_get_page(l3e), preemptible);
+
+ return put_page_and_type_preemptible(l3e_get_page(l3e), preemptible);
}
#if CONFIG_PAGING_LEVELS >= 4
--- 2009-01-08.orig/xen/common/libelf/libelf-dominfo.c 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/common/libelf/libelf-dominfo.c 2009-01-08 10:56:30.000000000 +0100
@@ -90,6 +90,7 @@ int elf_xen_parse_note(struct elf_binary
[XEN_ELFNOTE_ENTRY] = { "ENTRY", 0},
[XEN_ELFNOTE_HYPERCALL_PAGE] = { "HYPERCALL_PAGE", 0},
[XEN_ELFNOTE_VIRT_BASE] = { "VIRT_BASE", 0},
+ [XEN_ELFNOTE_INIT_P2M] = { "INIT_P2M", 0},
[XEN_ELFNOTE_PADDR_OFFSET] = { "PADDR_OFFSET", 0},
[XEN_ELFNOTE_HV_START_LOW] = { "HV_START_LOW", 0},
[XEN_ELFNOTE_XEN_VERSION] = { "XEN_VERSION", 1},
@@ -164,6 +165,9 @@ int elf_xen_parse_note(struct elf_binary
case XEN_ELFNOTE_ENTRY:
parms->virt_entry = val;
break;
+ case XEN_ELFNOTE_INIT_P2M:
+ parms->p2m_base = val;
+ break;
case XEN_ELFNOTE_PADDR_OFFSET:
parms->elf_paddr_offset = val;
break;
@@ -392,6 +396,7 @@ static int elf_xen_addr_calc_check(struc
elf_msg(elf, " virt_kstart = 0x%" PRIx64 "\n", parms->virt_kstart);
elf_msg(elf, " virt_kend = 0x%" PRIx64 "\n", parms->virt_kend);
elf_msg(elf, " virt_entry = 0x%" PRIx64 "\n", parms->virt_entry);
+ elf_msg(elf, " p2m_base = 0x%" PRIx64 "\n", parms->p2m_base);
if ( (parms->virt_kstart > parms->virt_kend) ||
(parms->virt_entry < parms->virt_kstart) ||
@@ -403,6 +408,15 @@ static int elf_xen_addr_calc_check(struc
return -1;
}
+ if ( (parms->p2m_base != UNSET_ADDR) &&
+ (parms->p2m_base >= parms->virt_kstart) &&
+ (parms->p2m_base < parms->virt_kend) )
+ {
+ elf_err(elf, "%s: ERROR: P->M table base is out of bounds.\n",
+ __FUNCTION__);
+ return -1;
+ }
+
return 0;
}
@@ -422,6 +436,7 @@ int elf_xen_parse(struct elf_binary *elf
parms->virt_entry = UNSET_ADDR;
parms->virt_hypercall = UNSET_ADDR;
parms->virt_hv_start_low = UNSET_ADDR;
+ parms->p2m_base = UNSET_ADDR;
parms->elf_paddr_offset = UNSET_ADDR;
/* Find and parse elf notes. */
--- 2009-01-08.orig/xen/include/public/elfnote.h 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/include/public/elfnote.h 2009-01-08 10:56:30.000000000 +0100
@@ -162,9 +162,20 @@
#define XEN_ELFNOTE_SUSPEND_CANCEL 14
/*
+ * The (non-default) location the initial phys-to-machine map should be
+ * placed at by the hypervisor (Dom0) or the tools (DomU).
+ * The kernel must be prepared for this mapping to be established using
+ * large pages, despite such otherwise not being available to guests.
+ * The kernel must also be able to handle the page table pages used for
+ * this mapping not being accessible through the initial mapping.
+ * (Only x86-64 supports this at present.)
+ */
+#define XEN_ELFNOTE_INIT_P2M 15
+
+/*
* The number of the highest elfnote defined.
*/
-#define XEN_ELFNOTE_MAX XEN_ELFNOTE_SUSPEND_CANCEL
+#define XEN_ELFNOTE_MAX XEN_ELFNOTE_INIT_P2M
/*
* System information exported through crash notes.
--- 2009-01-08.orig/xen/include/public/libelf.h 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/include/public/libelf.h 2009-01-08 10:56:30.000000000 +0100
@@ -232,6 +232,7 @@ struct elf_dom_parms {
uint64_t virt_entry;
uint64_t virt_hypercall;
uint64_t virt_hv_start_low;
+ uint64_t p2m_base;
uint64_t elf_paddr_offset;
uint32_t f_supported[XENFEAT_NR_SUBMAPS];
uint32_t f_required[XENFEAT_NR_SUBMAPS];
--- 2009-01-08.orig/xen/include/public/xen.h 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/include/public/xen.h 2009-01-08 10:56:30.000000000 +0100
@@ -513,6 +513,7 @@ typedef struct shared_info shared_info_t
* a. relocated kernel image
* b. initial ram disk [mod_start, mod_len]
* c. list of allocated page frames [mfn_list, nr_pages]
+ * (unless relocated due to XEN_ELFNOTE_INIT_P2M)
* d. start_info_t structure [register ESI (x86)]
* e. bootstrap page tables [pt_base, CR3 (x86)]
* f. bootstrap stack [register ESP (x86)]
@@ -554,6 +555,9 @@ struct start_info {
unsigned long mod_start; /* VIRTUAL address of pre-loaded module. */
unsigned long mod_len; /* Size (bytes) of pre-loaded module. */
int8_t cmd_line[MAX_GUEST_CMDLINE];
+ /* The pfn range here covers both page table and p->m table frames. */
+ unsigned long first_p2m_pfn;/* 1st pfn forming initial P->M table. */
+ unsigned long nr_p2m_frames;/* # of pfns forming initial P->M table. */
};
typedef struct start_info start_info_t;
++++++ x86-alloc-cpu-structs.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -101,10 +101,10 @@
cpufreq_driver = &powernow_cpufreq_driver;
-Index: xen-3.3.1-testing/xen/arch/x86/acpi/cpufreq/utility.c
+Index: xen-3.3.1-testing/xen/drivers/cpufreq/utility.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/acpi/cpufreq/utility.c
-+++ xen-3.3.1-testing/xen/arch/x86/acpi/cpufreq/utility.c
+--- xen-3.3.1-testing.orig/xen/drivers/cpufreq/utility.c
++++ xen-3.3.1-testing/xen/xen/drivers/cpufreq/utility.c
@@ -45,10 +45,12 @@ void px_statistic_suspend(void)
now = NOW();
@@ -323,10 +323,10 @@
stat->idle_time = v->runstate.time[RUNSTATE_running];
if ( v->is_running )
stat->idle_time += NOW() - v->runstate.state_entry_time;
-Index: xen-3.3.1-testing/xen/arch/x86/acpi/pmstat.c
+Index: xen-3.3.1-testing/xen/drivers/acpi/pmstat.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/acpi/pmstat.c
-+++ xen-3.3.1-testing/xen/arch/x86/acpi/pmstat.c
+--- xen-3.3.1-testing.orig/xen/drivers/acpi/pmstat.c
++++ xen-3.3.1-testing/xen/drivers/acpi/pmstat.c
@@ -41,7 +41,7 @@
#include <public/sysctl.h>
#include <acpi/cpufreq/cpufreq.h>
++++++ x86-cpufreq-report.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,5 +1,7 @@
---- a/xen/arch/x86/platform_hypercall.c
-+++ b/xen/arch/x86/platform_hypercall.c
+Index: xen-3.4.0-testing/xen/arch/x86/platform_hypercall.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/platform_hypercall.c
++++ xen-3.4.0-testing/xen/arch/x86/platform_hypercall.c
@@ -21,7 +21,7 @@
#include <xen/acpi.h>
#include <asm/current.h>
@@ -9,7 +11,7 @@
#include <asm/edd.h>
#include <asm/mtrr.h>
#include "cpu/mtrr/mtrr.h"
-@@ -55,6 +55,7 @@ static long cpu_frequency_change_helper(
+@@ -56,6 +56,7 @@ static long cpu_frequency_change_helper(
ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op)
{
ret_t ret = 0;
@@ -17,7 +19,7 @@
struct xen_platform_op curop, *op = &curop;
if ( !IS_PRIV(current->domain) )
-@@ -300,7 +301,6 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
+@@ -313,7 +314,6 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
{
uint32_t cpu;
uint64_t idletime, now = NOW();
@@ -25,7 +27,7 @@
struct xenctl_cpumap ctlmap;
cpumask_t cpumap;
XEN_GUEST_HANDLE(uint8) cpumap_bitmap;
-@@ -461,6 +461,19 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
+@@ -386,6 +386,20 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
break;
}
break;
@@ -38,16 +40,19 @@
+ break;
+ }
+
-+ op->u.get_cpu_freq.freq = xen_px_policy[v->processor].cur;
++ op->u.get_cpu_freq.freq = cpufreq_cpu_policy[v->processor] ?
++ cpufreq_cpu_policy[v->processor]->cur : 0;
+ if ( copy_field_to_guest(u_xenpf_op, op, u.get_cpu_freq.freq) )
+ ret = -EFAULT;
+ break;
default:
ret = -ENOSYS;
---- a/xen/arch/x86/x86_64/platform_hypercall.c
-+++ b/xen/arch/x86/x86_64/platform_hypercall.c
-@@ -21,6 +21,8 @@ DEFINE_XEN_GUEST_HANDLE(compat_platform_
+Index: xen-3.4.0-testing/xen/arch/x86/x86_64/platform_hypercall.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_64/platform_hypercall.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_64/platform_hypercall.c
+@@ -23,6 +23,8 @@ DEFINE_XEN_GUEST_HANDLE(compat_platform_
#define xen_processor_power_t compat_processor_power_t
#define set_cx_pminfo compat_set_cx_pminfo
@@ -56,8 +61,10 @@
#define xenpf_enter_acpi_sleep compat_pf_enter_acpi_sleep
#define COMPAT
---- a/xen/include/public/platform.h
-+++ b/xen/include/public/platform.h
+Index: xen-3.4.0-testing/xen/include/public/platform.h
+===================================================================
+--- xen-3.4.0-testing.orig/xen/include/public/platform.h
++++ xen-3.4.0-testing/xen/include/public/platform.h
@@ -312,6 +312,16 @@ struct xenpf_set_processor_pminfo {
typedef struct xenpf_set_processor_pminfo xenpf_set_processor_pminfo_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_set_processor_pminfo_t);
++++++ x86-extra-trap-info.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/xen/arch/x86/x86_32/entry.S
+Index: xen-3.4.0-testing/xen/arch/x86/x86_32/entry.S
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/x86_32/entry.S
-+++ xen-3.3.1-testing/xen/arch/x86/x86_32/entry.S
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_32/entry.S
++++ xen-3.4.0-testing/xen/arch/x86/x86_32/entry.S
@@ -401,21 +401,33 @@ ring1: /* obtain ss/esp from oldss/olde
movl %eax,UREGS_eip+4(%esp)
ret
@@ -46,10 +46,10 @@
domain_crash_synchronous:
pushl $domain_crash_synchronous_string
call printk
-Index: xen-3.3.1-testing/xen/arch/x86/x86_64/entry.S
+Index: xen-3.4.0-testing/xen/arch/x86/x86_64/entry.S
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/x86_64/entry.S
-+++ xen-3.3.1-testing/xen/arch/x86/x86_64/entry.S
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_64/entry.S
++++ xen-3.4.0-testing/xen/arch/x86/x86_64/entry.S
@@ -419,17 +419,30 @@ create_bounce_frame:
movq %rax,UREGS_rip+8(%rsp)
ret
++++++ x86-show-page-walk-early.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,6 +1,8 @@
---- a/xen/arch/x86/traps.c
-+++ b/xen/arch/x86/traps.c
-@@ -1273,6 +1273,7 @@ asmlinkage void do_early_page_fault(stru
+Index: xen-3.4.0-testing/xen/arch/x86/traps.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/traps.c
++++ xen-3.4.0-testing/xen/arch/x86/traps.c
+@@ -1293,6 +1293,7 @@ asmlinkage void do_early_page_fault(stru
unsigned long *stk = (unsigned long *)regs;
printk("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n",
regs->cs, _p(regs->eip), _p(cr2), regs->error_code);
@@ -8,8 +10,10 @@
printk("Stack dump: ");
while ( ((long)stk & ((PAGE_SIZE - 1) & ~(BYTES_PER_LONG - 1))) != 0 )
printk("%p ", _p(*stk++));
---- a/xen/arch/x86/x86_32/mm.c
-+++ b/xen/arch/x86/x86_32/mm.c
+Index: xen-3.4.0-testing/xen/arch/x86/x86_32/mm.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_32/mm.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_32/mm.c
@@ -38,6 +38,7 @@ extern l1_pgentry_t l1_identmap[L1_PAGET
unsigned int PAGE_HYPERVISOR = __PAGE_HYPERVISOR;
unsigned int PAGE_HYPERVISOR_NOCACHE = __PAGE_HYPERVISOR_NOCACHE;
@@ -27,8 +31,10 @@
/* Fill with an obvious debug pattern. */
for ( i = 0; i < (mpt_size / BYTES_PER_LONG); i++)
set_gpfn_from_mfn(i, 0x55555555);
---- a/xen/arch/x86/x86_32/traps.c
-+++ b/xen/arch/x86/x86_32/traps.c
+Index: xen-3.4.0-testing/xen/arch/x86/x86_32/traps.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_32/traps.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_32/traps.c
@@ -160,7 +160,8 @@ void show_page_walk(unsigned long addr)
l3t += (cr3 & 0xFE0UL) >> 3;
l3e = l3t[l3_table_offset(addr)];
@@ -59,17 +65,19 @@
printk(" L1[0x%03lx] = %"PRIpte" %08lx\n",
l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
unmap_domain_page(l1t);
---- a/xen/arch/x86/x86_64/mm.c
-+++ b/xen/arch/x86/x86_64/mm.c
-@@ -32,6 +32,7 @@
- #include <asm/msr.h>
+Index: xen-3.4.0-testing/xen/arch/x86/x86_64/mm.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_64/mm.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_64/mm.c
+@@ -33,6 +33,7 @@
+ #include <asm/numa.h>
#include <public/memory.h>
+int mpt_valid;
#ifdef CONFIG_COMPAT
unsigned int m2p_compat_vstart = __HYPERVISOR_COMPAT_VIRT_START;
#endif
-@@ -151,6 +152,8 @@ void __init paging_init(void)
+@@ -181,6 +182,8 @@ void __init paging_init(void)
l2_ro_mpt++;
}
@@ -78,9 +86,11 @@
/* Create user-accessible L2 directory to map the MPT for compat guests. */
BUILD_BUG_ON(l4_table_offset(RDWR_MPT_VIRT_START) !=
l4_table_offset(HIRO_COMPAT_MPT_VIRT_START));
---- a/xen/arch/x86/x86_64/traps.c
-+++ b/xen/arch/x86/x86_64/traps.c
-@@ -174,7 +174,8 @@ void show_page_walk(unsigned long addr)
+Index: xen-3.4.0-testing/xen/arch/x86/x86_64/traps.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_64/traps.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_64/traps.c
+@@ -176,7 +176,8 @@ void show_page_walk(unsigned long addr)
l4t = mfn_to_virt(mfn);
l4e = l4t[l4_table_offset(addr)];
mfn = l4e_get_pfn(l4e);
@@ -90,7 +100,7 @@
printk(" L4[0x%03lx] = %"PRIpte" %016lx\n",
l4_table_offset(addr), l4e_get_intpte(l4e), pfn);
if ( !(l4e_get_flags(l4e) & _PAGE_PRESENT) )
-@@ -183,7 +184,8 @@ void show_page_walk(unsigned long addr)
+@@ -185,7 +186,8 @@ void show_page_walk(unsigned long addr)
l3t = mfn_to_virt(mfn);
l3e = l3t[l3_table_offset(addr)];
mfn = l3e_get_pfn(l3e);
@@ -100,7 +110,7 @@
printk(" L3[0x%03lx] = %"PRIpte" %016lx%s\n",
l3_table_offset(addr), l3e_get_intpte(l3e), pfn,
(l3e_get_flags(l3e) & _PAGE_PSE) ? " (PSE)" : "");
-@@ -194,7 +196,8 @@ void show_page_walk(unsigned long addr)
+@@ -196,7 +198,8 @@ void show_page_walk(unsigned long addr)
l2t = mfn_to_virt(mfn);
l2e = l2t[l2_table_offset(addr)];
mfn = l2e_get_pfn(l2e);
@@ -110,7 +120,7 @@
printk(" L2[0x%03lx] = %"PRIpte" %016lx %s\n",
l2_table_offset(addr), l2e_get_intpte(l2e), pfn,
(l2e_get_flags(l2e) & _PAGE_PSE) ? "(PSE)" : "");
-@@ -205,7 +208,8 @@ void show_page_walk(unsigned long addr)
+@@ -207,7 +210,8 @@ void show_page_walk(unsigned long addr)
l1t = mfn_to_virt(mfn);
l1e = l1t[l1_table_offset(addr)];
mfn = l1e_get_pfn(l1e);
@@ -120,9 +130,11 @@
printk(" L1[0x%03lx] = %"PRIpte" %016lx\n",
l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
}
---- a/xen/include/asm-x86/mm.h
-+++ b/xen/include/asm-x86/mm.h
-@@ -330,6 +330,7 @@ TYPE_SAFE(unsigned long,mfn);
+Index: xen-3.4.0-testing/xen/include/asm-x86/mm.h
+===================================================================
+--- xen-3.4.0-testing.orig/xen/include/asm-x86/mm.h
++++ xen-3.4.0-testing/xen/include/asm-x86/mm.h
+@@ -411,6 +411,7 @@ TYPE_SAFE(unsigned long,mfn);
#define machine_to_phys_mapping ((unsigned long *)RDWR_MPT_VIRT_START)
#define INVALID_M2P_ENTRY (~0UL)
#define VALID_M2P(_e) (!((_e) & (1UL<<(BITS_PER_LONG-1))))
++++++ xen-3.3.1-testing-src.tar.bz2 -> xen-3.4.0-testing-src.tar.bz2 ++++++
xen/xen-3.3.1-testing-src.tar.bz2 /mounts/work_src_done/STABLE/xen/xen-3.4.0-testing-src.tar.bz2 differ: byte 11, line 1
++++++ xen-api-auth.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendAuthSessions.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendAuthSessions.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendAuthSessions.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendAuthSessions.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendAuthSessions.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendAuthSessions.py
@@ -84,7 +84,7 @@ class XendAuthSessions:
# if PAM doesn't exist, let's ignore it
return False
++++++ xenapi-console-protocol.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -3247,6 +3247,14 @@ class XendDomainInfo:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -3570,6 +3570,14 @@ class XendDomainInfo:
if not config.has_key('backend'):
config['backend'] = "00000000-0000-0000-0000-000000000000"
++++++ xen-changeset.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,13 +1,13 @@
-Index: xen-3.3.1-testing/xen/Makefile
+Index: xen-3.4.0-testing/xen/Makefile
===================================================================
---- xen-3.3.1-testing.orig/xen/Makefile
-+++ xen-3.3.1-testing/xen/Makefile
+--- xen-3.4.0-testing.orig/xen/Makefile
++++ xen-3.4.0-testing/xen/Makefile
@@ -1,3 +1,4 @@
+export XEN_CHANGESET = unavailable
# This is the correct place to edit the build version.
# All other places this is stored (eg. compile.h) should be autogenerated.
export XEN_VERSION = 3
-@@ -81,7 +82,7 @@ delete-unfresh-files:
+@@ -82,7 +83,7 @@ delete-unfresh-files:
@rm -f $@1 $@2
# compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
@@ -16,7 +16,7 @@
@sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
-e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \
-e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
-@@ -91,10 +92,9 @@ include/xen/compile.h: include/xen/compi
+@@ -92,10 +93,9 @@ include/xen/compile.h: include/xen/compi
-e 's/@@version@@/$(XEN_VERSION)/g' \
-e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
-e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
++++++ xen-config.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,24 +1,13 @@
-Index: xen-3.3.1-testing/Config.mk
+Index: xen-3.4.0-testing/Config.mk
===================================================================
---- xen-3.3.1-testing.orig/Config.mk
-+++ xen-3.3.1-testing/Config.mk
-@@ -85,20 +85,20 @@ QEMU_REMOTE=http://xenbits.xensource.com
-
+--- xen-3.4.0-testing.orig/Config.mk
++++ xen-3.4.0-testing/Config.mk
+@@ -117,14 +117,14 @@ QEMU_REMOTE=http://xenbits.xensource.com
# Specify which qemu-dm to use. This may be `ioemu' to use the old
# Mercurial in-tree version, or a local directory, or a git URL.
--# CONFIG_QEMU ?= ioemu
+ # CONFIG_QEMU ?= ../qemu-xen.git
+-CONFIG_QEMU ?= $(QEMU_REMOTE)
+CONFIG_QEMU ?= ioemu-remote
- # CONFIG_QEMU ?= ../qemu-xen.git
--ifeq ($(XEN_TARGET_ARCH),ia64)
--CONFIG_QEMU ?= ioemu
--else
--CONFIG_QEMU ?= $(QEMU_REMOTE)
--endif
-+# ifeq ($(XEN_TARGET_ARCH),ia64)
-+# CONFIG_QEMU ?= ioemu
-+# else
-+# CONFIG_QEMU ?= $(QEMU_REMOTE)
-+# endif
# Optional components
XENSTAT_XENTOP ?= y
++++++ xend-config.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/init.d/sysconfig.xendomains
+Index: xen-3.4.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/init.d/sysconfig.xendomains
-+++ xen-3.3.1-testing/tools/examples/init.d/sysconfig.xendomains
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xendomains
++++ xen-3.4.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains
@@ -1,4 +1,4 @@
-## Path: System/xen
+## Path: System/Virtualization
@@ -27,11 +27,11 @@
## Type: integer
## Default: 300
-Index: xen-3.3.1-testing/tools/examples/xend-config.sxp
+Index: xen-3.4.0-testing/tools/examples/xend-config.sxp
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xend-config.sxp
-+++ xen-3.3.1-testing/tools/examples/xend-config.sxp
-@@ -54,11 +54,12 @@
+--- xen-3.4.0-testing.orig/tools/examples/xend-config.sxp
++++ xen-3.4.0-testing/tools/examples/xend-config.sxp
+@@ -58,11 +58,12 @@
#(xend-http-server no)
@@ -44,9 +44,9 @@
#(xend-relocation-server no)
-(xend-relocation-server yes)
#(xend-relocation-ssl-server no)
+ #(xend-udev-event-server no)
- #(xend-unix-path /var/lib/xend/xend-socket)
-@@ -140,7 +141,8 @@
+@@ -145,7 +146,8 @@
#
# (network-script 'network-bridge netdev=eth1')
#
@@ -56,7 +56,7 @@
#
# (network-script 'network-bridge bridge=<name>')
#
-@@ -149,7 +151,12 @@
+@@ -154,7 +156,12 @@
# two fake interfaces per guest domain. To do things like this, write
# yourself a wrapper script, and call network-bridge from it, as appropriate.
#
@@ -64,13 +64,13 @@
+# SuSE users note:
+# On openSUSE >= 11.1 and SLES >= 11, networks should be configured using
+# native platform tool - YaST. vif-bridge and qemu-ifup can be used to
-+# connect vifs to the YaST-managed networks.
++# connect vifs to the YaST-managed networks.
+#(network-script network-bridge)
+(network-script )
# The script used to control virtual interfaces. This can be overridden on a
# per-vif basis when creating a domain or a configuring a new vif. The
-@@ -181,7 +188,7 @@
+@@ -186,7 +193,7 @@
# dom0-min-mem is the lowest permissible memory level (in MB) for dom0.
# This is a minimum both for auto-ballooning (as enabled by
# enable-dom0-ballooning below) and for xm mem-set when applied to dom0.
++++++ xend-core-dump-loc.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,13 +1,13 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -1867,7 +1867,7 @@ class XendDomainInfo:
- try:
- if not corefile:
- this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
-- corefile = "/var/xen/dump/%s-%s.%s.core" % (this_time,
-+ corefile = "/var/lib/xen/dump/%s-%s.%s.core" % (this_time,
- self.info['name_label'], self.domid)
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -2117,7 +2117,7 @@ class XendDomainInfo:
+
+ if not corefile:
+ this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
+- corefile = "/var/xen/dump/%s-%s.%s.core" % (this_time,
++ corefile = "/var/lib/xen/dump/%s-%s.%s.core" % (this_time,
+ self.info['name_label'], self.domid)
- if os.path.isdir(corefile):
+ if os.path.isdir(corefile):
++++++ xend-domain-lock.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,146 +1,76 @@
-Index: xen-3.3.1-testing/tools/examples/domain-lock
+Index: xen-3.4.0-testing/tools/examples/xend-config.sxp
===================================================================
---- /dev/null
-+++ xen-3.3.1-testing/tools/examples/domain-lock
-@@ -0,0 +1,83 @@
-+#!/bin/bash
-+
-+usage() {
-+ echo "usage: domain-lock [-l|-u|-s] [-n <vm name>] [-i <vm uuid>] [-p <physical host>] path"
-+ echo ""
-+ echo "-l lock"
-+ echo "-u unlock"
-+ echo "-s status (default)"
-+ echo "-n Virtual Machine name"
-+ echo "-i Virtual Machine Id or UUID"
-+ echo "-p Virtual Machine Server (physical host) name"
-+ echo "path A per-VM, unique location where external lock will be managed"
-+ exit 1
-+}
-+
-+create_lock() {
-+ local path=$1
-+ local name=$2
-+ local uuid=$3
-+ local host=$4
-+
-+ path=$path/lock
-+ cat > $path <<EOF
-+$name $uuid $host
-+EOF
-+}
-+
-+remove_lock(){
-+ local path=$1/lock
-+
-+ rm -f $path
-+}
-+
-+get_status() {
-+ local path=$1/lock
-+
-+ [ -f $path ] || exit 1
-+ echo `cat $path`
-+}
-+
-+mode="status"
-+
-+while getopts ":lusn:i:p:" opt; do
-+ case $opt in
-+ l )
-+ mode="lock"
-+ ;;
-+ u )
-+ mode="unlock"
-+ ;;
-+ s )
-+ mode="status"
-+ ;;
-+ p )
-+ vm_host=$OPTARG
-+ ;;
-+ n )
-+ vm_name=$OPTARG
-+ ;;
-+ i )
-+ vm_uuid=$OPTARG
-+ ;;
-+ \? )
-+ usage
-+ ;;
-+ esac
-+done
-+
-+shift $(($OPTIND - 1))
-+vm_path=$1
-+[ -z $vm_path ] && usage
-+
-+case $mode in
-+ lock )
-+ create_lock $vm_path $vm_name $vm_uuid $vm_host
-+ ;;
-+ unlock )
-+ remove_lock $vm_path
-+ ;;
-+ status )
-+ get_status $vm_path
-+ ;;
-+esac
-Index: xen-3.3.1-testing/tools/examples/xend-config.sxp
-===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xend-config.sxp
-+++ xen-3.3.1-testing/tools/examples/xend-config.sxp
-@@ -255,4 +255,46 @@
+--- xen-3.4.0-testing.orig/tools/examples/xend-config.sxp
++++ xen-3.4.0-testing/tools/examples/xend-config.sxp
+@@ -260,4 +260,64 @@
# Path where persistent domain configuration is stored.
# Default is /var/lib/xend/domains/
+#
#(xend-domains-path /var/lib/xend/domains)
+
-+# Create an external lock file when domains are started. Lock
-+# file is placed in xend-domains-lock-path/<domain_uuid> on domain
-+# startup and removed when domain is stopped. By default, a lock file
-+# is not created. Set to yes to enable lock file creation.
-+# Note that external locking mechanisms are no substitute for a cluster
-+# environment that protects shared resources, but may be useful in
-+# some circumstances nonetheless.
++# Domain Locking
++# In a multihost environment, domain locking prevents simultaneously
++# running a domain on more than one host.
++#
++# If enabled, xend will execute a external lock utility (defined below)
++# on each domain start and stop event. Disabled by default. Set to yes
++# to enable domain locking.
+#
+#(xend-domain-lock no)
+
+# Path where domain lock is stored if xend-domain-lock is enabled.
+# Note: This path must be accessible to all VM Servers participating
+# in domain locking, e.g. by specifying a shared mount point.
-+# Lock is placed in <xend-domain-lock-path>/<domain-uuid>.
++# Lock is placed in /<xend-domain-lock-path>/<domain-uuid>.
+# Default is /var/lib/xend/domains/
+#
+#(xend-domain-lock-path /var/lib/xend/domains)
+
-+# External locking utility for acquiring/releasing domain lock.
-+# By default /etc/xen/scripts/domain-lock will be used if
-+# xend-domain-lock is set to yes. Set to path of custom
-+# locking utility to override the default. Synopsis:
++# External locking utility called by xend for acquiring/releasing
++# domain lock. By default /etc/xen/scripts/domain-lock will be used
++# if xend-domain-lock is set to yes. Set to path of custom locking
++# utility to override the default.
+#
-+# lock-util <-l | -u | -s> [-n <vm-name>] [-i <vm-id>] [-p <phy-host>] path
-+#
-+# Utility should return zero on success, non-zero on error.
-+# -l lock Acquire (create) lock file
-+# -u unlock Remove lock file
-+# -s status Default action. If lock file exists, print contents on
-+# stdout and return 0)
-+# -p phy-host Name of physical host (dom0)
++# Synopsis of lock-util:
++# lock-util [-l|-u] -n <vm name> -i <vm uuid> -p <physical host> path"
++# -l Acquire (create) lock
++# -u Remove lock
+# -n vm-name Name of domain
+# -i vm-id Id or UUID of domain
-+# path A unique location for external lock must be specified
++# -p phy-host Name of physical host (dom0)
++# path /<xend-domain-lock-path>/<vm-uuid>
++# Return 0 on success, non-zero on error.
++#
++# lock-util [-s] path"
++# -s Lock status. If lock is acquired, print any contents
++# on stdout and return 0. Return non-zero if lock is
++# available.
++# path /<xend-domain-lock-path>/<vm-uuid>
++# If lock is acquired, print any contents on stdout and return 0.
++# Return non-zero if lock is available.
++#
++# Default lock-util behavior:
++# On domain start event, domain-lock will create and flock(1)
++# /<xend-domain-lock-path>/<vm-uuid>/lock. Every two seconds it
++# will write <vm-name>, <vm-id>, <vm-host>, and <tick> to the lock.
++# <tick> is running counter.
++# On domain stop event, domain-lock will unlock and remove
++# /<xend-domain-lock-path>/<vm-uuid>/lock.
+#
-+# The /etc/xen/scripts/domain-lock default utility will create
-+# <xend-domain-lock-path>/<vm-uuid>/lock and write <vm-name>, <vm-id>,
-+# and <vm-host> (if supplied) to the lock file in that order.
++# Note: If xend-domain-lock-path is a cluster-unaware file system,
++# administrator intervention may be required to remove stale
++# locks. Consider two hosts using NFS for xend-domain-lock-path
++# when HostA, running vm1, crashes. HostB could not acquire a
++# lock for vm1 since the NFS server holds an exclusive lock
++# acquired by HostA. The lock file must be manually removed
++# before starting vm1 on HostA.
+#
+#(xend-domain-lock-utility domain-lock)
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -30,11 +30,13 @@ import threading
import re
import copy
@@ -156,7 +86,7 @@
from xen.util.blkif import parse_uname
import xen.util.xsm.xsm as security
from xen.util import xsconstants
-@@ -443,6 +445,7 @@ class XendDomainInfo:
+@@ -452,6 +454,7 @@ class XendDomainInfo:
if self._stateGet() in (XEN_API_VM_POWER_STATE_HALTED, XEN_API_VM_POWER_STATE_SUSPENDED, XEN_API_VM_POWER_STATE_CRASHED):
try:
@@ -164,15 +94,7 @@
XendTask.log_progress(0, 30, self._constructDomain)
XendTask.log_progress(31, 60, self._initDomain)
-@@ -475,6 +478,7 @@ class XendDomainInfo:
- state = self._stateGet()
- if state in (DOM_STATE_SUSPENDED, DOM_STATE_HALTED):
- try:
-+ self.acquire_running_lock();
- self._constructDomain()
-
- try:
-@@ -2339,6 +2343,11 @@ class XendDomainInfo:
+@@ -2626,6 +2629,11 @@ class XendDomainInfo:
self._stateSet(DOM_STATE_HALTED)
self.domid = None # Do not push into _stateSet()!
@@ -184,28 +106,22 @@
finally:
self.refresh_shutdown_lock.release()
-@@ -3560,6 +3569,74 @@ class XendDomainInfo:
+@@ -3992,6 +4000,74 @@ class XendDomainInfo:
def has_device(self, dev_class, dev_uuid):
return (dev_uuid in self.info['%s_refs' % dev_class.lower()])
-+ # Check if domain has a lock file present
-+ def is_dom_locked(self, path):
-+ status = os.system('%s -s %s' % \
-+ (xoptions.get_xend_domain_lock_utility(), \
-+ path))
-+
-+ return status == 0
-+
-+ # Return name of host contained in lock file. Host should be last
-+ # entry in the lock file.
++ # Return name of host contained in lock file.
+ def get_lock_host(self, path):
+ fin = os.popen(xoptions.get_xend_domain_lock_utility() + \
+ ' -s ' + path, 'r')
+ hostname = "unknown"
+
+ try:
-+ line = fin.readline()
-+ hostname = line.split()[-1]
++ tokens = fin.readline().split()
++ for token in tokens:
++ item = token.split('=')
++ if item[0] == 'host':
++ hostname = item[1]
+ return hostname
+ finally:
+ fin.close()
@@ -215,12 +131,10 @@
+ if not xoptions.get_xend_domain_lock():
+ return
+
++ log.debug("Acquiring lock for domain %s" % self.info['name_label'])
+ path = xoptions.get_xend_domain_lock_path()
+ path = os.path.join(path, self.get_uuid())
+
-+ if self.is_dom_locked(path):
-+ raise XendError("The VM is locked and appears to be running on host %s." % self.get_lock_host(path))
-+
+ try:
+ if not os.path.exists(path):
+ mkdir.parents(path, stat.S_IRWXU)
@@ -235,47 +149,43 @@
+ self.info['uuid'], \
+ path))
+ if status != 0:
-+ raise XendError('Acquire running lock failed: %s' % status)
++ log.debug("Failed to aqcuire lock: status = %d" % status)
++ raise XendError("The VM is locked and appears to be running on host %s." % self.get_lock_host(path))
+
-+ # Release lock for domain. Should be called at end of domain cleanup
-+ def release_running_lock(self):
++ # Release lock for domain. No-op if domain locking is turned off.
++ def release_running_lock(self, name = None):
+ if not xoptions.get_xend_domain_lock():
+ return
+
++ dom_name = self.info['name_label']
++ if name:
++ dom_name = name
++ log.debug("Releasing lock for domain %s" % dom_name)
++
+ path = xoptions.get_xend_domain_lock_path()
+ path = os.path.join(path, self.get_uuid())
-+ status = os.system('%s -u %s' % \
++ status = os.system('%s -u -p %s -n %s -i %s %s' % \
+ (xoptions.get_xend_domain_lock_utility(), \
++ XendNode.instance().get_name(), \
++ dom_name, \
++ self.info['uuid'], \
+ path))
+ if status != 0:
-+ log.exception("Release running lock failed: %s" % status)
++ log.exception("Failed to release lock: status = %s" % status)
+ try:
+ if len(os.listdir(path)) == 0:
+ shutil.rmtree(path)
+ except:
+ log.exception("Failed to remove unmanaged directory %s." % path)
+
-+
def __str__(self):
return '<domain id=%s name=%s memory=%s state=%s>' % \
(str(self.domid), self.info['name_label'],
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomain.py
-===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomain.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomain.py
-@@ -1299,6 +1299,7 @@ class XendDomain:
- POWER_STATE_NAMES[DOM_STATE_RUNNING],
- POWER_STATE_NAMES[dominfo._stateGet()])
-
-+ dominfo.release_running_lock();
- """ The following call may raise a XendError exception """
- dominfo.testMigrateDevices(True, dst)
-
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendOptions.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendOptions.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendOptions.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendOptions.py
-@@ -135,6 +135,17 @@ class XendOptions:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendOptions.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendOptions.py
+@@ -141,6 +141,17 @@ class XendOptions:
"""Default rotation count of qemu-dm log file."""
qemu_dm_logrotate_count = 10
@@ -293,7 +203,7 @@
def __init__(self):
self.configure()
-@@ -358,6 +369,19 @@ class XendOptions:
+@@ -368,6 +379,19 @@ class XendOptions:
return self.get_config_int("qemu-dm-logrotate-count",
self.qemu_dm_logrotate_count)
@@ -313,15 +223,169 @@
class XendOptionsFile(XendOptions):
-Index: xen-3.3.1-testing/tools/examples/Makefile
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/Makefile
-+++ xen-3.3.1-testing/tools/examples/Makefile
-@@ -35,6 +35,7 @@ XEN_SCRIPTS += vtpm vtpm-delete
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
+@@ -117,6 +117,7 @@ def save(fd, dominfo, network, live, dst
+ dominfo.shutdown('suspend')
+ dominfo.waitForSuspend()
+ if line in ('suspend', 'suspended'):
++ dominfo.release_running_lock(domain_name)
+ dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
+ domain_name)
+ log.info("Domain %d suspended.", dominfo.getDomid())
+@@ -399,6 +400,7 @@ def restore(xd, fd, dominfo = None, paus
+ if not paused:
+ dominfo.unpause()
+
++ dominfo.acquire_running_lock()
+ return dominfo
+ except:
+ dominfo.destroy()
+Index: xen-3.4.0-testing/tools/hotplug/Linux/Makefile
+===================================================================
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/Makefile
++++ xen-3.4.0-testing/tools/hotplug/Linux/Makefile
+@@ -20,6 +20,7 @@ XEN_SCRIPTS += vtpm vtpm-delete
XEN_SCRIPTS += xen-hotplug-cleanup
XEN_SCRIPTS += external-device-migrate
XEN_SCRIPTS += vscsi
-+XEN_SCRIPTS += domain-lock
++XEN_SCRIPTS += domain-lock xen-monitor
XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh
XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh
XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh
+Index: xen-3.4.0-testing/tools/hotplug/Linux/domain-lock
+===================================================================
+--- /dev/null
++++ xen-3.4.0-testing/tools/hotplug/Linux/domain-lock
+@@ -0,0 +1,83 @@
++#!/bin/bash
++
++basedir=$(dirname "$0")
++
++usage() {
++ echo "usage: domain-lock [-l|-u] -n <vm name> -i <vm uuid> -p <physical host> path"
++ echo "usage: domain-lock [-s] path"
++ echo ""
++ echo "-l lock"
++ echo "-u unlock"
++ echo "-s status (default)"
++ echo "-n Virtual Machine name"
++ echo "-i Virtual Machine Id or UUID"
++ echo "-p Virtual Machine Server (physical host) name"
++ echo "path A per-VM, unique location where external lock will be managed"
++ exit 1
++}
++
++remove_lock(){
++ local path=$1/lock
++ local name=$2
++
++ pid=`ps -efwww | grep xen-monitor | grep $name | awk '{print $2}'`
++ if [ -n "$pid" ]; then
++ kill $pid
++ rm -f $path
++ fi
++}
++
++get_status(){
++ local path=$1/lock
++ [ -f $path ] || exit 1
++
++ rc=`flock -xn $path /bin/true`
++ cat $path
++ exit $rc
++}
++
++mode="status"
++
++while getopts ":lusn:i:p:" opt; do
++ case $opt in
++ l )
++ mode="lock"
++ ;;
++ u )
++ mode="unlock"
++ ;;
++ s )
++ mode="status"
++ ;;
++ p )
++ vm_host=$OPTARG
++ ;;
++ n )
++ vm_name=$OPTARG
++ ;;
++ i )
++ vm_uuid=$OPTARG
++ ;;
++ \? )
++ usage
++ ;;
++ esac
++done
++
++shift $(($OPTIND - 1))
++vm_path=$1
++
++case $mode in
++ lock )
++ [ -z "$vm_path" ] || [ -z "$vm_name" ] || [ -z "$vm_uuid" ] || [ -z "$vm_host" ] && usage
++ $basedir/set-lock $vm_path $vm_name $vm_uuid $vm_host
++ ;;
++ unlock )
++ [ -z "$vm_path" ] || [ -z "$vm_name" ] || [ -z "$vm_uuid" ] || [ -z "$vm_host" ] && usage
++ remove_lock $vm_path $vm_name $vm_uuid $vm_host
++ ;;
++ status )
++ [ -z "$vm_path" ] && usage
++ get_status $vm_path
++ ;;
++esac
+Index: xen-3.4.0-testing/tools/hotplug/Linux/xen-monitor
+===================================================================
+--- /dev/null
++++ xen-3.4.0-testing/tools/hotplug/Linux/xen-monitor
+@@ -0,0 +1,41 @@
++#!/bin/bash
++
++basedir=$(dirname "$0")
++HA_TICK=2
++
++monitor() {
++ local path=$1
++ local name=$2
++ local uuid=$3
++ local host=$4
++ local count=0
++ path=$path/lock
++
++ while :
++ do
++ echo "name=$name uuid=$uuid host=$host count=$count" > $path
++ count=$(($count+1))
++ sleep $HA_TICK
++ done&
++}
++
++create_lock() {
++ local path=$1/lock
++ local rc=0
++
++ [ -f $path ] || touch $path
++ flock -x -w $HA_TICK $path $basedir/xen-monitor $*
++ rc=$?
++ if [ $rc -eq 1 ]; then
++ echo `cat $path`
++ exit 1
++ else
++ exit $rc
++ fi
++}
++
++if [ $0 = "$basedir/set-lock" ]; then
++ create_lock $*
++elif [ $0 = "$basedir/xen-monitor" ]; then
++ monitor $*
++fi
++++++ xen-destdir.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/docs/Makefile
+Index: xen-3.4.0-testing/docs/Makefile
===================================================================
---- xen-3.3.1-testing.orig/docs/Makefile
-+++ xen-3.3.1-testing/docs/Makefile
+--- xen-3.4.0-testing.orig/docs/Makefile
++++ xen-3.4.0-testing/docs/Makefile
@@ -90,7 +90,8 @@ install: all
$(INSTALL_DIR) $(DESTDIR)$(MANDIR)
cp -dR man1 $(DESTDIR)$(MANDIR)
@@ -22,108 +22,50 @@
+ ln -sf $*.html html.done/$*/index.html
+ rm -rf html/
+
-Index: xen-3.3.1-testing/tools/examples/Makefile
+Index: xen-3.4.0-testing/tools/security/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/Makefile
-+++ xen-3.3.1-testing/tools/examples/Makefile
-@@ -47,18 +47,6 @@ XEN_HOTPLUG_SCRIPTS = xen-backend.agent
- UDEV_RULES_DIR = /etc/udev
- UDEV_RULES = xen-backend.rules
-
--DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
--DE = $(if $(DESTDIR),$(shell readlink -f $(DESTDIR)),)
--ifeq ($(findstring $(DI),$(DE)),$(DI))
--HOTPLUGS=install-hotplug install-udev
--else
--ifeq ($(shell [ -x /usr/bin/udevinfo ] && [ `/usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
--HOTPLUGS=install-udev
--else
--HOTPLUGS=install-hotplug
--endif
--endif
--
- .PHONY: all
- all:
-
-@@ -66,7 +54,7 @@ all:
- build:
-
- .PHONY: install
--install: all install-readmes install-initd install-configs install-scripts $(HOTPLUGS)
-+install: all install-readmes install-initd install-configs install-scripts install-udev
-
- .PHONY: install-readmes
- install-readmes:
-@@ -80,10 +68,10 @@ install-readmes:
- .PHONY: install-initd
- install-initd:
- [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
-- [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
-+ [ -d $(DESTDIR)/var/adm/fillup-templates ] || $(INSTALL_DIR) $(DESTDIR)/var/adm/fillup-templates/
- $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
- $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
-- $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
-+ $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/var/adm/fillup-templates/
-
- .PHONY: install-configs
- install-configs: $(XEN_CONFIGS)
-@@ -124,8 +112,7 @@ install-udev:
- $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
- set -e; for i in $(UDEV_RULES); \
- do \
-- $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
-- ln -sf ../$$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
- done
-
- .PHONY: clean
-Index: xen-3.3.1-testing/tools/security/Makefile
-===================================================================
---- xen-3.3.1-testing.orig/tools/security/Makefile
-+++ xen-3.3.1-testing/tools/security/Makefile
-@@ -64,9 +64,9 @@ install: all $(ACM_CONFIG_FILE)
+--- xen-3.4.0-testing.orig/tools/security/Makefile
++++ xen-3.4.0-testing/tools/security/Makefile
+@@ -61,7 +61,7 @@ install: all $(ACM_CONFIG_FILE)
$(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
$(INSTALL_PROG) $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
- ifndef XEN_PYTHON_NATIVE_INSTALL
-- python python/setup.py install --install-lib="$(DESTDIR)$(LIBPATH)/python"
-+ python python/setup.py install --install-lib="$(DESTDIR)$(LIBPATH)/python" --prefix=""
- else
-- python python/setup.py install --root="$(DESTDIR)"
-+ python python/setup.py install --root="$(DESTDIR)" --prefix="/usr"
- endif
+ python python/setup.py install \
+- --prefix="$(PREFIX)" --root="$(DESTDIR)" --force
++ --prefix="/usr" --root="$(DESTDIR)" --force
else
.PHONY: all
-Index: xen-3.3.1-testing/tools/pygrub/Makefile
+ all:
+Index: xen-3.4.0-testing/tools/pygrub/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/pygrub/Makefile
-+++ xen-3.3.1-testing/tools/pygrub/Makefile
-@@ -16,7 +16,7 @@ install: all
- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
- else
+--- xen-3.4.0-testing.orig/tools/pygrub/Makefile
++++ xen-3.4.0-testing/tools/pygrub/Makefile
+@@ -11,7 +11,7 @@ build:
+ .PHONY: install
install: all
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
-+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --prefix="/usr"
+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install \
+- --prefix="$(PREFIX)" --root="$(DESTDIR)" --force
++ --prefix="/usr" --root="$(DESTDIR)" --force
$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
- endif
-Index: xen-3.3.1-testing/tools/python/Makefile
+ .PHONY: clean
+Index: xen-3.4.0-testing/tools/python/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/python/Makefile
-+++ xen-3.3.1-testing/tools/python/Makefile
-@@ -80,7 +80,7 @@ install: install-messages install-dtd
- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force --install-lib="$(DESTDIR)$(LIBPATH)/python"
- else
+--- xen-3.4.0-testing.orig/tools/python/Makefile
++++ xen-3.4.0-testing/tools/python/Makefile
+@@ -56,7 +56,7 @@ refresh-po: $(POTFILE)
+ .PHONY: install
install: install-messages install-dtd
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
-+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --prefix="/usr" --force
- endif
+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install \
+- --prefix="$(PREFIX)" --root="$(DESTDIR)" --force
++ --prefix="/usr" --root="$(DESTDIR)" --force
install-dtd: all
-Index: xen-3.3.1-testing/tools/xenstore/Makefile
+ $(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
+Index: xen-3.4.0-testing/tools/xenstore/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/Makefile
-+++ xen-3.3.1-testing/tools/xenstore/Makefile
-@@ -14,6 +14,7 @@ DEP = .*.d
+--- xen-3.4.0-testing.orig/tools/xenstore/Makefile
++++ xen-3.4.0-testing/tools/xenstore/Makefile
+@@ -10,6 +10,7 @@ CFLAGS += $(CFLAGS_libxenctrl)
CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
CLIENTS += xenstore-write xenstore-ls
@@ -131,7 +73,7 @@
XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
-@@ -34,7 +35,7 @@ endif
+@@ -30,7 +31,7 @@ endif
all: libxenstore.so libxenstore.a xenstored clients xs_tdb_dump
.PHONY: clients
@@ -140,7 +82,7 @@
ifeq ($(CONFIG_SunOS),y)
xenstored_probes.h: xenstored_probes.d
-@@ -54,6 +55,9 @@ xenstored: $(XENSTORED_OBJS)
+@@ -50,6 +51,9 @@ xenstored: $(XENSTORED_OBJS)
$(CLIENTS): xenstore
ln -f xenstore $@
@@ -150,16 +92,16 @@
xenstore: xenstore_client.o $(LIBXENSTORE)
$(CC) $(CFLAGS) $(LDFLAGS) $< -L. -lxenstore $(SOCKET_LIBS) -o $@
-@@ -81,7 +85,7 @@ clean:
+@@ -77,7 +81,7 @@ clean:
rm -f *.a *.o *.opic *.so* xenstored_probes.h
rm -f xenstored xs_random xs_stress xs_crashme
rm -f xs_tdb_dump xenstore-control
- rm -f xenstore $(CLIENTS)
+ rm -f $(CLIENTS) $(CLIENTS_DOMU)
- $(RM) $(DEP)
+ $(RM) $(DEPS)
.PHONY: TAGS
-@@ -96,6 +100,7 @@ tarball: clean
+@@ -92,6 +96,7 @@ tarball: clean
install: all
$(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
$(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
@@ -167,9 +109,9 @@
$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-@@ -105,6 +110,9 @@ install: all
+@@ -101,6 +106,9 @@ install: all
set -e ; for c in $(CLIENTS) ; do \
- ln -f $(DESTDIR)/usr/bin/xenstore $(DESTDIR)/usr/bin/$${c} ; \
+ ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
done
+ for client in $(CLIENTS_DOMU); do \
+ $(INSTALL_PROG) $$client $(DESTDIR)/bin/$${client/domu-}; \
@@ -177,3 +119,55 @@
$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
$(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
+Index: xen-3.4.0-testing/tools/hotplug/Linux/Makefile
+===================================================================
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/Makefile
++++ xen-3.4.0-testing/tools/hotplug/Linux/Makefile
+@@ -31,18 +31,6 @@ XEN_HOTPLUG_SCRIPTS = xen-backend.agent
+ UDEV_RULES_DIR = /etc/udev
+ UDEV_RULES = xen-backend.rules xend.rules
+
+-DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
+-DE = $(if $(DESTDIR),$(shell readlink -f $(DESTDIR)),)
+-ifeq ($(findstring $(DI),$(DE)),$(DI))
+-HOTPLUGS=install-hotplug install-udev
+-else
+-ifeq ($(shell [ -x /usr/bin/udevinfo ] && [ `/usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
+-HOTPLUGS=install-udev
+-else
+-HOTPLUGS=install-hotplug
+-endif
+-endif
+-
+ .PHONY: all
+ all:
+
+@@ -50,15 +38,15 @@ all:
+ build:
+
+ .PHONY: install
+-install: all install-initd install-scripts $(HOTPLUGS)
++install: all install-initd install-scripts install-udev
+
+ .PHONY: install-initd
+ install-initd:
+ [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
+- [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
++ [ -d $(DESTDIR)/var/adm/fillup-templates ] || $(INSTALL_DIR) $(DESTDIR)/var/adm/fillup-templates/
+ $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
+ $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
+- $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
++ $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/var/adm/fillup-templates/
+
+ .PHONY: install-scripts
+ install-scripts:
+@@ -88,8 +76,7 @@ install-udev:
+ $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
+ set -e; for i in $(UDEV_RULES); \
+ do \
+- $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
+- ln -sf ../$$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
++ $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
+ done
+
+ .PHONY: clean
++++++ xen-disable-qemu-monitor.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -5,11 +5,11 @@
commands that can read/write dom0's state.
-Index: xen-3.3.1-testing/tools/ioemu-remote/monitor.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/monitor.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/monitor.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/monitor.c
-@@ -1320,6 +1320,7 @@ static term_cmd_t term_cmds[] = {
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/monitor.c
++++ xen-3.4.0-testing/tools/ioemu-remote/monitor.c
+@@ -1481,6 +1481,7 @@ static const term_cmd_t term_cmds[] = {
"device|all", "commit changes to the disk images (if -snapshot is used) or backing files" },
{ "info", "s?", do_info,
"subcommand", "show various information about the system state" },
@@ -17,7 +17,7 @@
{ "q|quit", "", do_quit,
"", "quit the emulator" },
{ "eject", "-fB", do_eject,
-@@ -1332,6 +1333,7 @@ static term_cmd_t term_cmds[] = {
+@@ -1493,6 +1494,7 @@ static const term_cmd_t term_cmds[] = {
"filename", "output logs to 'filename'" },
{ "log", "s", do_log,
"item1[,...]", "activate logging of the specified items to '/tmp/qemu.log'" },
@@ -25,7 +25,7 @@
{ "savevm", "s?", do_savevm,
"tag|id", "save a VM snapshot. If no tag or id are provided, a new snapshot is created" },
{ "loadvm", "s", do_loadvm,
-@@ -1361,12 +1363,14 @@ static term_cmd_t term_cmds[] = {
+@@ -1522,12 +1524,14 @@ static const term_cmd_t term_cmds[] = {
"", "reset the system" },
{ "system_powerdown", "", do_system_powerdown,
"", "send system power down event" },
@@ -40,7 +40,7 @@
#ifdef CONFIG_PHP_DEBUG
{ "pci_add", "s", do_pci_add,
"device", "insert PCI pass-through device by BDF,e.g. (dom, bus, dev, func) by hex '0x0, 0x3, 0x0, 0x0'" },
-@@ -1381,6 +1385,7 @@ static term_cmd_t term_cmds[] = {
+@@ -1542,6 +1546,7 @@ static const term_cmd_t term_cmds[] = {
"state", "change mouse button state (1=L, 2=M, 4=R)" },
{ "mouse_set", "i", do_mouse_set,
"index", "set which mouse device receives events" },
@@ -48,26 +48,26 @@
#ifdef HAS_AUDIO
{ "wavcapture", "si?i?i?", do_wav_capture,
"path [frequency bits channels]",
-@@ -1388,6 +1393,7 @@ static term_cmd_t term_cmds[] = {
+@@ -1549,6 +1554,7 @@ static const term_cmd_t term_cmds[] = {
#endif
- { "stopcapture", "i", do_stop_capture,
- "capture index", "stop capture" },
+ { "stopcapture", "i", do_stop_capture,
+ "capture index", "stop capture" },
+#endif
{ "memsave", "lis", do_memory_save,
"addr size file", "save to disk virtual memory dump starting at 'addr' of size 'size'", },
{ "pmemsave", "lis", do_physical_memory_save,
-@@ -1434,6 +1440,7 @@ static term_cmd_t info_cmds[] = {
- "", "show kqemu information", },
+@@ -1628,6 +1634,7 @@ static const term_cmd_t info_cmds[] = {
+ "", "show KVM information", },
{ "usb", "", usb_info,
"", "show guest USB devices", },
+#ifdef CONFIG_TRUSTED_CLIENT
{ "usbhost", "", usb_host_info,
"", "show host USB devices", },
{ "profile", "", do_info_profile,
-@@ -1458,6 +1465,7 @@ static term_cmd_t info_cmds[] = {
- { "slirp", "", do_info_slirp,
- "", "show SLIRP statistics", },
- #endif
+@@ -1659,6 +1666,7 @@ static const term_cmd_t info_cmds[] = {
+ { "migrate", "", do_info_migrate, "", "show migration status" },
+ { "balloon", "", do_info_balloon,
+ "", "show balloon information" },
+#endif
{ NULL, NULL, },
};
++++++ xen-domUloader.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/python/xen/util/blkif.py
+Index: xen-3.4.0-testing/tools/python/xen/util/blkif.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/util/blkif.py
-+++ xen-3.3.1-testing/tools/python/xen/util/blkif.py
+--- xen-3.4.0-testing.orig/tools/python/xen/util/blkif.py
++++ xen-3.4.0-testing/tools/python/xen/util/blkif.py
@@ -71,23 +71,24 @@ def blkdev_segment(name):
'type' : 'Disk' }
return val
@@ -12,7 +12,7 @@
+ fn = typ = taptype = None
if uname.find(":") != -1:
(typ, fn) = uname.split(":", 1)
- if typ == "phy" and not fn.startswith("/"):
+ if typ in ("phy", "drbd") and not fn.startswith("/"):
fn = "/dev/%s" %(fn,)
if typ == "tap":
(taptype, fn) = fn.split(":", 1)
@@ -32,11 +32,11 @@
def mount_mode(name):
mode = None
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/DevController.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/DevController.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/DevController.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/DevController.py
-@@ -620,6 +620,31 @@ class DevController:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/DevController.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/DevController.py
+@@ -593,6 +593,31 @@ class DevController:
return (Missing, None)
@@ -68,22 +68,20 @@
def backendPath(self, backdom, devid):
"""Construct backend path given the backend domain and device id.
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendBootloader.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendBootloader.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendBootloader.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendBootloader.py
-@@ -12,8 +12,9 @@
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendBootloader.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendBootloader.py
+@@ -12,7 +12,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-import os, select, errno, stat, signal, tty
+import os, select, errno, stat, signal, tty, time
import random
-+import re
import shlex
from xen.xend import sxp
-
-@@ -38,8 +39,25 @@ def bootloader(blexec, disk, dom, quiet
+@@ -38,8 +38,25 @@ def bootloader(blexec, disk, dom, quiet
msg = "Bootloader isn't executable"
log.error(msg)
raise VmError(msg)
@@ -111,25 +109,10 @@
log.error(msg)
raise VmError(msg)
-@@ -184,3 +202,14 @@ def bootloader_tidy(dom):
- os.kill(pid, signal.SIGKILL)
-
-
-+def bootfilter(bootloader, bootloader_args, vdisk):
-+ """Is this virtual disk ok to boot from?"""
-+ if vdisk.endswith(':disk'):
-+ vdisk = vdisk[:-5] # temporary work-around for bug 237414
-+ if bootloader.endswith('domUloader.py'):
-+ for arg in bootloader_args.split():
-+ if arg.startswith('--entry='):
-+ m = re.match(r'^([hsx]v?d[a-z])[0-9]*:[^,]*(,[^,]*)?$', arg[8:])
-+ if m:
-+ return vdisk == m.group(1) or vdisk == m.group(2)
-+ return True
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -35,7 +35,7 @@ from types import StringTypes
import xen.lowlevel.xc
@@ -139,16 +122,7 @@
import xen.util.xsm.xsm as security
from xen.util import xsconstants
-@@ -43,7 +43,7 @@ from xen.xend import balloon, sxp, uuid,
- from xen.xend import XendOptions, XendNode, XendConfig
-
- from xen.xend.XendConfig import scrub_password
--from xen.xend.XendBootloader import bootloader, bootloader_tidy
-+from xen.xend.XendBootloader import bootloader, bootloader_tidy, bootfilter
- from xen.xend.XendError import XendError, VmError
- from xen.xend.XendDevices import XendDevices
- from xen.xend.XendTask import XendTask
-@@ -1878,6 +1878,10 @@ class XendDomainInfo:
+@@ -2134,6 +2134,10 @@ class XendDomainInfo:
deviceClass, config = self.info['devices'].get(dev_uuid)
self._waitForDevice(deviceClass, config['devid'])
@@ -159,21 +133,7 @@
def _waitForDevice_destroy(self, deviceClass, devid, backpath):
return self.getDeviceController(deviceClass).waitForDevice_destroy(
devid, backpath)
-@@ -2569,8 +2573,11 @@ class XendDomainInfo:
- blexec = osdep.pygrub_path
-
- blcfg = None
-- disks = [x for x in self.info['vbd_refs']
-- if self.info['devices'][x][1]['bootable']]
-+ disks = []
-+ for x in self.info['vbd_refs']:
-+ vdisk = self.info['devices'][x][1]['dev']
-+ if bootfilter(blexec, bootloader_args, vdisk):
-+ disks.append(x)
-
- if not disks:
- msg = "Had a bootloader specified, but no disks are bootable"
-@@ -2581,13 +2588,10 @@ class XendDomainInfo:
+@@ -2892,9 +2896,19 @@ class XendDomainInfo:
devtype = devinfo[0]
disk = devinfo[1]['uname']
@@ -181,16 +141,22 @@
- taptype = blkdev_uname_to_taptype(disk)
- mounted = devtype == 'tap' and taptype != 'aio' and taptype != 'sync' and not os.stat(fn).st_rdev
+ (fn, types) = parse_uname(disk)
-+ mounted = (types[0] not in ('file', 'phy'))
++
++ def _shouldMount(types):
++ if types[0] in ('file', 'phy'):
++ return False
++ if types[0] == 'tap':
++ if types[1] in ('aio', 'sync'):
++ return False
++ else:
++ return True
++ return os.access('/etc/xen/scripts/block-%s' % types[0], os.X_OK)
++
++ mounted = _shouldMount(types)
if mounted:
-- # This is a file, not a device. pygrub can cope with a
-- # file if it's raw, but if it's QCOW or other such formats
-- # used through blktap, then we need to mount it first.
-+ # This is not a raw file or device, so we need to mount it first.
-
- log.info("Mounting %s on %s." %
- (fn, BOOTLOADER_LOOPBACK_DEVICE))
-@@ -2599,7 +2603,9 @@ class XendDomainInfo:
+ # This is a file, not a device. pygrub can cope with a
+ # file if it's raw, but if it's QCOW or other such formats
+@@ -2910,7 +2924,9 @@ class XendDomainInfo:
from xen.xend import XendDomain
dom0 = XendDomain.instance().privilegedDomain()
@@ -201,12 +167,16 @@
fn = BOOTLOADER_LOOPBACK_DEVICE
try:
-@@ -2610,7 +2616,7 @@ class XendDomainInfo:
+@@ -2920,8 +2936,10 @@ class XendDomainInfo:
+ if mounted:
log.info("Unmounting %s from %s." %
(fn, BOOTLOADER_LOOPBACK_DEVICE))
-
+-
- dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
-+ dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True)
++ if devtype == 'tap':
++ dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
++ else:
++ dom0.destroyDevice('vbd', BOOTLOADER_LOOPBACK_DEVICE)
if blcfg is None:
msg = "Had a bootloader specified, but can't find disk"
++++++ xen-fixme-doc.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+Index: xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xmdomain.cfg.pod.5
-+++ xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+--- xen-3.4.0-testing.orig/docs/man/xmdomain.cfg.pod.5
++++ xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
@@ -335,16 +335,10 @@ at hda1, which is the root filesystem.
=item I<NFS Root>
@@ -19,10 +19,10 @@
=back
=head1 SEE ALSO
-Index: xen-3.3.1-testing/docs/man/xm.pod.1
+Index: xen-3.4.0-testing/docs/man/xm.pod.1
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xm.pod.1
-+++ xen-3.3.1-testing/docs/man/xm.pod.1
+--- xen-3.4.0-testing.orig/docs/man/xm.pod.1
++++ xen-3.4.0-testing/docs/man/xm.pod.1
@@ -297,7 +297,8 @@ scheduling by the Xen hypervisor.
=item B<s - shutdown>
++++++ xen-hvm-default-bridge.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,9 +1,9 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/vl.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/net.h
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/vl.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/vl.c
-@@ -134,8 +134,8 @@ int inet_aton(const char *cp, struct in_
- #include "exec-all.h"
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/net.h
++++ xen-3.4.0-testing/tools/ioemu-remote/net.h
+@@ -107,8 +107,8 @@ void net_host_device_add(const char *dev
+ void net_host_device_remove(int vlan_id, const char *device);
#ifndef DEFAULT_NETWORK_SCRIPT
-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
@@ -13,26 +13,28 @@
#endif
#ifdef __sun__
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
-@@ -4997,10 +4997,10 @@ static int net_client_init(const char *s
- pstrcpy(down_script, sizeof(down_script), DEFAULT_NETWORK_DOWN_SCRIPT);
+Index: xen-3.4.0-testing/tools/ioemu-remote/net.c
+===================================================================
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/net.c
++++ xen-3.4.0-testing/tools/ioemu-remote/net.c
+@@ -1759,9 +1759,10 @@ int net_client_init(const char *device,
}
if (get_param_value(script_arg, sizeof(script_arg), "scriptarg", p) == 0 &&
-- get_param_value(script_arg, sizeof(script_arg), "bridge", p) == 0) { /* deprecated; for xend compatibility */
+ get_param_value(script_arg, sizeof(script_arg), "bridge", p) == 0) { /* deprecated; for xend compatibility */
- pstrcpy(script_arg, sizeof(script_arg), "");
-- }
-- ret = net_tap_init(vlan, ifname, setup_script, down_script, script_arg);
-+ get_param_value(script_arg, sizeof(script_arg), "bridge", p) == 0) /* deprecated; for xend compatibility */
-+ ret = net_tap_init(vlan, ifname, setup_script, NULL, NULL);
-+ else
-+ ret = net_tap_init(vlan, ifname, setup_script, down_script, script_arg);
++ ret = net_tap_init(vlan, device, name, ifname, setup_script, NULL, NULL);
++ } else {
++ ret = net_tap_init(vlan, device, name, ifname, setup_script, down_script, script_arg);
+ }
+- ret = net_tap_init(vlan, device, name, ifname, setup_script, down_script, script_arg);
}
} else
#endif
-Index: xen-3.3.1-testing/tools/python/xen/xend/image.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/image.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/image.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/image.py
-@@ -764,14 +764,16 @@ class HVMImageHandler(ImageHandler):
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/image.py
++++ xen-3.4.0-testing/tools/python/xen/xend/image.py
+@@ -832,14 +832,16 @@ class HVMImageHandler(ImageHandler):
mac = devinfo.get('mac')
if mac is None:
raise VmError("MAC address not specified or generated.")
@@ -52,10 +54,10 @@
if nics == 0:
ret.append("-net")
-Index: xen-3.3.1-testing/tools/ioemu-remote/i386-dm/qemu-ifup
+Index: xen-3.4.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/i386-dm/qemu-ifup
-+++ xen-3.3.1-testing/tools/ioemu-remote/i386-dm/qemu-ifup
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/i386-dm/qemu-ifup
++++ xen-3.4.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup
@@ -1,36 +1,22 @@
#!/bin/sh
++++++ xen-hvm-default-pae.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,15 +1,15 @@
PAE must be on for 64-on-64 to work at all.
-Index: xen-3.3.1-testing/tools/python/xen/xend/image.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/image.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/image.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/image.py
-@@ -871,7 +871,7 @@ class X86_HVM_ImageHandler(HVMImageHandl
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/image.py
++++ xen-3.4.0-testing/tools/python/xen/xend/image.py
+@@ -943,7 +943,7 @@ class X86_HVM_ImageHandler(HVMImageHandl
def configure(self, vmConfig):
HVMImageHandler.configure(self, vmConfig)
- self.pae = int(vmConfig['platform'].get('pae', 0))
+ self.pae = int(vmConfig['platform'].get('pae', 1))
+ self.vramsize = int(vmConfig['platform'].get('videoram',4)) * 1024
def buildDomain(self):
- xc.hvm_set_param(self.vm.getDomid(), HVM_PARAM_PAE_ENABLED, self.pae)
++++++ xen-ioapic-ack-default.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,9 +1,11 @@
Change default IO-APIC ack mode for single IO-APIC systems to old-style. Jan
---- a/xen/arch/x86/io_apic.c
-+++ b/xen/arch/x86/io_apic.c
-@@ -1354,7 +1354,7 @@ static unsigned int startup_level_ioapic
+Index: xen-3.4.0-testing/xen/arch/x86/io_apic.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/io_apic.c
++++ xen-3.4.0-testing/xen/arch/x86/io_apic.c
+@@ -1298,7 +1298,7 @@ static unsigned int startup_level_ioapic
return 0; /* don't check for pending */
}
@@ -12,7 +14,7 @@
static void setup_ioapic_ack(char *s)
{
if ( !strcmp(s, "old") )
-@@ -1854,6 +1854,8 @@ void __init setup_IO_APIC(void)
+@@ -1802,6 +1802,8 @@ void __init setup_IO_APIC(void)
else
io_apic_irqs = ~PIC_IRQS;
++++++ xen-ioemu-hvm-pv-support.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,114 +1,17 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/ide.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_platform.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/ide.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/ide.c
-@@ -485,6 +485,9 @@ typedef struct PCIIDEState {
- } PCIIDEState;
-
-
-+static PCIIDEState *principal_ide_controller;
-+extern FILE *logfile;
-+
- #if defined(__ia64__)
- #include <xen/hvm/ioreq.h>
-
-@@ -2770,6 +2773,27 @@ static void ide_reset(IDEState *s)
- s->media_changed = 0;
- }
-
-+void ide_unplug_harddisks(void)
-+{
-+ IDEState *s;
-+ int i;
-+
-+ if (!principal_ide_controller) {
-+ fprintf(logfile, "No principal controller?\n");
-+ return;
-+ }
-+ for (i = 0; i < 4; i++) {
-+ s = principal_ide_controller->ide_if + i;
-+ if (!s->bs)
-+ continue; /* drive not present */
-+ if (s->is_cdrom)
-+ continue; /* cdrom */
-+ /* Is a hard disk, unplug it. */
-+ s->bs = NULL;
-+ ide_reset(s);
-+ }
-+}
-+
- struct partition {
- uint8_t boot_ind; /* 0x80 - active */
- uint8_t head; /* starting head */
-@@ -3282,6 +3306,10 @@ void pci_cmd646_ide_init(PCIBus *bus, Bl
- sizeof(PCIIDEState),
- -1,
- NULL, NULL);
-+ if (principal_ide_controller)
-+ abort();
-+ principal_ide_controller = d;
-+
- d->type = IDE_TYPE_CMD646;
- pci_conf = d->dev.config;
- pci_conf[0x00] = 0x95; // CMD646
-@@ -3413,6 +3441,10 @@ void pci_piix3_ide_init(PCIBus *bus, Blo
- NULL, NULL);
- d->type = IDE_TYPE_PIIX3;
-
-+ if (principal_ide_controller)
-+ abort();
-+ principal_ide_controller = d;
-+
- pci_conf = d->dev.config;
- pci_conf[0x00] = 0x86; // Intel
- pci_conf[0x01] = 0x80;
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/pci.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/pci.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/pci.c
-@@ -648,6 +648,28 @@ void pci_nic_init(PCIBus *bus, NICInfo *
- }
- }
-
-+void pci_unplug_netifs(void)
-+{
-+ PCIBus *bus;
-+ int x;
-+
-+ /* We only support one PCI bus */
-+ for (bus = first_bus; bus; bus = NULL) {
-+ for (x = 0; x < 256; x++) {
-+ if (bus->devices[x] &&
-+ bus->devices[x]->config[0xa] == 0 &&
-+ bus->devices[x]->config[0xb] == 2) {
-+ /* Found a netif. Remove it from the bus. Note that
-+ we don't free it here, since there could still be
-+ references to it floating around. There are only
-+ ever one or two structures leaked, and it's not
-+ worth finding them all. */
-+ bus->devices[x] = NULL;
-+ }
-+ }
-+ }
-+}
-+
- typedef struct {
- PCIDevice dev;
- PCIBus *bus;
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_platform.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_platform.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_platform.c
-@@ -26,6 +26,8 @@
- #include "hw.h"
- #include "pci.h"
- #include "irq.h"
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_platform.c
+@@ -30,6 +30,8 @@
+ #include "qemu-xen.h"
+ #include "net.h"
+ #include "xen_platform.h"
+#include "sysemu.h"
+#include <xc_private.h>
+ #include <assert.h>
#include <xenguest.h>
-
-@@ -71,12 +73,53 @@ static void xen_platform_ioport_writeb(v
+@@ -326,11 +328,51 @@ static void xen_platform_ioport_writeb(v
}
}
@@ -147,7 +50,6 @@
+ }
+}
+
-
static void platform_ioport_map(PCIDevice *pci_dev, int region_num, uint32_t addr, uint32_t size, int type)
{
+ ioport_base = addr;
@@ -155,124 +57,9 @@
+ register_ioport_write(addr, 16, 4, platform_ioport_write, NULL);
+/*
PCIXenPlatformState *d = (PCIXenPlatformState *)pci_dev;
-+
register_ioport_write(addr, size, 1, xen_platform_ioport_writeb, d);
register_ioport_read(addr, size, 1, xen_platform_ioport_readb, d);
+*/
}
static uint32_t platform_mmio_read(void *opaque, target_phys_addr_t addr)
-Index: xen-3.3.1-testing/tools/ioemu-remote/vl.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/vl.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/vl.c
-@@ -259,6 +259,20 @@ static int event_pending = 1;
-
- #include "xen-vl-extra.c"
-
-+typedef struct IOHandlerRecord {
-+ int fd;
-+ IOCanRWHandler *fd_read_poll;
-+ IOHandler *fd_read;
-+ IOHandler *fd_write;
-+ int deleted;
-+ void *opaque;
-+ /* temporary data */
-+ struct pollfd *ufd;
-+ struct IOHandlerRecord *next;
-+} IOHandlerRecord;
-+
-+static IOHandlerRecord *first_io_handler;
-+
- /***********************************************************/
- /* x86 ISA bus support */
-
-@@ -4054,6 +4068,7 @@ typedef struct TAPState {
- int fd;
- char down_script[1024];
- char script_arg[1024];
-+ struct TAPState *next;
- } TAPState;
-
- static void tap_receive(void *opaque, const uint8_t *buf, int size)
-@@ -4089,6 +4104,36 @@ static void tap_send(void *opaque)
- }
- }
-
-+static TAPState *head_net_tap;
-+
-+void net_tap_shutdown_all(void)
-+{
-+ struct IOHandlerRecord **pioh, *ioh;
-+
-+ while (head_net_tap) {
-+ pioh = &first_io_handler;
-+ for (;;) {
-+ ioh = *pioh;
-+ if (ioh == NULL)
-+ break;
-+ if (ioh->fd == head_net_tap->fd) {
-+ *pioh = ioh->next;
-+ qemu_free(ioh);
-+ break;
-+ }
-+ pioh = &ioh->next;
-+ }
-+ if (!ioh)
-+ fprintf(stderr,
-+ "warning: can't find iohandler for %d to close it properly.\n",
-+ head_net_tap->fd);
-+ close(head_net_tap->fd);
-+ head_net_tap = head_net_tap->next;
-+ }
-+}
-+
-+
-+
- /* fd support */
-
- static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
-@@ -4100,6 +4145,8 @@ static TAPState *net_tap_fd_init(VLANSta
- return NULL;
- s->fd = fd;
- s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s);
-+ s->next = head_net_tap;
-+ head_net_tap = s;
- qemu_set_fd_handler(s->fd, tap_send, NULL, s);
- snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd);
- return s;
-@@ -5674,20 +5721,6 @@ static void dumb_display_init(DisplaySta
-
- #define MAX_IO_HANDLERS 64
-
--typedef struct IOHandlerRecord {
-- int fd;
-- IOCanRWHandler *fd_read_poll;
-- IOHandler *fd_read;
-- IOHandler *fd_write;
-- int deleted;
-- void *opaque;
-- /* temporary data */
-- struct pollfd *ufd;
-- struct IOHandlerRecord *next;
--} IOHandlerRecord;
--
--static IOHandlerRecord *first_io_handler;
--
- /* XXX: fd_read_poll should be suppressed, but an API change is
- necessary in the character devices to suppress fd_can_read(). */
- int qemu_set_fd_handler2(int fd,
-Index: xen-3.3.1-testing/tools/ioemu-remote/sysemu.h
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/sysemu.h
-+++ xen-3.3.1-testing/tools/ioemu-remote/sysemu.h
-@@ -49,6 +49,9 @@ void do_loadvm(const char *name);
- void do_delvm(const char *name);
- void do_info_snapshots(void);
-
-+void net_tap_shutdown_all(void);
-+void pci_unplug_netifs(void);
-+
- void main_loop_wait(int timeout);
-
- /* Polling handling */
++++++ xen-max-free-mem.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendNode.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendNode.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendNode.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendNode.py
-@@ -650,11 +650,35 @@ class XendNode:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendNode.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendNode.py
+@@ -809,11 +809,35 @@ class XendNode:
info['cpu_mhz'] = info['cpu_khz'] / 1000
@@ -43,7 +43,7 @@
ITEM_ORDER = ['nr_cpus',
'nr_nodes',
-@@ -665,6 +689,9 @@ class XendNode:
+@@ -824,6 +848,9 @@ class XendNode:
'virt_caps',
'total_memory',
'free_memory',
@@ -53,10 +53,10 @@
'node_to_cpu',
'node_to_memory'
]
-Index: xen-3.3.1-testing/tools/python/xen/xend/balloon.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/balloon.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/balloon.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/balloon.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/balloon.py
++++ xen-3.4.0-testing/tools/python/xen/xend/balloon.py
@@ -41,6 +41,8 @@ SLEEP_TIME_GROWTH = 0.1
# label actually shown in the PROC_XEN_BALLOON file.
#labels = { 'current' : 'Current allocation',
@@ -87,16 +87,16 @@
+ raise VmError('Failed to query maximum target memory allocation of dom0.')
+ return kb
+
- def free(need_mem):
+ def free(need_mem, dominfo):
"""Balloon out memory from the privileged domain so that there is the
specified required amount (in KiB) free.
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -1046,6 +1046,27 @@ class XendDomainInfo:
-
- return None
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -1294,6 +1294,27 @@ class XendDomainInfo:
+ dev_str_list = dev_str_list + [dev_str]
+ return dev_str_list
+ def capAndSetMemoryTarget(self, target):
+ """Potentially lowers the requested target to the largest possible
@@ -122,11 +122,11 @@
def setMemoryTarget(self, target):
"""Set the memory target of this domain.
@param target: In MiB.
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/SrvDomain.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/SrvDomain.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/SrvDomain.py
-@@ -171,7 +171,7 @@ class SrvDomain(SrvDir):
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/SrvDomain.py
+@@ -172,7 +172,7 @@ class SrvDomain(SrvDir):
def op_mem_target_set(self, _, req):
++++++ xen-no-dummy-nfs-ip.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xm/create.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/create.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/create.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/create.py
-@@ -1081,9 +1081,8 @@ def preprocess_access_control(vals):
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/create.py
++++ xen-3.4.0-testing/tools/python/xen/xm/create.py
+@@ -1160,9 +1160,8 @@ def preprocess_access_control(vals):
def preprocess_ip(vals):
if vals.ip or vals.dhcp != 'off':
++++++ xen-paths.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xm/create.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/create.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/create.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/create.py
-@@ -70,7 +70,7 @@ gopts.opt('quiet', short='q',
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/create.py
++++ xen-3.4.0-testing/tools/python/xen/xm/create.py
+@@ -72,7 +72,7 @@ gopts.opt('quiet', short='q',
use="Quiet.")
gopts.opt('path', val='PATH',
@@ -11,10 +11,10 @@
use="Search path for configuration scripts. "
"The value of PATH is a colon-separated directory list.")
-Index: xen-3.3.1-testing/docs/man/xm.pod.1
+Index: xen-3.4.0-testing/docs/man/xm.pod.1
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xm.pod.1
-+++ xen-3.3.1-testing/docs/man/xm.pod.1
+--- xen-3.4.0-testing.orig/docs/man/xm.pod.1
++++ xen-3.4.0-testing/docs/man/xm.pod.1
@@ -77,7 +77,7 @@ in the config file. See L<xmdomain.cfg>
format, and possible options used in either the configfile or for I<vars>.
@@ -33,10 +33,10 @@
soon as it is run.
=item I<without config file>
-Index: xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+Index: xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xmdomain.cfg.pod.5
-+++ xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+--- xen-3.4.0-testing.orig/docs/man/xmdomain.cfg.pod.5
++++ xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
@@ -4,9 +4,9 @@ xmdomain.cfg - xm domain config file for
=head1 SYNOPSIS
++++++ xen-qemu-iscsi-fix.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,20 +1,20 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -153,7 +153,7 @@ void xenstore_parse_domain_config(int hv
- char *buf = NULL, *path;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -313,7 +313,7 @@ void xenstore_parse_domain_config(int hv
+ char *buf = NULL;
char *fpath = NULL, *bpath = NULL, *btype = NULL,
- *dev = NULL, *params = NULL, *type = NULL, *drv = NULL;
+ *dev = NULL, *params = NULL, *drv = NULL;
- int i, any_hdN = 0, ret, is_tap;
+ int i, j, any_hdN = 0, ret, is_tap;
unsigned int len, num, hd_index, pci_devid = 0;
BlockDriverState *bs;
BlockDriver *format;
-@@ -238,12 +238,7 @@ void xenstore_parse_domain_config(int hv
+@@ -400,12 +400,7 @@ void xenstore_parse_domain_config(int hv
continue;
- free(type);
- type = xs_read(xsh, XBT_NULL, buf, &len);
+ free(danger_type);
+ danger_type = xs_read(xsh, XBT_NULL, danger_buf, &len);
- if (pasprintf(&buf, "%s/params", bpath) == -1)
- continue;
- free(params);
@@ -25,13 +25,13 @@
/* read the name of the device */
if (pasprintf(&buf, "%s/type", bpath) == -1)
continue;
-@@ -251,6 +246,35 @@ void xenstore_parse_domain_config(int hv
+@@ -413,6 +408,35 @@ void xenstore_parse_domain_config(int hv
drv = xs_read(xsh, XBT_NULL, buf, &len);
if (drv == NULL)
continue;
+
+ free(params);
-+ if (!strcmp(drv,"iscsi"))
++ if (!strcmp(drv,"iscsi"))
+ {
+ if (pasprintf(&buf, "%s/node", bpath) == -1)
+ continue;
@@ -50,7 +50,7 @@
+ }
+ }
+ else
-+ {
++ {
+ if (pasprintf(&buf, "%s/params", bpath) == -1)
+ continue;
+ params = xs_read(xsh, XBT_NULL, buf, &len);
++++++ xen-rpmoptflags.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/blktap/drivers/Makefile
+Index: xen-3.4.0-testing/tools/blktap/drivers/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/Makefile
-+++ xen-3.3.1-testing/tools/blktap/drivers/Makefile
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/Makefile
++++ xen-3.4.0-testing/tools/blktap/drivers/Makefile
@@ -5,7 +5,6 @@ IBIN = blktapctrl tapdisk
QCOW_UTIL = img2qcow qcow2raw qcow-create
LIBAIO_DIR = ../../libaio/src
@@ -10,10 +10,10 @@
CFLAGS += -Wno-unused
CFLAGS += -I../lib
CFLAGS += $(CFLAGS_libxenctrl)
-Index: xen-3.3.1-testing/Config.mk
+Index: xen-3.4.0-testing/Config.mk
===================================================================
---- xen-3.3.1-testing.orig/Config.mk
-+++ xen-3.3.1-testing/Config.mk
+--- xen-3.4.0-testing.orig/Config.mk
++++ xen-3.4.0-testing/Config.mk
@@ -14,7 +14,7 @@ SHELL ?= /bin/sh
# Tools to run on system hosting the build
++++++ xen-warnings.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/misc/miniterm/miniterm.c
+Index: xen-3.4.0-testing/tools/misc/miniterm/miniterm.c
===================================================================
---- xen-3.3.1-testing.orig/tools/misc/miniterm/miniterm.c
-+++ xen-3.3.1-testing/tools/misc/miniterm/miniterm.c
+--- xen-3.4.0-testing.orig/tools/misc/miniterm/miniterm.c
++++ xen-3.4.0-testing/tools/misc/miniterm/miniterm.c
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
case 0:
close(1); /* stdout not needed */
@@ -35,10 +35,10 @@
break;
}
-Index: xen-3.3.1-testing/tools/libxc/xc_dom_elfloader.c
+Index: xen-3.4.0-testing/tools/libxc/xc_dom_elfloader.c
===================================================================
---- xen-3.3.1-testing.orig/tools/libxc/xc_dom_elfloader.c
-+++ xen-3.3.1-testing/tools/libxc/xc_dom_elfloader.c
+--- xen-3.4.0-testing.orig/tools/libxc/xc_dom_elfloader.c
++++ xen-3.4.0-testing/tools/libxc/xc_dom_elfloader.c
@@ -193,8 +193,9 @@ static int xc_dom_load_elf_symtab(struct
if ( load )
@@ -50,10 +50,10 @@
elf_section_start(elf, shdr2),
size);
}
-Index: xen-3.3.1-testing/tools/xenstore/Makefile
+Index: xen-3.4.0-testing/tools/xenstore/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/Makefile
-+++ xen-3.3.1-testing/tools/xenstore/Makefile
+--- xen-3.4.0-testing.orig/tools/xenstore/Makefile
++++ xen-3.4.0-testing/tools/xenstore/Makefile
@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
MAJOR = 3.0
MINOR = 0
@@ -63,10 +63,10 @@
CFLAGS += -I.
CFLAGS += $(CFLAGS_libxenctrl)
-Index: xen-3.3.1-testing/tools/xenstore/xenstored_core.c
+Index: xen-3.4.0-testing/tools/xenstore/xenstored_core.c
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/xenstored_core.c
-+++ xen-3.3.1-testing/tools/xenstore/xenstored_core.c
+--- xen-3.4.0-testing.orig/tools/xenstore/xenstored_core.c
++++ xen-3.4.0-testing/tools/xenstore/xenstored_core.c
@@ -77,8 +77,8 @@ static void check_store(void);
int quota_nb_entry_per_domain = 1000;
@@ -91,10 +91,10 @@
break;
case 'T':
tracefile = optarg;
-Index: xen-3.3.1-testing/tools/xenstore/xenstored_domain.c
+Index: xen-3.4.0-testing/tools/xenstore/xenstored_domain.c
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/xenstored_domain.c
-+++ xen-3.3.1-testing/tools/xenstore/xenstored_domain.c
+--- xen-3.4.0-testing.orig/tools/xenstore/xenstored_domain.c
++++ xen-3.4.0-testing/tools/xenstore/xenstored_domain.c
@@ -212,7 +212,7 @@ void handle_event(void)
{
evtchn_port_t port;
@@ -113,10 +113,10 @@
return -1;
dom0 = new_domain(NULL, 0, port);
-Index: xen-3.3.1-testing/tools/xenstore/xenstored_transaction.c
+Index: xen-3.4.0-testing/tools/xenstore/xenstored_transaction.c
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/xenstored_transaction.c
-+++ xen-3.3.1-testing/tools/xenstore/xenstored_transaction.c
+--- xen-3.4.0-testing.orig/tools/xenstore/xenstored_transaction.c
++++ xen-3.4.0-testing/tools/xenstore/xenstored_transaction.c
@@ -82,7 +82,7 @@ struct transaction
struct list_head changed_domains;
};
@@ -126,10 +126,10 @@
static unsigned int generation;
/* Return tdb context to use for this connection. */
-Index: xen-3.3.1-testing/tools/xenstore/xenstore_client.c
+Index: xen-3.4.0-testing/tools/xenstore/xenstore_client.c
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/xenstore_client.c
-+++ xen-3.3.1-testing/tools/xenstore/xenstore_client.c
+--- xen-3.4.0-testing.orig/tools/xenstore/xenstore_client.c
++++ xen-3.4.0-testing/tools/xenstore/xenstore_client.c
@@ -251,7 +251,7 @@ do_chmod(char *path, struct xs_permissio
char **xsval = xs_directory(xsh, xth, path, &xsval_n);
@@ -139,11 +139,11 @@
for (i = 0; i < xsval_n; i++) {
snprintf(buf, MAX_PATH_LEN, "%s/%s", path, xsval[i]);
-Index: xen-3.3.1-testing/tools/libxen/src/xen_common.c
+Index: xen-3.4.0-testing/tools/libxen/src/xen_common.c
===================================================================
---- xen-3.3.1-testing.orig/tools/libxen/src/xen_common.c
-+++ xen-3.3.1-testing/tools/libxen/src/xen_common.c
-@@ -1055,6 +1055,8 @@ static size_t size_of_member(const abstr
+--- xen-3.4.0-testing.orig/tools/libxen/src/xen_common.c
++++ xen-3.4.0-testing/tools/libxen/src/xen_common.c
+@@ -1057,6 +1057,8 @@ static size_t size_of_member(const abstr
default:
assert(false);
}
@@ -152,7 +152,7 @@
}
-@@ -1566,6 +1568,8 @@ get_val_as_string(const struct abstract_
+@@ -1568,6 +1570,8 @@ get_val_as_string(const struct abstract_
default:
assert(false);
}
++++++ xen-xmexample.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,9 +1,9 @@
Change various example paths in the config files to match SUSE.
-Index: xen-3.3.1-testing/tools/examples/xmexample1
+Index: xen-3.4.0-testing/tools/examples/xmexample1
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xmexample1
-+++ xen-3.3.1-testing/tools/examples/xmexample1
+--- xen-3.4.0-testing.orig/tools/examples/xmexample1
++++ xen-3.4.0-testing/tools/examples/xmexample1
@@ -7,11 +7,13 @@
#============================================================================
@@ -43,10 +43,10 @@
#----------------------------------------------------------------------------
# Configure the behaviour when a domain exits. There are three 'reasons'
-Index: xen-3.3.1-testing/tools/examples/xmexample2
+Index: xen-3.4.0-testing/tools/examples/xmexample2
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xmexample2
-+++ xen-3.3.1-testing/tools/examples/xmexample2
+--- xen-3.4.0-testing.orig/tools/examples/xmexample2
++++ xen-3.4.0-testing/tools/examples/xmexample2
@@ -35,11 +35,13 @@ xm_vars.var('vmid',
xm_vars.check()
@@ -86,10 +86,10 @@
#----------------------------------------------------------------------------
# Configure the behaviour when a domain exits. There are three 'reasons'
-Index: xen-3.3.1-testing/tools/examples/xmexample3
+Index: xen-3.4.0-testing/tools/examples/xmexample3
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xmexample3
-+++ xen-3.3.1-testing/tools/examples/xmexample3
+--- xen-3.4.0-testing.orig/tools/examples/xmexample3
++++ xen-3.4.0-testing/tools/examples/xmexample3
@@ -35,11 +35,13 @@ xm_vars.var('vmid',
xm_vars.check()
@@ -109,11 +109,11 @@
# The domain build function. Default is 'linux'.
#builder='linux'
-Index: xen-3.3.1-testing/tools/examples/xmexample.hvm
+Index: xen-3.4.0-testing/tools/examples/xmexample.hvm
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xmexample.hvm
-+++ xen-3.3.1-testing/tools/examples/xmexample.hvm
-@@ -73,7 +73,7 @@ vif = [ 'type=ioemu, bridge=xenbr0' ]
+--- xen-3.4.0-testing.orig/tools/examples/xmexample.hvm
++++ xen-3.4.0-testing/tools/examples/xmexample.hvm
+@@ -81,7 +81,7 @@ vif = [ 'type=ioemu, bridge=xenbr0' ]
# and MODE is r for read-only, w for read-write.
#disk = [ 'phy:hda1,hda1,r' ]
@@ -122,10 +122,10 @@
#----------------------------------------------------------------------------
# Configure the behaviour when a domain exits. There are three 'reasons'
-Index: xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+Index: xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xmdomain.cfg.pod.5
-+++ xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+--- xen-3.4.0-testing.orig/docs/man/xmdomain.cfg.pod.5
++++ xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
@@ -38,13 +38,13 @@ file.
The kernel image for the domain. The format of the parameter is the
@@ -161,10 +161,10 @@
at hda1, which is the root filesystem.
=item I<NFS Root>
-Index: xen-3.3.1-testing/docs/man/xm.pod.1
+Index: xen-3.4.0-testing/docs/man/xm.pod.1
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xm.pod.1
-+++ xen-3.3.1-testing/docs/man/xm.pod.1
+--- xen-3.4.0-testing.orig/docs/man/xm.pod.1
++++ xen-3.4.0-testing/docs/man/xm.pod.1
@@ -163,8 +163,8 @@ soon as it is run.
=item I<without config file>
++++++ xen-xmexample-vti.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/Makefile
+Index: xen-3.4.0-testing/tools/examples/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/Makefile
-+++ xen-3.3.1-testing/tools/examples/Makefile
+--- xen-3.4.0-testing.orig/tools/examples/Makefile
++++ xen-3.4.0-testing/tools/examples/Makefile
@@ -20,7 +20,6 @@ XEN_CONFIGS += xmexample.hvm-stubdom
XEN_CONFIGS += xmexample.hvm-dm
XEN_CONFIGS += xmexample.pv-grub
++++++ xen-xm-top-needs-root.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,11 +1,11 @@
From: Charles Coffing <ccoffing(a)novell.com>
Upstream: no
-Index: xen-3.3.1-testing/tools/python/xen/xm/main.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/main.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/main.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/main.py
-@@ -1938,6 +1938,10 @@ def xm_debug_keys(args):
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/main.py
++++ xen-3.4.0-testing/tools/python/xen/xm/main.py
+@@ -1917,6 +1917,10 @@ def xm_debug_keys(args):
def xm_top(args):
arg_check(args, "top", 0)
++++++ xmclone.sh ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -23,7 +23,7 @@
#
# Defaults
#
-VERSION=0.4.4
+VERSION=0.4.5
XEN_CONFIGS=/etc/xen/vm/
XEN_BASE=/var/lib/xen/images/
SOURCE=
@@ -426,6 +426,18 @@
[ -z "$IP" ] && break
done
+ if [ -z "$MASK" ]
+ then
+ echo "You have not specified a network mask in bits. Please enter one now. Default is 24 "
+ read -p "Network mask? " MASK
+ fi
+ while [ -n "$MASK" ] && [ "${MASK/**/ok}" != "ok" ]
+ do
+ echo "The Network mask you specified is invalid. If you wish, enter a new one now."
+ read -p "Network mask? " MASK
+ [ -z "$MASK" ] && MASK=24
+ done
+
if [ -z "$MAC" ]
then
newMAC=""
@@ -461,6 +473,7 @@
else
HOSTNAME=
IP=
+ MASK=
MAC=
fi
@@ -647,11 +660,26 @@
pushd "$tmpdir" > /dev/null
#
+ # Find out if we are looking at SLE10
+ #
+ SLE10=
+ if [ -f etc/SuSE-release ]
+ then
+ OSVER=`cat etc/SuSE-release | sed -n 1p | awk -F'(' '{ print $1 }' | sed 's/ $//g'`
+ if [ "$OSVER" == "openSUSE 10" -o \
+ "$OSVER" == "SUSE Linux Enterprise Server 10" -o \
+ "$OSVER" == "SUSE Linux Enterprise Desktop 10" ]
+ then
+ SLE10=1
+ fi
+ fi
+
+ #
# Change the Network Configuration in the mounted image file
#
if [ -n "$MAC" ]
then
- if [ -d etc/sysconfig/network/ ]
+ if [ "$SLE10" -a -d etc/sysconfig/network/ ]
then
echo "Changing the Network configuration in the newly copied image."
pushd "etc/sysconfig/network/" > /dev/null
@@ -672,13 +700,19 @@
if [ -d etc/udev/rules.d/ ]
then
- # The 30-net_persistent_names.rules file
- # controls which interface to use.
+ # The 30-net_persistent_names.rules or 70-persistent-net.rules
+ # file controls which interface to use.
# By removing the SUBSYSTEM== lines, we force
# the system to recreate it.
pushd "etc/udev/rules.d/" > /dev/null
- sed -i -e "/SUBSYSTEM==/d" \
- 30-net_persistent_names.rules
+ if [ "$SLE10" ]
+ then
+ sed -i -e "/SUBSYSTEM==/d" \
+ 30-net_persistent_names.rules
+ else
+ sed -i -e "/SUBSYSTEM==/d" \
+ 70-persistent-net.rules
+ fi
popd > /dev/null
fi
fi
@@ -693,8 +727,14 @@
echo "Modify the IP Address of the new domU."
pushd "etc/sysconfig/network/" > /dev/null
- sed -i -e "s,^IPADDR=.*$,IPADDR=$IP," \
- ifcfg-eth-id-$MAC
+ if [ "$SLE10" ]
+ then
+ sed -i -e "s,^IPADDR=.*$,IPADDR=$IP," \
+ ifcfg-eth-id-$MAC
+ else
+ sed -i -e "s,^IPADDR=.*$,IPADDR=$IP/$MASK," \
+ ifcfg-eth0
+ fi
popd > /dev/null
fi
fi
++++++ xm-test-cleanup.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py
+Index: xen-3.4.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py
===================================================================
---- xen-3.3.1-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py
-+++ xen-3.3.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py
+--- xen-3.4.0-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py
++++ xen-3.4.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py
@@ -35,3 +35,9 @@ if s != 0:
# Make sure it's gone
if isDomainRunning(domain.getName()):
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package whois for openSUSE:Factory
checked in at Mon May 4 18:37:28 CEST 2009.
--------
--- whois/whois.changes 2008-09-12 11:01:10.000000000 +0200
+++ /mounts/work_src_done/STABLE/whois/whois.changes 2009-05-04 12:48:02.000000000 +0200
@@ -1,0 +2,34 @@
+Mon May 4 11:51:30 CEST 2009 - puzel(a)suse.cz
+
+- updated to version 4.7.33
+ * mkpasswd: use /dev/urandom to generate the salt. If it is not present,
+ initialize srand(3) with gettimeofday(2) instead of time(2) to have a
+ larger randomness space.
+ * mkpasswd: added preliminary support for variable length salts, patch
+ courtesy of Nicolas François.
+ * Updated the .co.za SLD server.
+ * Added new ASN allocations.
+ * Updated the .tel, .gg and .je TLD servers.
+ * Implemented a 10 seconds timeout on connect(2) to allow querying
+ servers with broken IPv6 connectivity.
+ * Added support for automatically determining the server for in-addr.arpa
+ domains.
+ * Added new IPv4 allocations.
+ * Fixed a typo in de.po.
+ * Updated the .gi, .lc and .mn TLD servers.
+ * Fixed the short option -S which I broke in 4.7.25.
+ * Added support for ASN32 in the ASPLAIN notation.
+ * Do not disable the timeout after the connection to the server, because
+ it can still hang forever.
+ * Added the .gy, .hn, .ng and .sl TLD servers.
+ * Updated the .tel, .cr, .dz, .ht, .im, .jo, .ly, .mt, .mu, .pr, .rs, .sn,
+ .com.uy, .vc and .vn TLD servers.
+ * Added support for -kenic NIC handles.
+ * Added new IPv4 allocations.
+ * Little portability fixes.
+ * Added Finnish translation contributed by Sami Kerola.
+- removed whois-4.7.28-Makefile.patch (obsolete)
+- fixed rpmlint warning
+- properly pass RPM_OPT_FLAGS to make
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
whois-4.7.28-Makefile.patch
whois-4.7.28-nb.patch
whois_4.7.28.tar.bz2
New:
----
whois-4.7.33-nb.patch
whois_4.7.33.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ whois.spec ++++++
--- /var/tmp/diff_new_pack.dM4580/_old 2009-05-04 18:37:11.000000000 +0200
+++ /var/tmp/diff_new_pack.dM4580/_new 2009-05-04 18:37:11.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package whois (Version 4.7.28)
+# spec file for package whois (Version 4.7.33)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,12 +25,11 @@
Provides: ripe-whois-tools
AutoReqProv: on
Url: http://www.linux.it/~md/software/
-Version: 4.7.28
+Version: 4.7.33
Release: 1
Summary: whois Client Program
Source: %{name}_%{version}.tar.bz2
Patch1: %{name}-%{version}-nb.patch
-Patch2: %{name}-%{version}-Makefile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -49,16 +48,15 @@
%prep
%setup -n whois-%{version}
%patch1
-%patch2
rename no nb po/no.*
%build
-make all mkpasswd HAVE_LIBIDN=1 OPTS="$RPM_OPT_FLAGS"
+make all mkpasswd HAVE_LIBIDN=1 CFLAGS="$RPM_OPT_FLAGS"
%install
mkdir -p $RPM_BUILD_ROOT{/usr/bin,%{_mandir}/man1}
make BASEDIR=$RPM_BUILD_ROOT mandir=%{_mandir} prefix=/usr \
- install install-mkpasswd
+ install install-mkpasswd install-pos
%find_lang %{name}
%clean
@@ -71,6 +69,37 @@
%{_mandir}/man1/*
%changelog
+* Mon May 04 2009 puzel(a)suse.cz
+- updated to version 4.7.33
+ * mkpasswd: use /dev/urandom to generate the salt. If it is not present,
+ initialize srand(3) with gettimeofday(2) instead of time(2) to have a
+ larger randomness space.
+ * mkpasswd: added preliminary support for variable length salts, patch
+ courtesy of Nicolas François.
+ * Updated the .co.za SLD server.
+ * Added new ASN allocations.
+ * Updated the .tel, .gg and .je TLD servers.
+ * Implemented a 10 seconds timeout on connect(2) to allow querying
+ servers with broken IPv6 connectivity.
+ * Added support for automatically determining the server for in-addr.arpa
+ domains.
+ * Added new IPv4 allocations.
+ * Fixed a typo in de.po.
+ * Updated the .gi, .lc and .mn TLD servers.
+ * Fixed the short option -S which I broke in 4.7.25.
+ * Added support for ASN32 in the ASPLAIN notation.
+ * Do not disable the timeout after the connection to the server, because
+ it can still hang forever.
+ * Added the .gy, .hn, .ng and .sl TLD servers.
+ * Updated the .tel, .cr, .dz, .ht, .im, .jo, .ly, .mt, .mu, .pr, .rs, .sn,
+ .com.uy, .vc and .vn TLD servers.
+ * Added support for -kenic NIC handles.
+ * Added new IPv4 allocations.
+ * Little portability fixes.
+ * Added Finnish translation contributed by Sami Kerola.
+- removed whois-4.7.28-Makefile.patch (obsolete)
+- fixed rpmlint warning
+- properly pass RPM_OPT_FLAGS to make
* Fri Sep 12 2008 anosek(a)suse.cz
- updated to version 4.7.28
* Updated the .aero TLD server.
@@ -135,7 +164,7 @@
[#165904] (tld_serv_list-4.7.13.patch)
* Wed Jan 25 2006 mls(a)suse.de
- converted neededforbuild to BuildRequires
-* Sat Sep 10 2005 schwab(a)suse.de
+* Fri Sep 09 2005 schwab(a)suse.de
- Add libidn, libidn-devel to nfb.
- Compile with -DHAVE_LIBIDN, needed for DENIC workaround.
* Fri Jul 29 2005 anicka(a)suse.cz
++++++ whois-4.7.28-nb.patch -> whois-4.7.33-nb.patch ++++++
--- whois/whois-4.7.28-nb.patch 2008-09-12 09:52:16.000000000 +0200
+++ /mounts/work_src_done/STABLE/whois/whois-4.7.33-nb.patch 2009-05-04 12:47:28.000000000 +0200
@@ -1,11 +1,13 @@
---- po/Makefile
-+++ po/Makefile
-@@ -3,7 +3,7 @@
+Index: po/Makefile
+===================================================================
+--- po/Makefile.orig 2008-12-09 01:49:28.000000000 +0100
++++ po/Makefile 2009-05-04 11:47:31.000000000 +0200
+@@ -6,7 +6,7 @@ INSTALLNLSDIR=$(BASEDIR)$(prefix)/share/
PACKAGE = whois
--CATALOGS = cs.mo de.mo el.mo es.mo eu.mo fr.mo it.mo ja.mo no.mo pl.mo pt_BR.mo ru.mo
-+CATALOGS = cs.mo de.mo el.mo es.mo eu.mo fr.mo it.mo ja.mo nb.mo pl.mo pt_BR.mo ru.mo
+-CATALOGS = cs.mo de.mo el.mo es.mo eu.mo fr.mo it.mo ja.mo no.mo pl.mo pt_BR.mo ru.mo fi.mo
++CATALOGS = cs.mo de.mo el.mo es.mo eu.mo fr.mo it.mo ja.mo nb.mo pl.mo pt_BR.mo ru.mo fi.mo
POTFILES=../whois.c ../mkpasswd.c
++++++ whois_4.7.28.tar.bz2 -> whois_4.7.33.tar.bz2 ++++++
++++ 3678 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package vm-install for openSUSE:Factory
checked in at Mon May 4 18:37:07 CEST 2009.
--------
--- vm-install/vm-install.changes 2009-02-28 15:21:34.000000000 +0100
+++ /mounts/work_src_done/STABLE/vm-install/vm-install.changes 2009-05-01 01:31:19.072305000 +0200
@@ -1,0 +2,22 @@
+Thu Apr 30 17:27:52 MDT 2009 - carnold(a)novell.com
+
+- Improved KVM support.
+
+-------------------------------------------------------------------
+Mon Mar 27 15:01:18 MDT 2009 - carnold(a)novell.com
+
+- bnc#483316 - Invalid parameter for Paravirtualization settings in
+ vm-install
+
+-------------------------------------------------------------------
+Fri Mar 27 11:34:25 MDT 2009 - carnold(a)novell.com
+
+- bnc#486824 – Xen OS install window error dialog message
+
+-------------------------------------------------------------------
+Mon Mar 16 16:24:31 MDT 2009 - carnold(a)novell.com
+
+- bnc#470971 - vm-install asks for samba password on console
+ (even for guest only samba shares) - Kong Wei patch
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
vm-install-0.3.22.tar.bz2
New:
----
vm-install-0.4.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ vm-install.spec ++++++
--- /var/tmp/diff_new_pack.Ry3691/_old 2009-05-04 18:36:57.000000000 +0200
+++ /var/tmp/diff_new_pack.Ry3691/_new 2009-05-04 18:36:57.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package vm-install (Version 0.3.22)
+# spec file for package vm-install (Version 0.4.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -26,10 +26,10 @@
License: GPL v2 or later
Group: System/Emulators/PC
AutoReqProv: yes
-Version: 0.3.22
-Release: 2
+Version: 0.4.1
+Release: 1
Summary: Tool to Define a Virtual Machine and Install Its Operating System
-Source0: %{name}-0.3.22.tar.bz2
+Source0: %{name}-0.4.1.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64
Requires: xen-tools python-urlgrabber libxml2-python libvirt-python udhcp tftp
@@ -86,6 +86,16 @@
%{_datadir}/applications/YaST2/vm-install.desktop
%changelog
+* Thu Apr 30 2009 carnold(a)novell.com
+- Improved KVM support.
+* Fri Mar 27 2009 carnold(a)novell.com
+- bnc#483316 - Invalid parameter for Paravirtualization settings in
+ vm-install
+* Fri Mar 27 2009 carnold(a)novell.com
+- bnc#486824 – Xen OS install window error dialog message
+* Mon Mar 16 2009 carnold(a)novell.com
+- bnc#470971 - vm-install asks for samba password on console
+ (even for guest only samba shares) - Kong Wei patch
* Fri Feb 27 2009 carnold(a)novell.com
- bnc#480164 - Default network proposal in fully virtualized
SLES 11 VM is invalid.
++++++ vm-install-0.3.22.tar.bz2 -> vm-install-0.4.1.tar.bz2 ++++++
++++ 5572 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package tomboy for openSUSE:Factory
checked in at Mon May 4 18:36:57 CEST 2009.
--------
--- GNOME/tomboy/tomboy.changes 2009-04-14 17:11:04.000000000 +0200
+++ /mounts/work_src_done/STABLE/tomboy/tomboy.changes 2009-04-30 00:32:24.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Apr 30 00:30:10 CEST 2009 - vuntz(a)novell.com
+
+- Do not explicitly package the gconf schemas: it's already
+ packaged via the file list created with the gconf macros.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tomboy.spec ++++++
--- /var/tmp/diff_new_pack.u30299/_old 2009-05-04 18:35:38.000000000 +0200
+++ /var/tmp/diff_new_pack.u30299/_new 2009-05-04 18:35:38.000000000 +0200
@@ -46,7 +46,7 @@
Group: Productivity/Office/Other
Requires: mono
Version: 0.14.1
-Release: 1
+Release: 2
Summary: GNOME Note Taking Application
Url: http://www.beatniksoftware.com/tomboy/
Source: %{name}-%{version}.tar.bz2
@@ -126,7 +126,6 @@
%doc %{_mandir}/man1/%{name}.1.gz
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/tomboy
-%{_sysconfdir}/gconf/schemas/tomboy.schemas
%{_datadir}/dbus-1/services/org.gnome.Tomboy.service
%{_datadir}/applications/tomboy.desktop
@@ -134,6 +133,9 @@
%define __find_provides env sh -c 'filelist=($(grep -v -E "%{_libdir}/%{name}/addins|Mono.Addins")) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-provides ; } | sort | uniq'
%changelog
+* Thu Apr 30 2009 vuntz(a)novell.com
+- Do not explicitly package the gconf schemas: it's already
+ packaged via the file list created with the gconf macros.
* Tue Apr 14 2009 vuntz(a)novell.com
- Update to version 0.14.1:
+ Updated translations.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package unbound for openSUSE:Factory
checked in at Mon May 4 18:36:47 CEST 2009.
--------
--- unbound/unbound.changes 2009-04-18 16:06:48.000000000 +0200
+++ /mounts/work_src_done/STABLE/unbound/unbound.changes 2009-04-27 21:07:03.000000000 +0200
@@ -1,0 +2,5 @@
+Mon Apr 27 21:06:52 CEST 2009 - crrodriguez(a)suse.de
+
+- use system libldns
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
unbound-1.0.0-ldns_buffer_overflow.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ unbound.spec ++++++
--- /var/tmp/diff_new_pack.st2449/_old 2009-05-04 18:36:29.000000000 +0200
+++ /var/tmp/diff_new_pack.st2449/_new 2009-05-04 18:36:29.000000000 +0200
@@ -19,10 +19,10 @@
Name: unbound
-BuildRequires: bison openssl-devel
+BuildRequires: bison libldns-devel
Summary: Validating, recursive, and caching DNS resolver
Version: 1.0.0
-Release: 3
+Release: 4
License: BSD 3-Clause
Group: Productivity/Networking/DNS/Servers
Provides: dns_daemon
@@ -34,7 +34,6 @@
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.firewall
-Source10: %{name}-1.0.0-ldns_buffer_overflow.patch
Patch0: %{name}-1.0.0-build.patch
Patch1: %{name}-1.0.0-buffer_overflow.patch
Patch2: %{name}-1.0.0-configure.patch
@@ -96,9 +95,9 @@
%configure --with-pic \
--docdir=%{_defaultdocdir}/%{name} \
--disable-static \
- --disable-rpath
+ --disable-rpath \
+ --with-ldns=%{_usr}
# we have to extract included ldns source first -- needs to be done by configure
-test -d ldns-src && %{__patch} -p1 -z .orig -b < %{SOURCE10}
make CFLAGS="$RPM_OPT_FLAGS -pthread"
# ---------------------------------------------------------------------------
@@ -152,6 +151,8 @@
%attr(0644,root,root) %{_libdir}/lib%{name}.so
%changelog
+* Mon Apr 27 2009 crrodriguez(a)suse.de
+- use system libldns
* Sat Apr 18 2009 crrodriguez(a)suse.de
- remove static libraries and "la" files
* Wed Sep 24 2008 ro(a)suse.de
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package vlock for openSUSE:Factory
checked in at Mon May 4 18:36:43 CEST 2009.
--------
--- vlock/vlock.changes 2008-05-16 12:55:24.000000000 +0200
+++ /mounts/work_src_done/STABLE/vlock/vlock.changes 2009-05-04 15:16:28.000000000 +0200
@@ -1,0 +2,5 @@
+Mon May 4 15:15:41 CEST 2009 - prusnak(a)suse.cz
+
+- fixed missing expression in return statement (return.patch)
+
+-------------------------------------------------------------------
@@ -4 +9 @@
-- fix for FATE#300498 , use RPM_OPT_FLAGS everywhere.
+- fix for FATE#300498 , use RPM_OPT_FLAGS everywhere (optflags.patch)
calling whatdependson for head-i586
Old:
----
vlock-1.4.diff
New:
----
vlock-1.4.patch
vlock-1.4-return.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ vlock.spec ++++++
--- /var/tmp/diff_new_pack.va1882/_old 2009-05-04 18:36:25.000000000 +0200
+++ /var/tmp/diff_new_pack.va1882/_new 2009-05-04 18:36:25.000000000 +0200
@@ -1,10 +1,17 @@
#
# spec file for package vlock (Version 1.4)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@@ -14,7 +21,7 @@
Name: vlock
BuildRequires: pam-devel
Version: 1.4
-Release: 52
+Release: 82
PreReq: permissions
AutoReqProv: on
Group: System/Console
@@ -23,8 +30,9 @@
Summary: It allows you to lock your console display
Source: %{name}-%{version}.tar.bz2
Source1: README.SUSE
-Patch0: %{name}-%{version}.diff
-Patch1: vlock-1.4-optflags.patch
+Patch0: %{name}-%{version}.patch
+Patch1: %{name}-%{version}-optflags.patch
+Patch2: %{name}-%{version}-return.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -41,9 +49,10 @@
%setup -q
%patch0
%patch1
+%patch2
%build
-export CFLAGS="%optflags"
+export CFLAGS="%{optflags}"
make %{?jobs:-j%jobs}
%install
@@ -53,7 +62,7 @@
install -m 644 vlock.1 $RPM_BUILD_ROOT%{_mandir}/man1/
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
install -m 644 vlock.pamd $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/vlock
-install -m 644 %SOURCE1 .
+install -m 644 %{SOURCE1} .
%post
%run_permissions
@@ -71,8 +80,10 @@
%config %{_sysconfdir}/pam.d/vlock
%changelog
+* Mon May 04 2009 prusnak(a)suse.cz
+- fixed missing expression in return statement (return.patch)
* Tue May 06 2008 crrodriguez(a)suse.de
-- fix for FATE#300498 , use RPM_OPT_FLAGS everywhere.
+- fix for FATE#300498 , use RPM_OPT_FLAGS everywhere (optflags.patch)
* Tue Jul 24 2007 prusnak(a)suse.cz
- update to 1.4
* fixes for some compile time warnings
++++++ vlock-1.4-optflags.patch ++++++
--- /var/tmp/diff_new_pack.va1882/_old 2009-05-04 18:36:25.000000000 +0200
+++ /var/tmp/diff_new_pack.va1882/_new 2009-05-04 18:36:25.000000000 +0200
@@ -1,7 +1,5 @@
-Index: config.mk
-===================================================================
---- config.mk.orig 2007-05-23 10:31:58.000000000 +0200
-+++ config.mk 2008-05-06 07:34:33.000000000 +0200
+--- config.mk
++++ config.mk
@@ -5,7 +5,7 @@ PREFIX = /usr/local
DESTDIR =
++++++ vlock-1.4.patch ++++++
--- input.c
+++ input.c
@@ -27,6 +27,7 @@
*/
#define _XOPEN_SOURCE 1 /* so unistd.h will define crypt() */
+#define _GNU_SOURCE 1 /* strdup */
#include <unistd.h>
#ifdef SHADOW_PWD
/* Shadow passwd support; THIS IS NOT SAFE with some very old versions
--- signals.c
+++ signals.c
@@ -18,6 +18,7 @@
#include <sys/ioctl.h>
#include <sys/vt.h>
#include "vlock.h"
+#include <stdlib.h>
/* In release_vt() and acquire_vt(), anything which is done in
@@ -49,6 +50,11 @@
return;
}
+void signal_huper(int signo) {
+ restore_signals();
+ restore_terminal();
+ exit(0);
+}
@@ -71,7 +77,7 @@
sigaddset(&sig, SIGTSTP);
sigaddset(&sig, SIGTTIN);
sigaddset(&sig, SIGTTOU);
- sigaddset(&sig, SIGHUP);
+ sigaddset(&sig, SIGTERM);
sigaddset(&sig, SIGCHLD);
sigaddset(&sig, SIGQUIT);
sigaddset(&sig, SIGINT);
@@ -90,10 +96,14 @@
/* Need to handle some signals so that we don't get killed by them */
sa.sa_handler = signal_ignorer;
- sigaction(SIGHUP, &sa, NULL);
+ sigaction(SIGTERM, &sa, NULL);
sigaction(SIGQUIT, &sa, NULL);
sigaction(SIGINT, &sa, NULL);
sigaction(SIGTSTP, &sa, NULL);
+
+ /* Die cleanly on SIGHUP */
+ sa.sa_handler = signal_huper;
+ sigaction(SIGHUP, &sa, NULL);
}
--- vlock.pamd
+++ vlock.pamd
@@ -1,2 +1,5 @@
#%PAM-1.0
-auth required /lib/security/pam_pwdb.so shadow nullok
+auth include common-auth
+account include common-account
+password include common-password
+session include common-session
++++++ vlock-1.4-return.patch ++++++
--- sysrq.c
+++ sysrq.c
@@ -29,7 +29,7 @@ int disable_sysrq(void) {
if (!sysrq_file) {
fprintf(stderr, "Warning: couldn't open '%s': %s\n", SYSRQ_PATH, strerror(errno));
- return;
+ return 0;
}
if (!fgets(old_value, OLD_VALUE_LENGTH, sysrq_file)) {
@@ -50,10 +50,11 @@ int disable_sysrq(void) {
rewind(sysrq_file);
- return;
+ return 1;
error:
fclose(sysrq_file);
sysrq_file = NULL;
+ return 0;
}
void restore_sysrq(void) {
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package virt-manager for openSUSE:Factory
checked in at Mon May 4 18:36:12 CEST 2009.
--------
--- virt-manager/virt-manager.changes 2009-03-02 01:54:45.000000000 +0100
+++ /mounts/work_src_done/STABLE/virt-manager/virt-manager.changes 2009-05-01 03:23:29.628509000 +0200
@@ -1,0 +2,15 @@
+Thu Apr 30 09:46:58 MDT 2009 - dpmerrill(a)novell.com
+
+- Add dbus-1-x11 dependency for minimal installations
+
+-------------------------------------------------------------------
+Tue Apr 21 15:00:49 MDT 2009 - dpmerrill(a)novell.com
+
+- Update to virt-manager-0.7.0 and virtinst-0.400.3
+ Improved KVM support
+ Added support for libvirt storage/network pools
+ Details and Console windows are combined
+ Added scaling for VM console window
+ Simple VM migration support
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
virtinst-0.300.2.tar.gz
virtinst-vif.diff
virt-manager-0.5.3.tar.gz
virtman-dbus-query.diff
virtman-detect.diff
virtman-hardware.diff
virtman-misc.diff
virtman-timewatch.diff
virtman-vif.diff
virtman-xen-uri.diff
New:
----
virtinst-0.400.3.tar.gz
virtinst-cdrom.diff
virt-manager-0.7.0.tar.gz
virtman-bridge.diff
virtman-cdrom.diff
virtman-help.diff
virtman-kvm.diff
virtman-manager.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ virt-manager.spec ++++++
--- /var/tmp/diff_new_pack.i30599/_old 2009-05-04 18:35:41.000000000 +0200
+++ /var/tmp/diff_new_pack.i30599/_new 2009-05-04 18:35:41.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package virt-manager (Version 0.5.3)
+# spec file for package virt-manager (Version 0.7.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -22,11 +22,11 @@
%define gsysconfdir /etc
%define gconftool /usr/bin/gconftool-2
%define virtinst_maj 0
-%define virtinst_min 300
-%define virtinst_rel 2
+%define virtinst_min 400
+%define virtinst_rel 3
%define virtinst_name virtinst-%{virtinst_maj}.%{virtinst_min}.%{virtinst_rel}
-Version: 0.5.3
-Release: 67
+Version: 0.7.0
+Release: 1
Summary: Virtual Machine Manager
Group: System/Monitoring
License: LGPL v2.1 or later
@@ -36,18 +36,15 @@
Source0: virt-manager-%{version}.tar.gz
Source1: %{virtinst_name}.tar.gz
Patch0: virtman-desktop.diff
-Patch1: virtman-dbus-query.diff
-Patch2: virtman-xen-uri.diff
+Patch1: virtman-vminstall.diff
+Patch2: virtman-netcat.diff
Patch3: virtman-pointer.diff
-Patch4: virtman-detect.diff
-Patch5: virtman-timewatch.diff
-Patch6: virtman-vminstall.diff
-Patch7: virtman-vif.diff
-Patch8: virtman-hardware.diff
-Patch9: virtman-netcat.diff
-Patch50: virtinst-vif.diff
-Patch100: virtman-misc.diff
-# These two are just the oldest version tested
+Patch4: virtman-cdrom.diff
+Patch5: virtman-kvm.diff
+Patch6: virtman-bridge.diff
+Patch7: virtman-manager.diff
+Patch8: virtman-help.diff
+Patch51: virtinst-cdrom.diff
# Requires: pygtk2 >= 1.99.12-6
Requires: python-gtk
# Requires: gnome-python2-gconf >= 1.99.11-7
@@ -58,7 +55,7 @@
# Definitely does not work with earlier due to python API changes
# Requires: dbus-python >= 0.61
Requires: dbus-1-python
-# Might work with earlier, but this is what we've tested
+Requires: dbus-1-x11
#Requires: gnome-keyring >= 0.4.9
Requires: gnome-keyring
# Minimum we've tested with
@@ -67,7 +64,6 @@
# disabled
# Requires: gnome-python2-gnomekeyring >= 2.15.4
# Requires: gnome-python2-gnomevfs >= 2.15.4
-# Minimum we've tested with
Requires: libxml2-python >= 2.6.23
# Required to install Xen & QEMU guests
# Requires: python-virtinst >= 0.300.2
@@ -82,20 +78,22 @@
# For console widget
# Requires: gtk-vnc-python
Requires: python-gtk-vnc
+# Requires: librsvg added to avoid problems with minimal template
Requires: librsvg
Requires: netcat
# Add requires for non Xen installations
Requires: python-urlgrabber
-BuildRequires: python
+Requires: vm-install
+#rpmlint BuildRequires: python
BuildRequires: gtk2-devel
BuildRequires: python-devel
BuildRequires: gettext
BuildRequires: scrollkeeper
BuildRequires: intltool
-BuildRequires: python-gtk
+#rpmlint BuildRequires: python-gtk
BuildRequires: python-gtk-devel
BuildRequires: python-gobject2-devel
-BuildRequires: gconf2
+BuildRequires: gconf2-devel
BuildRequires: desktop-file-utils
BuildRequires: update-desktop-files
# virtinst BuildRequires
@@ -128,13 +126,11 @@
%patch6 -p1
%patch7 -p1
%patch8 -p1
-%patch9 -p1
-%patch100 -p1
pushd $RPM_BUILD_DIR/%{virtinst_name}
-%patch50 -p1
+%patch51 -p1
popd
-sed -i -e "s@sr\@Latn@sr\@latin@" configure
-mv po/sr(a)Latn.po po/sr(a)latin.po
+# sed -i -e "s@sr\@Latn@sr\@latin@" configure
+# mv po/sr(a)Latn.po po/sr(a)latin.po
%build
# autoreconf -i
@@ -148,17 +144,24 @@
make install DESTDIR=$RPM_BUILD_ROOT
pushd $RPM_BUILD_DIR/%{virtinst_name}
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --install-lib=%{_datadir}/virt-manager
-# remove unsued files
rm -f $RPM_BUILD_ROOT/usr/bin/virt-clone
rm -f $RPM_BUILD_ROOT/usr/bin/virt-image
rm -f $RPM_BUILD_ROOT/usr/bin/virt-install
+rm -f $RPM_BUILD_ROOT/usr/bin/virt-convert
rm -f $RPM_BUILD_ROOT/usr/share/locale/ja/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/locale/pl/LC_MESSAGES/virtinst.mo
+rm -f $RPM_BUILD_ROOT/usr/share/locale/fr/LC_MESSAGES/virtinst.mo
+rm -f $RPM_BUILD_ROOT/usr/share/locale/it/LC_MESSAGES/virtinst.mo
+rm -f $RPM_BUILD_ROOT/usr/share/locale/sr/LC_MESSAGES/virtinst.mo
+rm -f $RPM_BUILD_ROOT/usr/share/locale/pt_BR/LC_MESSAGES/virtinst.mo
+rm -f $RPM_BUILD_ROOT/usr/share/locale/sr(a)latin/LC_MESSAGES/virtinst.mo
+rm -f $RPM_BUILD_ROOT/usr/share/locale/zh_CN/LC_MESSAGES/virtinst.mo
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/virt-clone.1
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/virt-image.1
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/virt-install.1
+rm -f $RPM_BUILD_ROOT/usr/share/man/man1/virt-convert.1
rm -f $RPM_BUILD_ROOT/usr/share/man/man5/virt-image.5
-rm -f $RPM_BUILD_ROOT/usr/share/virt-manager/virtinst-0.300.2-py2.?.egg-info
+# rm -f $RPM_BUILD_ROOT/usr/share/virt-manager/virtinst-0.400.3-py2.?.egg-info
popd
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/sparkline.a
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/sparkline.la
@@ -171,9 +174,9 @@
%suse_update_desktop_file %{name} X-SuSE-YaST-Virtualization
sed -i -e 's/Categories=.*/Categories=Qt;X-SuSE-YaST;X-SuSE-YaST-Virtualization;/' $RPM_BUILD_ROOT/%{_datadir}/applications/YaST2/%{name}.desktop
# Nuking these because old version didnt have any
-rm -rf $RPM_BUILD_ROOT/usr/share/gnome
+# rm -rf $RPM_BUILD_ROOT/usr/share/gnome
# Also fixing the %{name}.lang file forcibly.
-sed -i '\^/usr/share/gnome/help/^d' %{name}.lang
+# sed -i '\^/usr/share/gnome/help/^d' %{name}.lang
%clean
# rm -rf $RPM_BUILD_ROOT
@@ -188,10 +191,10 @@
%doc COPYING AUTHORS ChangeLog
# %dir %attr(775,root,root) /etc/gconf
# %dir %attr(775,root,root) /etc/gconf/schemas
-%{gsysconfdir}/gconf/schemas/%{name}.schemas
+%config %{gsysconfdir}/gconf/schemas/%{name}.schemas
%{_bindir}/%{name}
%{_libexecdir}/%{name}-launch
-%{_libdir}/%{name}
+%{_libdir}/%{name}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*.glade
%dir %{_datadir}/%{name}/pixmaps
@@ -207,20 +210,41 @@
# %dir %attr(775,root,root) %{_datadir}/locale/or/LC_MESSAGES
# %{_datadir}/locale/or/LC_MESSAGES/*
%{_datadir}/omf/%{name}
-# %dir %attr(775,root,root) %{_datadir}/gnome
-# %{_datadir}/gnome/help
+%dir %attr(775,root,root) %{_datadir}/gnome
+%{_datadir}/gnome/help
%{_datadir}/applications/YaST2/%{name}.desktop
%{_datadir}/dbus-1/services/%{name}.service
%{_datadir}/man/man1/%{name}.1*
+# new files for virt-manager-0.7.0
+%dir %{_datadir}/%{name}/virtconv
+%{_datadir}/%{name}/virtconv/*.py
+%{_datadir}/%{name}/virtconv/*.pyc
+%dir %{_datadir}/%{name}/virtconv/parsers
+%{_datadir}/%{name}/virtconv/parsers/*.py
+%{_datadir}/%{name}/virtconv/parsers/*.pyc
+%{_datadir}/%{name}/virtinst-0.400.3-py2.6.egg-info
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/*
+%doc %{_datadir}/gnome/help/%{name}/C/figures/*.png
+%doc %{_datadir}/gnome/help/%{name}/C/*.xml
# FIXME: autobuild complains that these are unowned (not true...)
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/services
%dir %{_datadir}/applications/YaST2
%changelog
-* Mon Mar 02 2009 ro(a)suse.de
+* Thu Apr 30 2009 dpmerrill(a)novell.com
+- Add dbus-1-x11 dependency for minimal installations
+* Tue Apr 21 2009 dpmerrill(a)novell.com
+- Update to virt-manager-0.7.0 and virtinst-0.400.3
+ Improved KVM support
+ Added support for libvirt storage/network pools
+ Details and Console windows are combined
+ Added scaling for VM console window
+ Simple VM migration support
+* Sun Mar 01 2009 ro(a)suse.de
- move sr@Latn to sr@latin
-* Thu Dec 04 2008 dpmerrill(a)suse.de
+* Wed Dec 03 2008 dpmerrill(a)suse.de
- Remove ia64 from build architectures (bnc#455989)
* Tue Nov 11 2008 dpmerrill(a)novell.com
- Add Requires python-urlgrabber for non Xen installations
@@ -234,7 +258,7 @@
* Fri May 16 2008 ro(a)suse.de
- move python install to install section in specfile
- fix build without root privileges
-* Wed Apr 30 2008 dpmerrill(a)novell.com
+* Tue Apr 29 2008 dpmerrill(a)novell.com
- Corrected gconf calls in spec file to fix build errors
* Tue Apr 29 2008 dpmerrill(a)novell.com
- Added needsrootforbuild to spec file to fix build errors
@@ -254,7 +278,7 @@
- Changed vnc settings to prevent screen-saver lockup (bnc#253264)
- Added read-only option in Details->Hardware for adding cdroms
to prevent libvirt exceptions. (bnc#368204) (bnc#361990)
-* Sat Apr 05 2008 dpmerrill(a)novell.com
+* Fri Apr 04 2008 dpmerrill(a)novell.com
- Removed Virtual Network tab from host details page (bnc#364514)
* Wed Apr 02 2008 dpmerrill(a)novell.com
- Fixed adding a virtual network to a vm (bnc#302663)
@@ -265,11 +289,11 @@
- Added virtman-timewatch to minimize window after
- inactivity to work around memory leaks in GTK and DBus
- bnc#287366 (L3)
-* Fri Feb 15 2008 dpmerrill(a)novell.com
+* Thu Feb 14 2008 dpmerrill(a)novell.com
- Changed virtman-xen-uri to correct the case where no
- connection param is passed in and uri is None
- bnc#362013
-* Wed Feb 13 2008 dpmerrill(a)novell.com
+* Tue Feb 12 2008 dpmerrill(a)novell.com
- Changed virtman-desktop and virtman-xen-uri to correct invalid
- parms being passed in from YaST - now sends "-c xen:///"
- bnc#361334
@@ -280,7 +304,7 @@
* Mon Feb 11 2008 dpmerrill(a)novell.com
- Added virtman-pointer to set vnc to show only one pointer
- bnc#359799
-* Mon Feb 04 2008 dpmerrill(a)novell.com
+* Sun Feb 03 2008 dpmerrill(a)novell.com
- Added virtman-vminstall for connecting to vm-install
- and changed virtman-xen-uri.diff to force "xen:///"
- bnc#358400
@@ -343,12 +367,12 @@
* Mon Mar 12 2007 ccoffing(a)novell.com
- Update virt-manager to match changes in vm-install's disk class,
due to bug #247849.
-* Sat Mar 10 2007 ccoffing(a)novell.com
+* Fri Mar 09 2007 ccoffing(a)novell.com
- Make Ctrl+Alt release the mouse cursor (#252998).
* Thu Mar 08 2007 ccoffing(a)novell.com
- Add release to "Requires: xen-tools", to prevent mixing with
pre-beta 5. (#238986, #252495)
-* Sat Mar 03 2007 ccoffing(a)novell.com
+* Fri Mar 02 2007 ccoffing(a)novell.com
- Disable gtk-menu-bar-accel when VM has focus, to allow VM to get
F10 key. (#240001)
* Tue Feb 27 2007 ccoffing(a)novell.com
@@ -374,12 +398,12 @@
* Mon Jan 22 2007 ccoffing(a)novell.com
- Fix desktop file, so icon shows in YaST. (#237046)
- Clean up macros in spec file.
-* Sat Jan 20 2007 ccoffing(a)novell.com
+* Fri Jan 19 2007 ccoffing(a)novell.com
- Use temporary icon until real ones arrive.
- Update to changeset 371 to fix VNC issues.
* Wed Jan 17 2007 ccoffing(a)novell.com
- Fix BuildRequires and paths to work with both SLES10 and STABLE.
-* Sat Jan 13 2007 ccoffing(a)novell.com
+* Fri Jan 12 2007 ccoffing(a)novell.com
- Fix sysconfdir path.
- Add desktop file.
* Thu Jan 11 2007 ccoffing(a)novell.com
++++++ virtinst-0.300.2.tar.gz -> virtinst-0.400.3.tar.gz ++++++
++++ 50123 lines of diff (skipped)
++++++ virtinst-cdrom.diff ++++++
diff -Nuar virtinst-0.400.3.orig//virtinst/VirtualDisk.py virtinst-0.400.3//virtinst/VirtualDisk.py
--- virtinst-0.400.3.orig//virtinst/VirtualDisk.py 2009-03-09 21:32:15.000000000 -0600
+++ virtinst-0.400.3//virtinst/VirtualDisk.py 2009-04-21 10:58:25.000000000 -0600
@@ -846,14 +846,18 @@
return self.target
raise ValueError(_("IDE CDROM must use 'hdc', but target in use."))
- # Regular scanning
+ # Start cdrom at 'c' and skip 'c' for non-cdrom
for i in range(maxnode):
gen_t = "%s%c" % (prefix, ord('a') + i)
- if gen_t in except_targets:
- continue
if gen_t not in skip_targets:
- self.target = gen_t
- return self.target
+ if self.device != self.DEVICE_CDROM:
+ if i != ord('c') - ord('a'):
+ self.target = gen_t
+ return self.target
+ else:
+ if i >= ord('c') - ord('a'):
+ self.target = gen_t
+ return self.target
# Check except_targets for any options
for t in except_targets:
++++++ virt-manager-0.5.3.tar.gz -> virt-manager-0.7.0.tar.gz ++++++
++++ 296785 lines of diff (skipped)
++++++ virtman-bridge.diff ++++++
diff -Nuar virt-manager-0.7.0.orig//src/virtManager/addhardware.py virt-manager-0.7.0//src/virtManager/addhardware.py
--- virt-manager-0.7.0.orig//src/virtManager/addhardware.py 2009-04-21 14:53:08.000000000 -0600
+++ virt-manager-0.7.0//src/virtManager/addhardware.py 2009-04-21 14:56:20.000000000 -0600
@@ -481,7 +481,10 @@
net = self.get_config_network()
if net[0] == "bridge":
self.window.get_widget("summary-net-type").set_text(_("Shared physical device"))
- self.window.get_widget("summary-net-target").set_text(net[1])
+ if net[1] != None:
+ self.window.get_widget("summary-net-target").set_text(net[1])
+ else:
+ self.window.get_widget("summary-net-target").set_text(_("Default"))
elif net[0] == "network":
self.window.get_widget("summary-net-type").set_text(_("Virtual network"))
self.window.get_widget("summary-net-target").set_text(net[1])
++++++ virtman-cdrom.diff ++++++
diff -Nuar virt-manager-0.7.0.orig//src/virtManager/addhardware.py virt-manager-0.7.0//src/virtManager/addhardware.py
--- virt-manager-0.7.0.orig//src/virtManager/addhardware.py 2009-03-09 21:38:37.000000000 -0600
+++ virt-manager-0.7.0//src/virtManager/addhardware.py 2009-04-21 10:07:18.000000000 -0600
@@ -1021,6 +1021,8 @@
model.append(["virtio", virtinst.VirtualDisk.DEVICE_DISK,
gtk.STOCK_HARDDISK, "Virtio Disk"])
if self.vm.get_connection().get_type().lower() == "xen":
+ model.append(["xen", virtinst.VirtualDisk.DEVICE_CDROM,
+ gtk.STOCK_CDROM, "Virtual disk (read only)"])
model.append(["xen", virtinst.VirtualDisk.DEVICE_DISK,
gtk.STOCK_HARDDISK, "Virtual disk"])
++++++ virtman-desktop.diff ++++++
--- /var/tmp/diff_new_pack.i30599/_old 2009-05-04 18:35:45.000000000 +0200
+++ /var/tmp/diff_new_pack.i30599/_new 2009-05-04 18:35:45.000000000 +0200
@@ -1,37 +1,37 @@
-diff -Nuar virt-manager-0.5.3.orig/src/Makefile.am virt-manager-0.5.3/src/Makefile.am
---- virt-manager-0.5.3.orig/src/Makefile.am 2008-01-10 18:17:51.000000000 -0700
-+++ virt-manager-0.5.3/src/Makefile.am 2008-04-29 11:07:08.000000000 -0600
+diff -Nuar virt-manager-0.7.0.orig//src/Makefile.am virt-manager-0.7.0//src/Makefile.am
+--- virt-manager-0.7.0.orig//src/Makefile.am 2009-03-09 21:38:37.000000000 -0600
++++ virt-manager-0.7.0//src/Makefile.am 2009-04-16 16:31:18.000000000 -0600
@@ -14,7 +14,7 @@
gladedir = $(pkgdatadir)
glade_DATA = $(wildcard $(srcdir)/*.glade)
-desktopdir = $(datadir)/applications
+desktopdir = $(datadir)/applications/YaST2/
- desktop_SOURCES = $(PACKAGE).desktop.in.in
+ desktop_DATA_IN = $(PACKAGE).desktop.in.in
desktop_DATA = $(PACKAGE).desktop
-diff -Nuar virt-manager-0.5.3.orig/src/Makefile.in virt-manager-0.5.3/src/Makefile.in
---- virt-manager-0.5.3.orig/src/Makefile.in 2008-01-10 18:18:06.000000000 -0700
-+++ virt-manager-0.5.3/src/Makefile.in 2008-04-29 11:12:12.000000000 -0600
-@@ -246,7 +246,7 @@
+diff -Nuar virt-manager-0.7.0.orig//src/Makefile.in virt-manager-0.7.0//src/Makefile.in
+--- virt-manager-0.7.0.orig//src/Makefile.in 2009-03-09 21:39:01.000000000 -0600
++++ virt-manager-0.7.0//src/Makefile.in 2009-04-16 16:31:47.000000000 -0600
+@@ -248,7 +248,7 @@
libexec_SCRIPTS = $(PACKAGE)-launch
gladedir = $(pkgdatadir)
glade_DATA = $(wildcard $(srcdir)/*.glade)
-desktopdir = $(datadir)/applications
+desktopdir = $(datadir)/applications/YaST2/
- desktop_SOURCES = $(PACKAGE).desktop.in.in
+ desktop_DATA_IN = $(PACKAGE).desktop.in.in
desktop_DATA = $(PACKAGE).desktop
dbusdir = $(datadir)/dbus-1/services
-diff -Nuar virt-manager-0.5.3.orig/src/virt-manager.desktop.in.in virt-manager-0.5.3/src/virt-manager.desktop.in.in
---- virt-manager-0.5.3.orig/src/virt-manager.desktop.in.in 2008-01-10 18:17:51.000000000 -0700
-+++ virt-manager-0.5.3/src/virt-manager.desktop.in.in 2008-04-29 11:11:24.000000000 -0600
+diff -Nuar virt-manager-0.7.0.orig//src/virt-manager.desktop.in.in virt-manager-0.7.0//src/virt-manager.desktop.in.in
+--- virt-manager-0.7.0.orig//src/virt-manager.desktop.in.in 2009-03-09 21:38:37.000000000 -0600
++++ virt-manager-0.7.0//src/virt-manager.desktop.in.in 2009-04-16 16:35:46.000000000 -0600
@@ -1,9 +1,16 @@
[Desktop Entry]
-+Version=1.0
_Name=Virtual Machine Manager
_Comment=Manage virtual machines
-Icon=::ICONDIR::/::PACKAGE::-icon.svg
-Exec=::PACKAGE::
++Version=1.0
+Icon=yast-vm-management
+Exec=/usr/bin/virt-manager -c xen:///
Type=Application
++++++ virtman-help.diff ++++++
diff -Nuar virt-manager-0.7.0.orig//help/virt-manager/C/virt-manager.xml virt-manager-0.7.0//help/virt-manager/C/virt-manager.xml
--- virt-manager-0.7.0.orig//help/virt-manager/C/virt-manager.xml 2009-03-09 21:38:36.000000000 -0600
+++ virt-manager-0.7.0//help/virt-manager/C/virt-manager.xml 2009-04-24 17:02:36.000000000 -0600
@@ -821,218 +821,9 @@
<title>The Create Wizard</title>
<para>The Create Wizard helps you gather the information necessary to create
new virtual machines. All the information in each screen is retained and can
- be backed-up-to and modified until you click <guibutton>Finish</guibutton>
+ be backed-up-to and modified until you click <guibutton>OK</guibutton>
on the last screen.</para>
- <sect2 id="virt-manager-system-name">
- <title>The System Name screen</title>
- <para>Choose a name for your virtual system. The name must be non-blank,
- alphanumeric (plus underscores), contain at least one letter, and be less
- than 50 characters.</para>
- </sect2>
-
- <sect2 id="virt-manager-virt-method">
- <title>The Virtualization Method screen</title>
- <para>Choose a virtualization method for your new system. The choices
- are:</para>
- <variablelist>
- <varlistentry><term>Paravirtualized</term> <listitem><para>A
- paravirtualized system typically performs better than a fully virtualized
- system because certain operations — disk and network access, for
- example — have direct access to the hardware. However a
- paravirtualized VM requires a specially modified kernel. If you
- choose paravirtualized, you must make sure this specially modified kernel
- is available for the operating system you wish to install.</para>
- </listitem>
- </varlistentry>
- <varlistentry><term>Fully Virtualized</term>
- <listitem>
- <para>A fully virtualized system simulates all the hardware for the VM,
- permitting no direct access. It allows for a greater range of operating
- systems, but generally will not perform as well as a paravirtualized
- system. Note that for some hypervisor types, full virtualization requires
- hardware support. In addition if your hardware allows it, you can
- enable hardware acceleration for your fully virtualized guest (this
- item will be grayed out unless your hardware is acceleration-capable).</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect2>
-
- <sect2 id="virt-manager-installation-media">
- <title>The Installation Media screens</title>
- <para>The Installation Media screens let you specify where the physical or
- virtual install media for your VM are located, so that the installer can
- find them. There are two screens, one for each type of virtual
- machine.</para>
- <sect3 id="virt-manager-installation-media-paravirt">
- <title>Paravirtualized installation media</title>
- <figure id="virt-manager-FIG-paravirt-media">
- <title>Choose Install Media for Paravirtualized VMs</title>
- <screenshot>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/vm-paravirt-media.png" format="PNG"/>
- </imageobject>
- <textobject> <phrase>Shows the paravirtualized VM media choice window.</phrase>
- </textobject>
- </mediaobject>
- </screenshot>
- </figure>
- <para>A paravirtualized VM requires an install tree that follows the
- pattern of the Fedora install tree (e.g. <ulink type="http"
- url="http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/">
- this tree</ulink>). The <guilabel>Install Media URL</guilabel> box lets
- you enter a URL for a tree like this. When you then go to install the
- guest, the installer will check to see if the URL you entered is
- readable, and if so download the paravirtualized install kernel and
- initrd that it will need to start the install. You can use the following
- URL types:</para>
- <variablelist>
- <varlistentry><term>http:</term>
- <listitem><para>e.g. <userinput>http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/</userinput></para>
- </listitem>
- </varlistentry>
- <varlistentry><term>ftp:</term>
- <listitem><para>e.g. <userinput>ftp://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/</userinput></para>
- </listitem>
- </varlistentry>
- <varlistentry><term>nfs:</term>
- <listitem><para>e.g. <userinput>nfs:myfileserver:/images/linux/core/6/i386/os/</userinput></para>
- </listitem>
- </varlistentry>
- <varlistentry><term>local file:</term>
- <listitem><para>e.g. <userinput>/tmp/paravirttrees/fedora/os</userinput>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>You can specify a kickstart URL for your paravirtualized VM in
- exactly the same way as the install tree described
- above. <application>&app;</application> will remember the last 5 URLs you
- enter in these windows, so if you are installing multiple VMs you will
- not have to type the URLs more than once.
- </para>
- </sect3>
- <sect3 id="virt-manager-installation-media-full-virt">
- <title>Fully Virtualized Installation Media</title>
- <figure id="virt-manager-FIG-full-virt-media">
- <title>Choose Install Media for Fully Virtualized VMs</title>
- <screenshot>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/vm-full-virt-media.png" format="PNG"/>
- </imageobject>
- <textobject> <phrase>Shows the fully virtualized VM media choice window.</phrase>
- </textobject>
- </mediaobject>
- </screenshot>
- </figure>
- <para>A fully virtualized VM requires the standard installation media that
- the same non-virtualized OS would require: either an actual CD or DVD, or
- a corresponding ISO image. On the Installation Media screen for a fully
- virtualized VM, you can therefore choose the path to your CD or DVD from
- the pull-down list, or you can enter or browse to the path of the ISO
- image you have saved in your local filesystem.</para>
- <para>For fully virtualized VMs, <application>&app;</application> also
- asks for the operating system type and variant you are installing. The
- installer uses this to set the <parameter>acpi</parameter> and
- <parameter>apic</parameter> flags according to the OS type (other
- parameters may be added to this list in the future).</para>
- </sect3>
- </sect2>
-
- <sect2 id="virt-manager-storage-space">
- <title>Assigning Storage Space</title>
- <figure id="virt-manager-FIG-assign-storage">
- <title>Assign Storage</title>
- <screenshot>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/vm-assign-storage.png" format="PNG"/>
- </imageobject>
- <textobject> <phrase>Shows the Assigning Storage window.</phrase>
- </textobject>
- </mediaobject>
- </screenshot>
- </figure>
-
- <para>Designate the primary storage device for your VM. You may choose an
- existing physical or LVM partition in the <guilabel>Partition</guilabel>
- box; or, you may choose to use a file on the local filesystem. If you
- choose to use a file that does not already exist, you may specify the size
- of the file in megabytes. If you choose an existing file, that file's size
- will not change. If you use a file for your primary storage device, you
- may also choose whether to allocate the entire file
- at creation time, or whether to allow it to grow to its maximum over
- time.</para>
- <warning>
- <title>Sparse files can be dangerous</title>
- <para>You may be tempted not to allocate your entire file when your VM is
- created; filling a 5- to 10-GB file with 0s can take quite a while, and
- you will avoid this wait by not allocating the entire file and instead using a
- "sparse" file. However, be aware that this will slow down your VM's disk
- performance significantly, as the underlying OS must keep allocating more
- storage space as your VM runs. In addition, if the disk your sparse file
- is on runs out of space, your VM may crash and lose data. You may
- therefore only want to use a sparse file when testing, where guest
- creation speed could be at a premium.</para>
- </warning>
- </sect2>
-
- <sect2 id="virt-manager-memory-and-cpu">
- <title>Allocate Memory And CPU</title>
- <figure id="virt-manager-FIG-mem-cpu">
- <title>Set Memory and CPU</title>
- <screenshot>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/vm-create-mem-cpu.png" format="PNG"/>
- </imageobject>
- <textobject> <phrase>Shows the VM Memory and CPU choice window.</phrase>
- </textobject>
- </mediaobject>
- </screenshot>
- </figure>
- <para>The <guilabel>Memory</guilabel> section of this screen lets you set
- two parameters, <guilabel>VM Max Memory</guilabel> and <guilabel>VM
- Startup Memory</guilabel>. These settings work as follows:</para>
- <variablelist>
- <varlistentry><term>VM Max Memory</term> <listitem><para><guilabel>VM Max
- Memory</guilabel> sets the maximum memory your VM can have unless you
- reboot it with a higher setting. For paravirtualized VMs, the maximum
- memory is a boot-time kernel setting; for fully virtualized VMs, the
- maximum memory appears to the VM to be the amount of physical memory
- available.</para>
- </listitem>
- </varlistentry>
- <varlistentry><term>VM Startup Memory</term>
- <listitem><para>For paravirtualized VMs, <guilabel>VM Startup
- Memory</guilabel> sets the amount of memory to start the VM with. The
- VM's available memory can then be changed from <application>&app;</application>
- while the VM is running. For fully virtualized guests, this setting has
- no effect.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>The virtual CPU section of this screen lets you set the number of
- vCPUs your VM starts up with. For paravirtualized guests, this number can
- be changed while the guest is running (although never to more than the VM
- started with). For fully virtualized guests, this number can only be
- changed while the guest is not running.</para>
- </sect2>
-
- <sect2 id="virt-manager-validation">
- <title>Validation</title>
- <para>The Validation screen lets you verify the setup for your new
- system. If you need to, you can back up and
- make changes. Clicking "Finish" will begin creating your virtual
- machine. If you have the <application>&app;</application> preferences set
- to automatically open consoles, a <link
- linkend="virt-manager-console-window">Console window</link> will pop up
- as soon as the installer has downloaded the necessary images and booted
- the VM's installer.
- </para>
- </sect2>
+ <para>For further details, see documentation for "vm-install".</para>
</sect1>
</article>
++++++ virtman-kvm.diff ++++++
diff -Nuar virt-manager-0.7.0.orig//src/virt-manager.py.in virt-manager-0.7.0//src/virt-manager.py.in
--- virt-manager-0.7.0.orig//src/virt-manager.py.in 2009-03-09 21:38:37.000000000 -0600
+++ virt-manager-0.7.0//src/virt-manager.py.in 2009-04-21 14:24:51.000000000 -0600
@@ -192,7 +192,8 @@
tryuri = "xen:///"
elif (os.path.exists("/usr/bin/qemu") or
os.path.exists("/usr/bin/qemu-kvm") or
- os.path.exists("/usr/bin/kvm")):
+ os.path.exists("/usr/bin/kvm") or
+ os.path.exists("/dev/kvm") ):
tryuri = "qemu:///system"
return tryuri
++++++ virtman-manager.diff ++++++
diff -Nuar virt-manager-0.7.0.orig//src/virtManager/manager.py virt-manager-0.7.0//src/virtManager/manager.py
--- virt-manager-0.7.0.orig//src/virtManager/manager.py 2009-03-09 21:38:37.000000000 -0600
+++ virt-manager-0.7.0//src/virtManager/manager.py 2009-04-24 15:14:21.000000000 -0600
@@ -656,6 +656,15 @@
vmlist = self.window.get_widget("vm-list")
selection = vmlist.get_selection()
active = selection.get_selected()
+ if active[1] == None and active[0] != None:
+ # in some cases on vhost, the connection is not being selected at startup.
+ # when creating new vms, if current_connection() returns None, several
+ # functions will fail, so if the user hasn't selected a connection, default
+ # to the first connection in the list.
+ first = active[0].get_iter_first()
+ if first != None:
+ selection.select_iter( first )
+ active = selection.get_selected()
if active[1] != None:
parent = active[0].iter_parent(active[1])
# return the connection of the currently selected vm, or the
@@ -810,7 +819,14 @@
return False
def new_vm(self, ignore=None):
- self.emit("action-show-create", self.current_connection_uri())
+ conn = self.current_connection()
+ if conn.get_state() == vmmConnection.STATE_ACTIVE:
+ self.emit("action-show-create", self.current_connection_uri())
+ else:
+ message_box = gtk.MessageDialog( None, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK,
+ _("Must select an active connection before creating a Virtual Machine") )
+ message_box.run()
+ message_box.destroy()
def delete_vm(self, ignore=None):
conn = self.current_connection()
++++++ virtman-netcat.diff ++++++
--- /var/tmp/diff_new_pack.i30599/_old 2009-05-04 18:35:45.000000000 +0200
+++ /var/tmp/diff_new_pack.i30599/_new 2009-05-04 18:35:45.000000000 +0200
@@ -1,12 +1,12 @@
-diff -Nuar virt-manager-0.5.3.orig/src/virtManager/console.py virt-manager-0.5.3/src/virtManager/console.py
---- virt-manager-0.5.3.orig/src/virtManager/console.py 2008-11-11 16:06:50.000000000 -0700
-+++ virt-manager-0.5.3/src/virtManager/console.py 2008-11-11 16:07:14.000000000 -0700
-@@ -407,7 +407,7 @@
- os.close(1)
- os.dup(fds[1].fileno())
- os.dup(fds[1].fileno())
-- os.execlp("ssh", "ssh", "-p", "22", "-l", "root", server, "nc", vncaddr, str(vncport))
-+ os.execlp("ssh", "ssh", "-p", "22", "-l", "root", server, "netcat", vncaddr, str(vncport))
+diff -Nuar virt-manager-0.7.0.orig//src/virtManager/details.py virt-manager-0.7.0//src/virtManager/details.py
+--- virt-manager-0.7.0.orig//src/virtManager/details.py 2009-03-09 21:38:37.000000000 -0600
++++ virt-manager-0.7.0//src/virtManager/details.py 2009-04-20 10:13:49.000000000 -0600
+@@ -1233,7 +1233,7 @@
+ argv = ["ssh", "ssh", "-p", sshport]
+ if username:
+ argv += ['-l', username]
+- argv += [ server, "nc", vncaddr, str(vncport) ]
++ argv += [ server, "netcat", vncaddr, str(vncport) ]
+ os.execlp(*argv)
os._exit(1)
else:
- fds[1].close()
++++++ virtman-pointer.diff ++++++
--- /var/tmp/diff_new_pack.i30599/_old 2009-05-04 18:35:45.000000000 +0200
+++ /var/tmp/diff_new_pack.i30599/_new 2009-05-04 18:35:45.000000000 +0200
@@ -1,24 +1,18 @@
-diff -Nuar virt-manager-0.5.3.orig/src/virtManager/console.py virt-manager-0.5.3/src/virtManager/console.py
---- virt-manager-0.5.3.orig/src/virtManager/console.py 2008-01-10 18:17:51.000000000 -0700
-+++ virt-manager-0.5.3/src/virtManager/console.py 2008-04-09 11:02:33.000000000 -0600
-@@ -78,13 +78,13 @@
- self.window.get_widget("console-vnc-align").add(self.vncViewer)
+diff -Nuar virt-manager-0.7.0.orig//src/virtManager/details.py virt-manager-0.7.0//src/virtManager/details.py
+--- virt-manager-0.7.0.orig//src/virtManager/details.py 2009-04-20 10:21:46.000000000 -0600
++++ virt-manager-0.7.0//src/virtManager/details.py 2009-04-20 10:27:37.000000000 -0600
+@@ -218,10 +218,10 @@
+ self.window.get_widget("console-vnc-viewport").add(self.vncViewer)
self.vncViewer.realize()
self.vncTunnel = None
- if self.config.get_console_keygrab() == 2:
- self.vncViewer.set_keyboard_grab(True)
-- self.vncViewer.set_pointer_grab(True)
- else:
- self.vncViewer.set_keyboard_grab(False)
-- self.vncViewer.set_pointer_grab(False)
-- self.vncViewer.set_pointer_local(True)
-+ # change to always set grab flags as False
-+ # setting them to true raises the error of Dom0 screen-saver losing the pointer
-+ # if the pointer is over DomU when screen saver activates
++ # Always set grab flags to False. Setting them to True introduces a bug where Dom0 ScreenSaver
++ # loses the pointer if the pointer is over Dom0 when the ScreenSaver activates.
++ # This patch can be removed when testing shows the bug (Gtk?) is fixed.
+ self.vncViewer.set_keyboard_grab(False)
-+ self.vncViewer.set_pointer_grab(False)
-+ # comment set_pointer_local to prevent 2 pointers in vnc viewer
-+ # self.vncViewer.set_pointer_local(True)
+ self.vncViewer.set_pointer_grab(True)
- self.vncViewer.connect("vnc-pointer-grab", self.notify_grabbed)
- self.vncViewer.connect("vnc-pointer-ungrab", self.notify_ungrabbed)
+ self.scale_type = self.config.get_console_scaling()
++++++ virtman-vminstall.diff ++++++
--- /var/tmp/diff_new_pack.i30599/_old 2009-05-04 18:35:45.000000000 +0200
+++ /var/tmp/diff_new_pack.i30599/_new 2009-05-04 18:35:45.000000000 +0200
@@ -1,45 +1,41 @@
-diff -Nuar virt-manager-0.5.3.orig/src/virtManager/engine.py virt-manager-0.5.3/src/virtManager/engine.py
---- virt-manager-0.5.3.orig/src/virtManager/engine.py 2008-03-12 15:21:57.000000000 -0600
-+++ virt-manager-0.5.3/src/virtManager/engine.py 2008-03-12 17:43:02.000000000 -0600
-@@ -34,7 +34,7 @@
+diff -Nuar virt-manager-0.7.0.orig//src/virtManager/engine.py virt-manager-0.7.0//src/virtManager/engine.py
+--- virt-manager-0.7.0.orig//src/virtManager/engine.py 2009-03-09 21:38:37.000000000 -0600
++++ virt-manager-0.7.0//src/virtManager/engine.py 2009-04-17 11:48:12.000000000 -0600
+@@ -33,7 +33,8 @@
+ from virtManager.manager import vmmManager
from virtManager.details import vmmDetails
- from virtManager.console import vmmConsole
from virtManager.asyncjob import vmmAsyncJob
-from virtManager.create import vmmCreate
++#from virtManager.create import vmmCreate
+from vminstall.gtk.interface import VMCreate as vmmCreate
- from virtManager.serialcon import vmmSerialConsole
from virtManager.host import vmmHost
from virtManager.error import vmmErrorDialog
-@@ -311,16 +311,25 @@
- def show_manager(self):
- self.get_manager().show()
+ import virtManager.util as util
+@@ -341,13 +342,24 @@
+ return False
+ return True
-- def show_create(self, uri):
-- con = self.get_connection(uri)
+ def _vmmcreate_closing(self,signal,key):
-+ self.windowCreate= None;
-
-- if self.connections[uri]["windowCreate"] == None:
-- create = vmmCreate(self.get_config(), con)
-+ def show_create(self, uri):
-+ if self.windowCreate == None:
++ self.windowCreate = None
++
+ def show_create(self, uri):
+ if self.windowCreate == None:
+- create = vmmCreate(self.get_config(), self)
+ create = vmmCreate(virtman=True,key=0)
create.connect("action-show-console", self._do_show_console)
- create.connect("action-show-terminal", self._do_show_terminal)
- create.connect("action-show-help", self._do_show_help)
-- self.connections[uri]["windowCreate"] = create
-- self.connections[uri]["windowCreate"].show()
+ create.connect("vmmcreate-closing", self._vmmcreate_closing)
-+ self.windowCreate = create
+ self.windowCreate = create
+- self.windowCreate.show(uri)
+ self.windowCreate.show()
+ else:
+ message_box = gtk.MessageDialog(None,
-+ gtk.DIALOG_MODAL,
-+ gtk.MESSAGE_WARNING,
-+ gtk.BUTTONS_OK,
-+ _("A new installation is already in progress.\n\nUse the YaST \"Create Virtual Machines\" utility for concurrent installations."))
++ gtk.DIALOG_MODAL,
++ gtk.MESSAGE_WARNING,
++ gtk.BUTTONS_OK,
++ _("A new installation is already in progress.\n\nUse the YaST \"Create Virtual Machines\" utility for concurrent installations."))
+ message_box.run()
+ message_box.destroy()
- def add_connection(self, uri, readOnly=None):
+ def add_connection(self, uri, readOnly=None, autoconnect=False):
conn = vmmConnection(self.get_config(), uri, readOnly)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0