Hello community,

here is the log from the commit of package gdb for openSUSE:Factory checked in 
at 2014-12-25 23:21:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gdb (Old)
 and      /work/SRC/openSUSE:Factory/.gdb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gdb"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gdb/gdb.changes  2014-10-16 14:53:49.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.gdb.new/gdb.changes     2014-12-25 
23:20:41.000000000 +0100
@@ -1,0 +2,13 @@
+Mon Dec 15 07:33:31 UTC 2014 - [email protected]
+
+- Update for GDB 7.8.1
+  * removed (already in upstream): 
+     gdb-babeltrace-configure.patch
+     gdb-async-stopped-on-pid-arg-2of2.patch
+  * amended (partially in upstream):
+     gdb-archer.patch
+     gdb-attach-fail-reasons-5of5.patch
+     gdb-async-stopped-on-pid-arg-1of2.patch
+     gdb-async-stopped-on-pid-arg-testsuite.patch
+
+-------------------------------------------------------------------

Old:
----
  gdb-7.8.tar.bz2
  gdb-async-stopped-on-pid-arg-2of2.patch
  gdb-babeltrace-configure.patch

New:
----
  gdb-7.8.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gdb.spec ++++++
--- /var/tmp/diff_new_pack.6xr3al/_old  2014-12-25 23:20:44.000000000 +0100
+++ /var/tmp/diff_new_pack.6xr3al/_new  2014-12-25 23:20:44.000000000 +0100
@@ -27,7 +27,7 @@
 %global snap       20130731
 # See timestamp of source gnulib installed into gdb/gnulib/ .
 %global snapgnulib 20121213
-Version:        7.8
+Version:        7.8.1
 Release:        0
 
 # The release always contains a leading reserved number, start it at 1.
@@ -35,8 +35,8 @@
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 # Do not provide URL for snapshots as the file lasts there only for 2 days.
-# ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2
-Source:         gdb-%{version}.tar.bz2
+# ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.gz
+Source:         gdb-%{version}.tar.gz
 Url:            http://gnu.org/software/gdb/
 
 %if "%{scl}" == "devtoolset-1.1"
@@ -199,7 +199,6 @@
 Patch106:       gdb-python-completer-1of2.patch
 Patch107:       gdb-python-completer-2of2.patch
 Patch108:       gdb-fortran-frame-string.patch
-Patch109:       gdb-babeltrace-configure.patch
 Patch110:       gdb-dts-rhel6-python-compat.patch
 Patch111:       gdb-6.6-buildid-locate-rpm-scl.patch
 Patch112:       gdb-readline62-ask-more-rh.patch
@@ -211,7 +210,6 @@
 # Upstream patch to fix gcc -Werror
 Patch1002:      gdb-6.6-buildid-locate-rpm-suse.patch
 Patch1003:      gdb-async-stopped-on-pid-arg-1of2.patch
-Patch1004:      gdb-async-stopped-on-pid-arg-2of2.patch
 Patch1005:      gdb-async-stopped-on-pid-arg-testsuite.patch
 
 BuildRequires:  bison
@@ -455,7 +453,6 @@
 %patch106 -p1
 %patch107 -p1
 %patch108 -p1
-%patch109 -p1
 %patch110 -p1
 %patch110 -p1 -R
 %patch111 -p1
@@ -472,7 +469,6 @@
 
 %patch1002 -p1
 %patch1003 -p1
-%patch1004 -p1
 %patch1005 -p1
 
 find -name "*.orig" | xargs rm -f

++++++ gdb-archer.patch ++++++
--- /var/tmp/diff_new_pack.6xr3al/_old  2014-12-25 23:20:44.000000000 +0100
+++ /var/tmp/diff_new_pack.6xr3al/_new  2014-12-25 23:20:44.000000000 +0100
@@ -7,60 +7,33 @@
 tromey/python
 
 
-Index: gdb-7.8/README.archer
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8/README.archer      2014-07-29 19:29:04.861982779 +0200
-@@ -0,0 +1,2 @@
-+This branch originally held the Python code for gdb.  It still exists
-+because a small amount of code here has not yet been merged upstream.
-Index: gdb-7.8/gdb/Makefile.in
-===================================================================
---- gdb-7.8.orig/gdb/Makefile.in       2014-07-29 19:29:02.665979655 +0200
-+++ gdb-7.8/gdb/Makefile.in    2014-07-29 19:29:04.862982781 +0200
-@@ -1476,6 +1476,12 @@ stamp-h: $(srcdir)/config.in config.stat
-         CONFIG_LINKS= \
-         $(SHELL) config.status
- 
-+.gdbinit: $(srcdir)/gdbinit.in config.status
-+      CONFIG_FILES=".gdbinit:gdbinit.in" \
-+        CONFIG_COMMANDS= \
-+        CONFIG_HEADERS= \
-+        $(SHELL) config.status
-+
- config.status: $(srcdir)/configure configure.tgt configure.host 
../bfd/development.sh
-       $(SHELL) config.status --recheck
- 
-Index: gdb-7.8/gdb/data-directory/Makefile.in
-===================================================================
---- gdb-7.8.orig/gdb/data-directory/Makefile.in        2014-07-29 
19:29:02.665979655 +0200
-+++ gdb-7.8/gdb/data-directory/Makefile.in     2014-07-29 19:29:33.053022486 
+0200
-@@ -66,6 +66,8 @@ PYTHON_FILE_LIST = \
+Amended for GDB 7.8.1 - Chris Horler
+
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/data-directory/Makefile.in 
gdb-7.8.1/gdb/data-directory/Makefile.in
+--- gdb-7.8.1.orig/gdb/data-directory/Makefile.in      2014-10-29 
19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/data-directory/Makefile.in   2014-12-14 20:15:43.028846584 
+0000
+@@ -65,6 +65,8 @@
+       gdb/prompt.py \
        gdb/xmethod.py \
-       gdb/command/bound_registers.py \
        gdb/command/__init__.py \
 +      gdb/command/ignore_errors.py \
 +      gdb/command/pahole.py \
        gdb/command/xmethods.py \
        gdb/command/frame_filters.py \
        gdb/command/type_printers.py \
-@@ -73,7 +75,10 @@ PYTHON_FILE_LIST = \
-       gdb/command/prompt.py \
+@@ -73,6 +75,8 @@
        gdb/command/explore.py \
        gdb/function/__init__.py \
--      gdb/function/strfns.py
-+      gdb/function/strfns.py \
+       gdb/function/strfns.py \
 +      gdb/function/caller_is.py \
 +      gdb/function/in_scope.py \
-+      gdb/types.py
+       gdb/printer/__init__.py \
+       gdb/printer/bound_registers.py
  
- @HAVE_PYTHON_TRUE@PYTHON_FILES = $(PYTHON_FILE_LIST)
- @HAVE_PYTHON_FALSE@PYTHON_FILES =
-Index: gdb-7.8/gdb/doc/gdb.texinfo
-===================================================================
---- gdb-7.8.orig/gdb/doc/gdb.texinfo   2014-07-29 19:29:02.675979669 +0200
-+++ gdb-7.8/gdb/doc/gdb.texinfo        2014-07-29 19:29:04.871982794 +0200
-@@ -1225,6 +1225,16 @@ for remote debugging.
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/gdb.texinfo 
gdb-7.8.1/gdb/doc/gdb.texinfo
+--- gdb-7.8.1.orig/gdb/doc/gdb.texinfo 2014-10-29 19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/doc/gdb.texinfo      2014-12-14 20:13:31.604314553 +0000
+@@ -1225,6 +1225,16 @@
  Run using @var{device} for your program's standard input and output.
  @c FIXME: kingdon thinks there is more to -tty.  Investigate.
  
@@ -77,11 +50,10 @@
  @c resolve the situation of these eventually
  @item -tui
  @cindex @code{--tui}
-Index: gdb-7.8/gdb/doc/python.texi
-===================================================================
---- gdb-7.8.orig/gdb/doc/python.texi   2014-07-29 19:29:02.677979672 +0200
-+++ gdb-7.8/gdb/doc/python.texi        2014-07-29 19:29:04.872982795 +0200
-@@ -88,8 +88,6 @@ containing @code{end}.  For example:
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/python.texi 
gdb-7.8.1/gdb/doc/python.texi
+--- gdb-7.8.1.orig/gdb/doc/python.texi 2014-10-29 19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/doc/python.texi      2014-12-14 20:13:31.609314573 +0000
+@@ -88,8 +88,6 @@
  
  @smallexample
  (@value{GDBP}) python
@@ -90,10 +62,9 @@
  >print 23
  >end
  23
-Index: gdb-7.8/gdb/gdb-gdb.gdb.in
-===================================================================
---- gdb-7.8.orig/gdb/gdb-gdb.gdb.in    2014-07-29 19:29:02.677979672 +0200
-+++ gdb-7.8/gdb/gdb-gdb.gdb.in 2014-07-29 19:29:04.872982795 +0200
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdb-gdb.gdb.in 
gdb-7.8.1/gdb/gdb-gdb.gdb.in
+--- gdb-7.8.1.orig/gdb/gdb-gdb.gdb.in  2014-06-11 17:34:41.000000000 +0100
++++ gdb-7.8.1/gdb/gdb-gdb.gdb.in       2014-12-14 20:13:31.610314577 +0000
 @@ -1,5 +1,15 @@
  echo Setting up the environment for debugging gdb.\n
  
@@ -110,10 +81,9 @@
  if !$gdb_init_done
    set variable $gdb_init_done = 1
  
-Index: gdb-7.8/gdb/main.c
-===================================================================
---- gdb-7.8.orig/gdb/main.c    2014-07-29 19:29:02.678979673 +0200
-+++ gdb-7.8/gdb/main.c 2014-07-29 19:29:04.872982795 +0200
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
+--- gdb-7.8.1.orig/gdb/main.c  2014-10-29 19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/main.c       2014-12-14 20:13:31.612314585 +0000
 @@ -37,6 +37,7 @@
  
  #include "interps.h"
@@ -122,7 +92,7 @@
  #include "source.h"
  #include "cli/cli-cmds.h"
  #include "objfiles.h"
-@@ -417,6 +418,8 @@ captured_main (void *data)
+@@ -426,6 +427,8 @@
    char *cdarg = NULL;
    char *ttyarg = NULL;
  
@@ -131,7 +101,7 @@
    /* These are static so that we can take their address in an
       initializer.  */
    static int print_help;
-@@ -624,10 +627,14 @@ captured_main (void *data)
+@@ -633,10 +636,14 @@
        {"args", no_argument, &set_args, 1},
        {"l", required_argument, 0, 'l'},
        {"return-child-result", no_argument, &return_child_result, 1},
@@ -147,7 +117,7 @@
        {
        int option_index;
  
-@@ -645,6 +652,9 @@ captured_main (void *data)
+@@ -654,6 +661,9 @@
          case 0:
            /* Long option that just sets a flag.  */
            break;
@@ -157,7 +127,7 @@
          case OPT_SE:
            symarg = optarg;
            execarg = optarg;
-@@ -849,7 +859,31 @@ captured_main (void *data)
+@@ -858,7 +868,31 @@
  
    /* Now that gdb_init has created the initial inferior, we're in
       position to set args for that inferior.  */
@@ -190,7 +160,7 @@
      {
        /* The remaining options are the command-line options for the
         inferior.  The first one is the sym/exec file, and the rest
-@@ -1135,7 +1169,8 @@ captured_main (void *data)
+@@ -1144,7 +1178,8 @@
  
    /* Read in the old history after all the command files have been
       read.  */
@@ -200,7 +170,7 @@
  
    if (batch_flag)
      {
-@@ -1146,13 +1181,25 @@ captured_main (void *data)
+@@ -1155,13 +1190,25 @@
    /* Show time and/or space usage.  */
    do_cleanups (pre_stat_chain);
  
@@ -232,7 +202,7 @@
      }
    /* No exit -- exit is through quit_command.  */
  }
-@@ -1186,6 +1233,12 @@ print_gdb_help (struct ui_file *stream)
+@@ -1195,6 +1242,12 @@
    fputs_unfiltered (_("\
  This is the GNU debugger.  Usage:\n\n\
      gdb [options] [executable-file [core-file or process-id]]\n\
@@ -245,7 +215,7 @@
      gdb [options] --args executable-file [inferior-arguments ...]\n\n\
  "), stream);
    fputs_unfiltered (_("\
-@@ -1231,6 +1284,13 @@ Output and user interface control:\n\n\
+@@ -1240,6 +1293,13 @@
    fputs_unfiltered (_("\
    --dbx              DBX compatibility mode.\n\
    --xdb              XDB compatibility mode.\n\
@@ -259,10 +229,25 @@
    -q, --quiet, --silent\n\
                       Do not print version number on startup.\n\n\
  "), stream);
-Index: gdb-7.8/gdb/python/lib/gdb/command/ignore_errors.py
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8/gdb/python/lib/gdb/command/ignore_errors.py        2014-07-29 
19:29:04.872982795 +0200
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/Makefile.in gdb-7.8.1/gdb/Makefile.in
+--- gdb-7.8.1.orig/gdb/Makefile.in     2014-10-29 19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/Makefile.in  2014-12-14 20:13:31.583314468 +0000
+@@ -1476,6 +1476,12 @@
+         CONFIG_LINKS= \
+         $(SHELL) config.status
+ 
++.gdbinit: $(srcdir)/gdbinit.in config.status
++      CONFIG_FILES=".gdbinit:gdbinit.in" \
++        CONFIG_COMMANDS= \
++        CONFIG_HEADERS= \
++        $(SHELL) config.status
++
+ config.status: $(srcdir)/configure configure.tgt configure.host 
../bfd/development.sh
+       $(SHELL) config.status --recheck
+ 
+diff -Nur -x '*.orig' 
gdb-7.8.1.orig/gdb/python/lib/gdb/command/ignore_errors.py 
gdb-7.8.1/gdb/python/lib/gdb/command/ignore_errors.py
+--- gdb-7.8.1.orig/gdb/python/lib/gdb/command/ignore_errors.py 1970-01-01 
01:00:00.000000000 +0100
++++ gdb-7.8.1/gdb/python/lib/gdb/command/ignore_errors.py      2014-12-14 
20:13:31.613314589 +0000
 @@ -0,0 +1,37 @@
 +# Ignore errors in user commands.
 +
@@ -301,10 +286,9 @@
 +            pass
 +
 +IgnoreErrorsCommand ()
-Index: gdb-7.8/gdb/python/lib/gdb/command/pahole.py
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8/gdb/python/lib/gdb/command/pahole.py       2014-07-29 
19:29:04.873982797 +0200
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py 
gdb-7.8.1/gdb/python/lib/gdb/command/pahole.py
+--- gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py        1970-01-01 
01:00:00.000000000 +0100
++++ gdb-7.8.1/gdb/python/lib/gdb/command/pahole.py     2014-12-14 
20:13:31.613314589 +0000
 @@ -0,0 +1,81 @@
 +# pahole command for gdb
 +
@@ -387,10 +371,9 @@
 +        self.pahole (type, 0, '')
 +
 +Pahole()
-Index: gdb-7.8/gdb/python/lib/gdb/function/caller_is.py
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8/gdb/python/lib/gdb/function/caller_is.py   2014-07-29 
19:29:04.873982797 +0200
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/function/caller_is.py 
gdb-7.8.1/gdb/python/lib/gdb/function/caller_is.py
+--- gdb-7.8.1.orig/gdb/python/lib/gdb/function/caller_is.py    1970-01-01 
01:00:00.000000000 +0100
++++ gdb-7.8.1/gdb/python/lib/gdb/function/caller_is.py 2014-12-14 
20:13:31.614314594 +0000
 @@ -0,0 +1,58 @@
 +# Caller-is functions.
 +
@@ -450,10 +433,9 @@
 +
 +CallerIs()
 +CallerMatches()
-Index: gdb-7.8/gdb/python/lib/gdb/function/in_scope.py
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.8/gdb/python/lib/gdb/function/in_scope.py    2014-07-29 
19:29:04.873982797 +0200
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/function/in_scope.py 
gdb-7.8.1/gdb/python/lib/gdb/function/in_scope.py
+--- gdb-7.8.1.orig/gdb/python/lib/gdb/function/in_scope.py     1970-01-01 
01:00:00.000000000 +0100
++++ gdb-7.8.1/gdb/python/lib/gdb/function/in_scope.py  2014-12-14 
20:13:31.614314594 +0000
 @@ -0,0 +1,47 @@
 +# In-scope function.
 +
@@ -502,11 +484,10 @@
 +      return wanted == found
 +
 +InScope ()
-Index: gdb-7.8/gdb/python/python.c
-===================================================================
---- gdb-7.8.orig/gdb/python/python.c   2014-07-29 19:29:02.679979674 +0200
-+++ gdb-7.8/gdb/python/python.c        2014-07-29 19:29:04.873982797 +0200
-@@ -95,6 +95,8 @@ const struct extension_language_defn ext
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c 
gdb-7.8.1/gdb/python/python.c
+--- gdb-7.8.1.orig/gdb/python/python.c 2014-10-29 19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/python/python.c      2014-12-14 20:13:31.615314598 +0000
+@@ -95,6 +95,8 @@
  #include "linespec.h"
  #include "source.h"
  #include "version.h"
@@ -515,7 +496,7 @@
  #include "target.h"
  #include "gdbthread.h"
  #include "interps.h"
-@@ -1222,6 +1224,56 @@ gdbpy_print_stack (void)
+@@ -1222,6 +1224,56 @@
  
  /* Return the current Progspace.
     There always is one.  */
@@ -572,7 +553,7 @@
  
  static PyObject *
  gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
-@@ -1910,6 +1962,8 @@ static PyMethodDef GdbMethods[] =
+@@ -1910,6 +1962,8 @@
  Evaluate command, a string, as a gdb CLI command.  Optionally returns\n\
  a Python String containing the output of the command if to_string is\n\
  set to True." },
@@ -581,10 +562,9 @@
    { "parameter", gdbpy_parameter, METH_VARARGS,
      "Return a gdb parameter's value" },
  
-Index: gdb-7.8/gdb/python/python.h
-===================================================================
---- gdb-7.8.orig/gdb/python/python.h   2014-07-29 19:29:02.679979674 +0200
-+++ gdb-7.8/gdb/python/python.h        2014-07-29 19:29:04.873982797 +0200
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.h 
gdb-7.8.1/gdb/python/python.h
+--- gdb-7.8.1.orig/gdb/python/python.h 2014-06-11 17:34:41.000000000 +0100
++++ gdb-7.8.1/gdb/python/python.h      2014-12-14 20:13:31.616314602 +0000
 @@ -25,4 +25,6 @@
  /* This is all that python exports to gdb.  */
  extern const struct extension_language_defn extension_language_python;
@@ -592,11 +572,10 @@
 +extern void run_python_script (int argc, char **argv);
 +
  #endif /* GDB_PYTHON_H */
-Index: gdb-7.8/gdb/testsuite/gdb.gdb/selftest.exp
-===================================================================
---- gdb-7.8.orig/gdb/testsuite/gdb.gdb/selftest.exp    2014-07-29 
19:29:02.679979674 +0200
-+++ gdb-7.8/gdb/testsuite/gdb.gdb/selftest.exp 2014-07-29 19:29:04.874982798 
+0200
-@@ -92,6 +92,10 @@ proc do_steps_and_nexts {} {
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.gdb/selftest.exp 
gdb-7.8.1/gdb/testsuite/gdb.gdb/selftest.exp
+--- gdb-7.8.1.orig/gdb/testsuite/gdb.gdb/selftest.exp  2014-12-14 
20:10:20.896545646 +0000
++++ gdb-7.8.1/gdb/testsuite/gdb.gdb/selftest.exp       2014-12-14 
20:13:31.616314602 +0000
+@@ -92,6 +92,10 @@
                set description "step over cmdarg_vec initialization"
                set command "step"
            }
@@ -607,21 +586,19 @@
            -re ".*pre_stat_chain = make_command_stats_cleanup.*$gdb_prompt $" {
                set description "next over make_command_stats_cleanup and 
everything it calls"
                set command "next"
-Index: gdb-7.8/gdb/testsuite/gdb.python/py-frame.exp
-===================================================================
---- gdb-7.8.orig/gdb/testsuite/gdb.python/py-frame.exp 2014-07-29 
19:29:02.680979676 +0200
-+++ gdb-7.8/gdb/testsuite/gdb.python/py-frame.exp      2014-07-29 
19:29:04.874982798 +0200
-@@ -94,3 +94,5 @@ gdb_test "python print ('result = %s' %
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-frame.exp 
gdb-7.8.1/gdb/testsuite/gdb.python/py-frame.exp
+--- gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-frame.exp       2014-10-29 
19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/testsuite/gdb.python/py-frame.exp    2014-12-14 
20:13:31.617314606 +0000
+@@ -94,3 +94,5 @@
  gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test 
Frame.read_var - success"
  
  gdb_test "python print ('result = %s' % (gdb.selected_frame () == f1))" " = 
True" "test gdb.selected_frame"
 +
 +gdb_test "python print ('result = %s' % (f0.block ()))" "<gdb.Block object at 
0x\[\[:xdigit:\]\]+>" "test Frame.block"
-Index: gdb-7.8/gdb/testsuite/gdb.python/py-value.exp
-===================================================================
---- gdb-7.8.orig/gdb/testsuite/gdb.python/py-value.exp 2014-07-29 
19:29:02.680979676 +0200
-+++ gdb-7.8/gdb/testsuite/gdb.python/py-value.exp      2014-07-29 
19:29:04.874982798 +0200
-@@ -385,6 +385,15 @@ proc test_value_after_death {} {
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp 
gdb-7.8.1/gdb/testsuite/gdb.python/py-value.exp
+--- gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp       2014-10-29 
19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/testsuite/gdb.python/py-value.exp    2014-12-14 
20:13:31.618314610 +0000
+@@ -385,6 +385,15 @@
      "print value's type"
  }
  
@@ -637,7 +614,7 @@
  # Regression test for invalid subscript operations.  The bug was that
  # the type of the value was not being checked before allowing a
  # subscript operation to proceed.
-@@ -514,6 +523,7 @@ test_value_in_inferior
+@@ -514,6 +523,7 @@
  test_inferior_function_call
  test_lazy_strings
  test_value_after_death
@@ -645,3 +622,9 @@
  
  # Test either C or C++ values. 
  
+diff -Nur -x '*.orig' gdb-7.8.1.orig/README.archer gdb-7.8.1/README.archer
+--- gdb-7.8.1.orig/README.archer       1970-01-01 01:00:00.000000000 +0100
++++ gdb-7.8.1/README.archer    2014-12-14 20:13:31.581314460 +0000
+@@ -0,0 +1,2 @@
++This branch originally held the Python code for gdb.  It still exists
++because a small amount of code here has not yet been merged upstream.

++++++ gdb-async-stopped-on-pid-arg-1of2.patch ++++++
--- /var/tmp/diff_new_pack.6xr3al/_old  2014-12-25 23:20:44.000000000 +0100
+++ /var/tmp/diff_new_pack.6xr3al/_new  2014-12-25 23:20:44.000000000 +0100
@@ -80,47 +80,13 @@
  gdb/top.h                         |   8 +++
  4 files changed, 114 insertions(+), 47 deletions(-)
 
-Index: gdb-7.8/gdb/main.c
-===================================================================
---- gdb-7.8.orig/gdb/main.c    2014-09-07 19:12:45.066981588 +0200
-+++ gdb-7.8/gdb/main.c 2014-09-07 19:14:22.613095201 +0200
-@@ -47,6 +47,7 @@
- #include "filenames.h"
- #include "filestuff.h"
- #include "event-top.h"
-+#include "infrun.h"
- 
- /* The selected interpreter.  This will be used as a set command
-    variable, so it should always be malloc'ed - since
-@@ -350,7 +351,11 @@ catch_command_errors (catch_command_erro
- 
-   TRY_CATCH (e, mask)
-     {
-+      int was_sync = sync_execution;
-+
-       command (arg, from_tty);
-+
-+      maybe_wait_sync_command_done (was_sync);
-     }
-   return handle_command_errors (e);
- }
-@@ -369,7 +374,11 @@ catch_command_errors_const (catch_comman
- 
-   TRY_CATCH (e, mask)
-     {
-+      int was_sync = sync_execution;
-+
-       command (arg, from_tty);
-+
-+      maybe_wait_sync_command_done (was_sync);
-     }
-   return handle_command_errors (e);
- }
-Index: gdb-7.8/gdb/testsuite/gdb.base/attach.exp
-===================================================================
---- gdb-7.8.orig/gdb/testsuite/gdb.base/attach.exp     2014-09-07 
19:12:45.067981589 +0200
-+++ gdb-7.8/gdb/testsuite/gdb.base/attach.exp  2014-09-07 19:12:48.601985706 
+0200
-@@ -58,6 +58,37 @@ if [get_compiler_info] {
+
+Amended for GDB 7.8.1 - Chris Horler
+
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp 
gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp
+--- gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp   2014-10-29 
19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp        2014-12-14 
20:58:52.761567480 +0000
+@@ -58,6 +58,37 @@
      return -1
  }
  
@@ -158,193 +124,4 @@
  proc do_attach_tests {} {
      global gdb_prompt
      global binfile
-@@ -70,13 +101,7 @@ proc do_attach_tests {} {
-     # 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; }" ]
--    }
-+    set testpid [spawn_test_prog $binfile]
- 
-     # Verify that we cannot attach to nonsense.
- 
-@@ -279,16 +304,7 @@ proc do_attach_tests {} {
-    
-     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; }" ]
--    }
-+    set testpid [spawn_test_prog $binfile]
- 
-     # 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
-@@ -335,16 +351,7 @@ proc do_call_attach_tests {} {
-     global gdb_prompt
-     global binfile2
-     
--    # Start the program running and then wait for a bit, to be sure
--    # that it can be attached to.
--   
--    set testpid [eval exec $binfile2 &]
--    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; }" ]
--    }
-+    set testpid [spawn_test_prog $binfile2]
- 
-     # Attach
-    
-@@ -397,16 +404,7 @@ proc do_command_attach_tests {} {
-       return 0
-     }
- 
--    # 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; }" ]
--    }
-+    set testpid [spawn_test_prog $binfile]
- 
-     gdb_exit
-     if $verbose>1 then {
-@@ -429,6 +427,50 @@ proc do_command_attach_tests {} {
-     remote_exec build "kill -9 ${testpid}"
- }
- 
-+# Test ' gdb --pid PID -ex "run" '.  GDB used to have a bug where
-+# "run" would run before the attach finished - PR17347.
-+
-+proc test_command_line_attach_run {} {
-+    global gdb_prompt
-+    global binfile
-+    global verbose
-+    global GDB
-+    global INTERNAL_GDBFLAGS
-+
-+    if ![isnative] then {
-+      unsupported "commandline attach run test"
-+      return 0
-+    }
-+
-+    with_test_prefix "cmdline attach run" {
-+      set testpid [spawn_test_prog $binfile]
-+
-+      set test "run to prompt"
-+      gdb_exit
-+      set res [gdb_spawn_with_cmdline_opts "--pid=$testpid -ex \"start\""]
-+      if { $res != 0} {
-+          fail $test
-+          return $res
-+      }
-+      gdb_test_multiple "" $test {
-+          -re {Attaching to.*Start it from the beginning\? \(y or n\) } {
-+              pass $test
-+          }
-+      }
-+
-+      send_gdb "y\n"
-+
-+      set test "run to main"
-+      gdb_test_multiple "" $test {
-+          -re "Temporary breakpoint .* main .*$gdb_prompt $" {
-+              pass $test
-+          }
-+      }
-+
-+      # Get rid of the process
-+      remote_exec build "kill -9 ${testpid}"
-+    }
-+}
- 
- # Start with a fresh gdb
- 
-@@ -453,4 +495,6 @@ do_call_attach_tests
- 
- do_command_attach_tests
- 
-+test_command_line_attach_run
-+
- return 0
-Index: gdb-7.8/gdb/top.c
-===================================================================
---- gdb-7.8.orig/gdb/top.c     2014-09-07 19:12:45.067981589 +0200
-+++ gdb-7.8/gdb/top.c  2014-09-07 19:12:48.601985706 +0200
-@@ -375,6 +375,21 @@ check_frame_language_change (void)
-     }
- }
- 
-+void
-+maybe_wait_sync_command_done (int was_sync)
-+{
-+  /* If the interpreter is in sync mode (we're running a user
-+     command's list, running command hooks or similars), and we
-+     just ran a synchronous command that started the target, wait
-+     for that command to end.  */
-+  if (!interpreter_async && !was_sync && sync_execution)
-+    {
-+      while (gdb_do_one_event () >= 0)
-+      if (!sync_execution)
-+        break;
-+    }
-+}
-+
- /* Execute the line P as a command, in the current user context.
-    Pass FROM_TTY as second argument to the defining function.  */
- 
-@@ -461,16 +476,7 @@ execute_command (char *p, int from_tty)
-       else
-       cmd_func (c, arg, from_tty);
- 
--      /* If the interpreter is in sync mode (we're running a user
--       command's list, running command hooks or similars), and we
--       just ran a synchronous command that started the target, wait
--       for that command to end.  */
--      if (!interpreter_async && !was_sync && sync_execution)
--      {
--        while (gdb_do_one_event () >= 0)
--          if (!sync_execution)
--            break;
--      }
-+      maybe_wait_sync_command_done (was_sync);
- 
-       /* If this command has been post-hooked, run the hook last.  */
-       execute_cmd_post_hook (c);
-Index: gdb-7.8/gdb/top.h
-===================================================================
---- gdb-7.8.orig/gdb/top.h     2014-09-07 19:12:45.068981590 +0200
-+++ gdb-7.8/gdb/top.h  2014-09-07 19:12:48.601985706 +0200
-@@ -42,6 +42,14 @@ extern void quit_command (char *, int);
- extern void quit_cover (void);
- extern void execute_command (char *, int);
- 
-+/* If the interpreter is in sync mode (we're running a user command's
-+   list, running command hooks or similars), and we just ran a
-+   synchronous command that started the target, wait for that command
-+   to end.  WAS_SYNC indicates whether sync_execution was set before
-+   the command was run.  */
-+
-+extern void maybe_wait_sync_command_done (int was_sync);
-+
- extern void check_frame_language_change (void);
- 
- /* Prepare for execution of a command.
+

++++++ gdb-async-stopped-on-pid-arg-testsuite.patch ++++++
--- /var/tmp/diff_new_pack.6xr3al/_old  2014-12-25 23:20:44.000000000 +0100
+++ /var/tmp/diff_new_pack.6xr3al/_new  2014-12-25 23:20:44.000000000 +0100
@@ -33,10 +33,12 @@
        gdb_breakpoint, gdb_continue_to_breakpoint.
        (test_command_line_attach_run): Kill ${testpid} in one exit path.
 
-diff --git a/gdb/testsuite/gdb.base/attach.c b/gdb/testsuite/gdb.base/attach.c
-index 0041b47..91b180c 100644
---- a/gdb/testsuite/gdb.base/attach.c
-+++ b/gdb/testsuite/gdb.base/attach.c
+
+Amended for GDB 7.8.1 - Chris Horler
+
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.c 
gdb-7.8.1/gdb/testsuite/gdb.base/attach.c
+--- gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.c     2014-10-29 
19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/testsuite/gdb.base/attach.c  2014-12-14 21:19:46.689476557 
+0000
 @@ -5,6 +5,7 @@
     exit unless/until gdb sets the variable to non-zero.)
     */
@@ -45,7 +47,7 @@
  
  int  should_exit = 0;
  
-@@ -12,9 +13,11 @@ int main ()
+@@ -12,9 +13,11 @@
  {
    int  local_i = 0;
  
@@ -58,11 +60,10 @@
 -  return 0;
 +  return 0; /* postloop */
  }
-diff --git a/gdb/testsuite/gdb.base/attach.exp 
b/gdb/testsuite/gdb.base/attach.exp
-index 6340496..5fb5c53 100644
---- a/gdb/testsuite/gdb.base/attach.exp
-+++ b/gdb/testsuite/gdb.base/attach.exp
-@@ -256,11 +256,8 @@ proc do_attach_tests {} {
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp 
gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp
+--- gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp   2014-12-14 
21:20:42.810658051 +0000
++++ gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp        2014-12-14 
21:22:53.479082555 +0000
+@@ -287,11 +287,8 @@
  
      # Verify that the modification really happened.
  
@@ -76,13 +77,11 @@
  
      # Allow the test process to exit, to cleanup after ourselves.
  
-@@ -451,6 +448,7 @@ proc test_command_line_attach_run {} {
-                "-iex set\\ height\\ 0 -iex set\\ width\\ 0 --pid=$testpid -ex 
\"start\""]
+@@ -449,6 +446,7 @@
+                    "-iex \"set height 0\" -iex \"set width 0\" --pid=$testpid 
-ex \"start\""]
        if { $res != 0} {
            fail $test
 +          remote_exec build "kill -9 ${testpid}"
            return $res
        }
        gdb_test_multiple "" $test {
-
---RnlQjJ0d97Da+TV1--

++++++ gdb-attach-fail-reasons-5of5.patch ++++++
--- /var/tmp/diff_new_pack.6xr3al/_old  2014-12-25 23:20:44.000000000 +0100
+++ /var/tmp/diff_new_pack.6xr3al/_new  2014-12-25 23:20:44.000000000 +0100
@@ -37,10 +37,12 @@
        (linux_create_inferior, linux_tracefork_child): Call it instead of
        direct ptrace.
 
-Index: gdb-7.8/gdb/common/linux-ptrace.c
-===================================================================
---- gdb-7.8.orig/gdb/common/linux-ptrace.c     2014-07-29 19:31:01.893149317 
+0200
-+++ gdb-7.8/gdb/common/linux-ptrace.c  2014-07-29 19:31:05.806154887 +0200
+
+Amended for GDB 7.8.1 - Chris Horler
+
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.c 
gdb-7.8.1/gdb/common/linux-ptrace.c
+--- gdb-7.8.1.orig/gdb/common/linux-ptrace.c   2014-10-29 19:45:50.000000000 
+0000
++++ gdb-7.8.1/gdb/common/linux-ptrace.c        2014-12-14 20:47:29.326550209 
+0000
 @@ -32,6 +32,10 @@
  
  #include <stdint.h>
@@ -52,7 +54,7 @@
  /* Stores the currently supported ptrace options.  A value of
     -1 means we did not check for features yet.  A value of 0 means
     there are no supported features.  */
-@@ -56,6 +60,8 @@ linux_ptrace_attach_fail_reason (pid_t p
+@@ -56,6 +60,8 @@
      buffer_xml_printf (buffer, _("process %d is a zombie "
                                 "- the process has already terminated"),
                       (int) pid);
@@ -61,7 +63,7 @@
  }
  
  #if defined __i386__ || defined __x86_64__
-@@ -551,3 +557,19 @@ linux_ptrace_init_warnings (void)
+@@ -551,3 +557,19 @@
  
    linux_ptrace_test_ret_to_nx ();
  }
@@ -81,11 +83,10 @@
 +                       "(gdb) shell sudo setsebool deny_ptrace=0"));
 +#endif /* HAVE_LIBSELINUX */
 +}
-Index: gdb-7.8/gdb/common/linux-ptrace.h
-===================================================================
---- gdb-7.8.orig/gdb/common/linux-ptrace.h     2014-07-29 19:31:01.893149317 
+0200
-+++ gdb-7.8/gdb/common/linux-ptrace.h  2014-07-29 19:31:05.807154887 +0200
-@@ -85,6 +85,7 @@ struct buffer;
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.h 
gdb-7.8.1/gdb/common/linux-ptrace.h
+--- gdb-7.8.1.orig/gdb/common/linux-ptrace.h   2014-10-29 19:45:50.000000000 
+0000
++++ gdb-7.8.1/gdb/common/linux-ptrace.h        2014-12-14 20:47:29.330550222 
+0000
+@@ -85,6 +85,7 @@
  
  extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer 
*buffer);
  extern void linux_ptrace_init_warnings (void);
@@ -93,153 +94,10 @@
  extern void linux_enable_event_reporting (pid_t pid);
  extern void linux_disable_event_reporting (pid_t pid);
  extern int linux_supports_tracefork (void);
-Index: gdb-7.8/gdb/configure.ac
-===================================================================
---- gdb-7.8.orig/gdb/configure.ac      2014-07-29 19:31:01.894149319 +0200
-+++ gdb-7.8/gdb/configure.ac   2014-07-29 19:31:05.807154887 +0200
-@@ -2158,6 +2158,10 @@ case $host_os in
- esac
- AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
- 
-+dnl Check security_get_boolean_active availability.
-+AC_CHECK_HEADERS(selinux/selinux.h)
-+AC_CHECK_LIB(selinux, security_get_boolean_active)
-+
- dnl Handle optional features that can be enabled.
- 
- # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
-Index: gdb-7.8/gdb/gdbserver/configure.ac
-===================================================================
---- gdb-7.8.orig/gdb/gdbserver/configure.ac    2014-07-29 19:31:01.895149320 
+0200
-+++ gdb-7.8/gdb/gdbserver/configure.ac 2014-07-29 19:31:05.808154887 +0200
-@@ -454,6 +454,10 @@ if $want_ipa ; then
-    fi
- fi
- 
-+dnl Check security_get_boolean_active availability.
-+AC_CHECK_HEADERS(selinux/selinux.h)
-+AC_CHECK_LIB(selinux, security_get_boolean_active)
-+
- AC_SUBST(GDBSERVER_DEPFILES)
- AC_SUBST(GDBSERVER_LIBS)
- AC_SUBST(srv_xmlbuiltin)
-Index: gdb-7.8/gdb/gdbserver/linux-low.c
-===================================================================
---- gdb-7.8.orig/gdb/gdbserver/linux-low.c     2014-07-29 19:31:01.897149323 
+0200
-+++ gdb-7.8/gdb/gdbserver/linux-low.c  2014-07-29 19:31:05.809154889 +0200
-@@ -541,6 +541,29 @@ add_lwp (ptid_t ptid)
-   return lwp;
- }
- 
-+/* Execute PTRACE_TRACEME with error checking.  */
-+
-+static void
-+linux_traceme (const char *program)
-+{
-+  int save_errno;
-+  struct buffer buffer;
-+
-+  errno = 0;
-+  if (ptrace (PTRACE_TRACEME, 0,
-+            (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) == 0)
-+    return;
-+
-+  save_errno = errno;
-+  buffer_init (&buffer);
-+  linux_ptrace_create_warnings (&buffer);
-+  buffer_grow_str0 (&buffer, "");
-+  fprintf (stderr, _("%sCannot trace created process %s: %s.\n"),
-+         buffer_finish (&buffer), program, strerror (save_errno));
-+  fflush (stderr);
-+  _exit (0177);
-+}
-+
- /* Start an inferior process and returns its pid.
-    ALLARGS is a vector of program-name and args. */
- 
-@@ -582,7 +605,7 @@ linux_create_inferior (char *program, ch
-   if (pid == 0)
-     {
-       close_most_fds ();
--      ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
-+      linux_traceme (program);
- 
- #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does.  */
-       signal (__SIGRTMIN + 1, SIG_DFL);
-Index: gdb-7.8/gdb/inf-ptrace.c
-===================================================================
---- gdb-7.8.orig/gdb/inf-ptrace.c      2014-07-29 19:31:01.898149324 +0200
-+++ gdb-7.8/gdb/inf-ptrace.c   2014-07-29 19:31:05.809154889 +0200
-@@ -105,7 +105,15 @@ static void
- inf_ptrace_me (void)
- {
-   /* "Trace me, Dr. Memory!"  */
-+  errno = 0;
-   ptrace (PT_TRACE_ME, 0, (PTRACE_TYPE_ARG3)0, 0);
-+  if (errno != 0)
-+    {
-+      fprintf_unfiltered (gdb_stderr, _("Cannot create process: %s\n"),
-+                        safe_strerror (errno));
-+      gdb_flush (gdb_stderr);
-+      _exit (0177);
-+    }
- }
- 
- /* Start a new inferior Unix child process.  EXEC_FILE is the file to
-Index: gdb-7.8/gdb/linux-nat.c
-===================================================================
---- gdb-7.8.orig/gdb/linux-nat.c       2014-07-29 19:31:01.899149326 +0200
-+++ gdb-7.8/gdb/linux-nat.c    2014-07-29 19:31:05.811154893 +0200
-@@ -1291,6 +1291,7 @@ linux_nat_create_inferior (struct target
- #ifdef HAVE_PERSONALITY
-   int personality_orig = 0, personality_set = 0;
- #endif /* HAVE_PERSONALITY */
-+  volatile struct gdb_exception ex;
- 
-   /* The fork_child mechanism is synchronous and calls target_wait, so
-      we have to mask the async mode.  */
-@@ -1315,7 +1316,10 @@ linux_nat_create_inferior (struct target
-   /* Make sure we report all signals during startup.  */
-   linux_nat_pass_signals (ops, 0, NULL);
- 
--  linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
-+  TRY_CATCH (ex, RETURN_MASK_ERROR)
-+    {
-+      linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
-+    }
- 
- #ifdef HAVE_PERSONALITY
-   if (personality_set)
-@@ -1327,6 +1331,24 @@ linux_nat_create_inferior (struct target
-                safe_strerror (errno));
-     }
- #endif /* HAVE_PERSONALITY */
-+
-+  if (ex.reason < 0)
-+    {
-+      struct buffer buffer;
-+      char *message, *buffer_s;
-+
-+      message = xstrdup (ex.message);
-+      make_cleanup (xfree, message);
-+
-+      buffer_init (&buffer);
-+      linux_ptrace_create_warnings (&buffer);
-+
-+      buffer_grow_str0 (&buffer, "");
-+      buffer_s = buffer_finish (&buffer);
-+      make_cleanup (xfree, buffer_s);
-+
-+      throw_error (ex.error, "%s%s", buffer_s, message);
-+    }
- }
- 
- static void
-Index: gdb-7.8/gdb/config.in
-===================================================================
---- gdb-7.8.orig/gdb/config.in 2014-07-29 19:31:01.900149327 +0200
-+++ gdb-7.8/gdb/config.in      2014-07-29 19:31:44.600210090 +0200
-@@ -219,6 +219,9 @@
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/config.in gdb-7.8.1/gdb/config.in
+--- gdb-7.8.1.orig/gdb/config.in       2014-12-14 20:44:21.913980816 +0000
++++ gdb-7.8.1/gdb/config.in    2014-12-14 20:49:09.158856507 +0000
+@@ -216,6 +216,9 @@
  /* Define if librpm library is being used. */
  #undef HAVE_LIBRPM
  
@@ -249,21 +107,20 @@
  /* Define to 1 if you have the <libunwind-ia64.h> header file. */
  #undef HAVE_LIBUNWIND_IA64_H
  
-@@ -354,6 +357,9 @@
+@@ -351,6 +354,9 @@
  /* Define to 1 if you have the `scm_new_smob' function. */
  #undef HAVE_SCM_NEW_SMOB
  
 +/* Define to 1 if you have the <selinux/selinux.h> header file. */
 +#undef HAVE_SELINUX_SELINUX_H
 +
- /* Define to 1 if you have the `setenv' function. */
- #undef HAVE_SETENV
+ /* Define to 1 if you have the `setlocale' function. */
+ #undef HAVE_SETLOCALE
  
-Index: gdb-7.8/gdb/configure
-===================================================================
---- gdb-7.8.orig/gdb/configure 2014-07-29 19:31:01.903149331 +0200
-+++ gdb-7.8/gdb/configure      2014-07-29 19:31:05.815154898 +0200
-@@ -13392,6 +13392,64 @@ cat >>confdefs.h <<_ACEOF
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/configure gdb-7.8.1/gdb/configure
+--- gdb-7.8.1.orig/gdb/configure       2014-12-14 20:44:21.925980853 +0000
++++ gdb-7.8.1/gdb/configure    2014-12-14 20:47:29.364550326 +0000
+@@ -13400,6 +13400,64 @@
  _ACEOF
  
  
@@ -328,10 +185,23 @@
  
  # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
  # except that the argument to --with-sysroot is optional.
-Index: gdb-7.8/gdb/gdbserver/config.in
-===================================================================
---- gdb-7.8.orig/gdb/gdbserver/config.in       2014-07-29 19:31:01.904149333 
+0200
-+++ gdb-7.8/gdb/gdbserver/config.in    2014-07-29 19:31:05.815154898 +0200
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/configure.ac 
gdb-7.8.1/gdb/configure.ac
+--- gdb-7.8.1.orig/gdb/configure.ac    2014-12-14 20:44:21.933980877 +0000
++++ gdb-7.8.1/gdb/configure.ac 2014-12-14 20:47:29.334550234 +0000
+@@ -2161,6 +2161,10 @@
+ esac
+ AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
+ 
++dnl Check security_get_boolean_active availability.
++AC_CHECK_HEADERS(selinux/selinux.h)
++AC_CHECK_LIB(selinux, security_get_boolean_active)
++
+ dnl Handle optional features that can be enabled.
+ 
+ # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/config.in 
gdb-7.8.1/gdb/gdbserver/config.in
+--- gdb-7.8.1.orig/gdb/gdbserver/config.in     2014-10-29 19:45:50.000000000 
+0000
++++ gdb-7.8.1/gdb/gdbserver/config.in  2014-12-14 20:47:29.366550332 +0000
 @@ -81,6 +81,9 @@
  /* Define to 1 if you have the `mcheck' library (-lmcheck). */
  #undef HAVE_LIBMCHECK
@@ -352,11 +222,10 @@
  /* Define to 1 if you have the <sgtty.h> header file. */
  #undef HAVE_SGTTY_H
  
-Index: gdb-7.8/gdb/gdbserver/configure
-===================================================================
---- gdb-7.8.orig/gdb/gdbserver/configure       2014-07-29 19:31:01.905149334 
+0200
-+++ gdb-7.8/gdb/gdbserver/configure    2014-07-29 19:31:05.817154901 +0200
-@@ -6170,6 +6170,64 @@ if $want_ipa ; then
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/configure 
gdb-7.8.1/gdb/gdbserver/configure
+--- gdb-7.8.1.orig/gdb/gdbserver/configure     2014-10-29 19:45:50.000000000 
+0000
++++ gdb-7.8.1/gdb/gdbserver/configure  2014-12-14 20:47:29.370550344 +0000
+@@ -6170,6 +6170,64 @@
     fi
  fi
  
@@ -421,3 +290,126 @@
  
  
  
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/configure.ac 
gdb-7.8.1/gdb/gdbserver/configure.ac
+--- gdb-7.8.1.orig/gdb/gdbserver/configure.ac  2014-10-29 19:45:50.000000000 
+0000
++++ gdb-7.8.1/gdb/gdbserver/configure.ac       2014-12-14 20:47:29.337550243 
+0000
+@@ -454,6 +454,10 @@
+    fi
+ fi
+ 
++dnl Check security_get_boolean_active availability.
++AC_CHECK_HEADERS(selinux/selinux.h)
++AC_CHECK_LIB(selinux, security_get_boolean_active)
++
+ AC_SUBST(GDBSERVER_DEPFILES)
+ AC_SUBST(GDBSERVER_LIBS)
+ AC_SUBST(srv_xmlbuiltin)
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/linux-low.c 
gdb-7.8.1/gdb/gdbserver/linux-low.c
+--- gdb-7.8.1.orig/gdb/gdbserver/linux-low.c   2014-10-29 19:45:50.000000000 
+0000
++++ gdb-7.8.1/gdb/gdbserver/linux-low.c        2014-12-14 20:47:29.341550255 
+0000
+@@ -541,6 +541,29 @@
+   return lwp;
+ }
+ 
++/* Execute PTRACE_TRACEME with error checking.  */
++
++static void
++linux_traceme (const char *program)
++{
++  int save_errno;
++  struct buffer buffer;
++
++  errno = 0;
++  if (ptrace (PTRACE_TRACEME, 0,
++            (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) == 0)
++    return;
++
++  save_errno = errno;
++  buffer_init (&buffer);
++  linux_ptrace_create_warnings (&buffer);
++  buffer_grow_str0 (&buffer, "");
++  fprintf (stderr, _("%sCannot trace created process %s: %s.\n"),
++         buffer_finish (&buffer), program, strerror (save_errno));
++  fflush (stderr);
++  _exit (0177);
++}
++
+ /* Start an inferior process and returns its pid.
+    ALLARGS is a vector of program-name and args. */
+ 
+@@ -582,7 +605,7 @@
+   if (pid == 0)
+     {
+       close_most_fds ();
+-      ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
++      linux_traceme (program);
+ 
+ #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does.  */
+       signal (__SIGRTMIN + 1, SIG_DFL);
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/inf-ptrace.c 
gdb-7.8.1/gdb/inf-ptrace.c
+--- gdb-7.8.1.orig/gdb/inf-ptrace.c    2014-10-29 19:45:50.000000000 +0000
++++ gdb-7.8.1/gdb/inf-ptrace.c 2014-12-14 20:47:29.345550267 +0000
+@@ -105,7 +105,15 @@
+ inf_ptrace_me (void)
+ {
+   /* "Trace me, Dr. Memory!"  */
++  errno = 0;
+   ptrace (PT_TRACE_ME, 0, (PTRACE_TYPE_ARG3)0, 0);
++  if (errno != 0)
++    {
++      fprintf_unfiltered (gdb_stderr, _("Cannot create process: %s\n"),
++                        safe_strerror (errno));
++      gdb_flush (gdb_stderr);
++      _exit (0177);
++    }
+ }
+ 
+ /* Start a new inferior Unix child process.  EXEC_FILE is the file to
+diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/linux-nat.c gdb-7.8.1/gdb/linux-nat.c
+--- gdb-7.8.1.orig/gdb/linux-nat.c     2014-12-14 20:44:21.800980475 +0000
++++ gdb-7.8.1/gdb/linux-nat.c  2014-12-14 20:47:29.348550277 +0000
+@@ -1291,6 +1291,7 @@
+ #ifdef HAVE_PERSONALITY
+   int personality_orig = 0, personality_set = 0;
+ #endif /* HAVE_PERSONALITY */
++  volatile struct gdb_exception ex;
+ 
+   /* The fork_child mechanism is synchronous and calls target_wait, so
+      we have to mask the async mode.  */
+@@ -1315,7 +1316,10 @@
+   /* Make sure we report all signals during startup.  */
+   linux_nat_pass_signals (ops, 0, NULL);
+ 
+-  linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
++  TRY_CATCH (ex, RETURN_MASK_ERROR)
++    {
++      linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
++    }
+ 
+ #ifdef HAVE_PERSONALITY
+   if (personality_set)
+@@ -1327,6 +1331,24 @@
+                safe_strerror (errno));
+     }
+ #endif /* HAVE_PERSONALITY */
++
++  if (ex.reason < 0)
++    {
++      struct buffer buffer;
++      char *message, *buffer_s;
++
++      message = xstrdup (ex.message);
++      make_cleanup (xfree, message);
++
++      buffer_init (&buffer);
++      linux_ptrace_create_warnings (&buffer);
++
++      buffer_grow_str0 (&buffer, "");
++      buffer_s = buffer_finish (&buffer);
++      make_cleanup (xfree, buffer_s);
++
++      throw_error (ex.error, "%s%s", buffer_s, message);
++    }
+ }
+ 
+ static void

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to