packages: gdb/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch, gdb/...

pluto pluto at pld-linux.org
Thu Jun 2 11:22:09 CEST 2011


Author: pluto                        Date: Thu Jun  2 09:22:09 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- update some patches from gdb-7.2-51.fc14 (this fixes at least artifical arrays printing).
- release 3 (there're more new patches in fc .src.rpm but... -enotime).

---- Files affected:
packages/gdb:
   gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch (1.3 -> 1.4) , gdb-6.6-buildid-locate-rpm.patch (1.5 -> 1.6) , gdb-6.8-attach-signalled-detach-stopped.patch (1.3 -> 1.4) , gdb-6.8-bz254229-gcore-prpsinfo.patch (1.3 -> 1.4) , gdb-bz541866-rwatch-before-run.patch (1.1 -> 1.2) , gdb-gdbindex-bigendian.patch (1.1 -> 1.2) , gdb-upstream.patch (1.1 -> 1.2) , gdb.spec (1.135 -> 1.136) 

---- Diffs:

================================================================
Index: packages/gdb/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
diff -u packages/gdb/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch:1.3 packages/gdb/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch:1.4
--- packages/gdb/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch:1.3	Fri Oct 15 19:16:36 2010
+++ packages/gdb/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch	Thu Jun  2 11:22:03 2011
@@ -19,6 +19,8 @@
 Attached suggestion patch how to deal with the most common "errno" symbol
 for the most common under-ggdb3 compiled programs.
 
+Original patch hooked into target_translate_tls_address.  But its inferior
+call invalidates `struct frame *' in the callers - RH BZ 690908.
 
 
 2007-11-03  Jan Kratochvil  <jan.kratochvil at redhat.com>
@@ -30,114 +32,55 @@
   <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-7.0.50.20100128/gdb/gdbtypes.c
+Index: gdb-7.2/gdb/printcmd.c
 ===================================================================
---- gdb-7.0.50.20100128.orig/gdb/gdbtypes.c	2010-01-28 12:52:17.000000000 +0100
-+++ gdb-7.0.50.20100128/gdb/gdbtypes.c	2010-01-28 12:52:48.000000000 +0100
-@@ -3978,6 +3978,9 @@ gdbtypes_post_init (struct gdbarch *gdba
-     = arch_type (gdbarch, TYPE_CODE_INTERNAL_FUNCTION, 0,
- 		 "<internal function>");
- 
-+  builtin_type->nodebug_text_symbol_errno_location
-+    = lookup_function_type (lookup_pointer_type (builtin_type->builtin_int));
-+
-   return builtin_type;
- }
- 
-Index: gdb-7.0.50.20100128/gdb/gdbtypes.h
-===================================================================
---- gdb-7.0.50.20100128.orig/gdb/gdbtypes.h	2010-01-28 12:52:17.000000000 +0100
-+++ gdb-7.0.50.20100128/gdb/gdbtypes.h	2010-01-28 12:52:48.000000000 +0100
-@@ -1245,6 +1245,8 @@ struct builtin_type
- 
-   /* This type is used to represent a GDB internal function.  */
-   struct type *internal_fn;
-+
-+  struct type *nodebug_text_symbol_errno_location;
- };
- 
- /* Return the type table for the specified architecture.  */
-Index: gdb-7.0.50.20100128/gdb/parse.c
-===================================================================
---- gdb-7.0.50.20100128.orig/gdb/parse.c	2010-01-28 12:52:19.000000000 +0100
-+++ gdb-7.0.50.20100128/gdb/parse.c	2010-01-28 12:53:20.000000000 +0100
-@@ -509,7 +509,11 @@ write_exp_msymbol (struct minimal_symbol
-     case mst_text:
-     case mst_file_text:
-     case mst_solib_trampoline:
--      write_exp_elt_type (objfile_type (objfile)->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 (objfile_type (objfile)->nodebug_text_symbol);
-       break;
- 
-     case mst_text_gnu_ifunc:
-Index: gdb-7.0.50.20100128/gdb/target.c
-===================================================================
---- gdb-7.0.50.20100128.orig/gdb/target.c	2010-01-28 12:52:29.000000000 +0100
-+++ gdb-7.0.50.20100128/gdb/target.c	2010-01-28 12:52:48.000000000 +0100
-@@ -1000,6 +1000,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
-@@ -1090,7 +1109,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)))
+--- gdb-7.2.orig/gdb/printcmd.c	2011-03-29 10:55:32.000000000 +0200
++++ gdb-7.2/gdb/printcmd.c	2011-03-29 10:56:00.000000000 +0200
+@@ -947,10 +947,10 @@ validate_format (struct format_data fmt,
+ static void
+ print_command_1 (char *exp, int inspect, int voidprint)
+ {
+-  struct expression *expr;
+   struct cleanup *old_chain = 0;
+   char format = 0;
+-  struct value *val;
++  /* False GCC warning due to the TRY_CATCH.  */
++  struct value *val = NULL;
+   struct format_data fmt;
+   int cleanup = 0;
+ 
+@@ -971,10 +971,25 @@ print_command_1 (char *exp, int inspect,
+ 
+   if (exp && *exp)
+     {
++      struct expression *expr;
++      volatile struct gdb_exception except;
++
+       expr = parse_expression (exp);
+-      old_chain = make_cleanup (free_current_contents, &expr);
++      old_chain = make_cleanup (xfree, expr);
+       cleanup = 1;
+-      val = evaluate_expression (expr);
++      TRY_CATCH (except, RETURN_MASK_ERROR)
 +	{
-+	  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'."));
++	  val = evaluate_expression (expr);
 +	}
-+      else
-+	error (_("Cannot find thread-local variables on this target"));
-+    }
- 
-   return addr;
- }
-Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.c
++      if (except.reason < 0)
++	{
++	  if (strcmp (exp, "errno") != 0)
++	    throw_exception (except);
++
++	  expr = parse_expression ("*((int *(*) (void)) __errno_location) ()");
++	  make_cleanup (xfree, expr);
++	  val = evaluate_expression (expr);
++	}
+     }
+   else
+     val = access_value_history (0);
+Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.c	2010-01-28 12:52:48.000000000 +0100
++++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c	2011-03-29 10:55:35.000000000 +0200
 @@ -0,0 +1,28 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -167,10 +110,10 @@
 +
 +  return 0;	/* breakpoint */
 +}
-Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
+Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp	2010-01-28 12:52:48.000000000 +0100
++++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.exp	2011-03-29 10:55:35.000000000 +0200
 @@ -0,0 +1,60 @@
 +# Copyright 2007 Free Software Foundation, Inc.
 +

================================================================
Index: packages/gdb/gdb-6.6-buildid-locate-rpm.patch
diff -u packages/gdb/gdb-6.6-buildid-locate-rpm.patch:1.5 packages/gdb/gdb-6.6-buildid-locate-rpm.patch:1.6
--- packages/gdb/gdb-6.6-buildid-locate-rpm.patch:1.5	Fri Oct 15 19:16:36 2010
+++ packages/gdb/gdb-6.6-buildid-locate-rpm.patch	Thu Jun  2 11:22:03 2011
@@ -1,7 +1,7 @@
-Index: gdb-7.1.90.20100806/gdb/event-top.c
+Index: gdb-7.2/gdb/event-top.c
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/event-top.c	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/event-top.c	2010-08-06 17:42:05.000000000 +0200
+--- gdb-7.2.orig/gdb/event-top.c	2010-06-26 08:44:47.000000000 +0200
++++ gdb-7.2/gdb/event-top.c	2010-10-06 22:39:32.000000000 +0200
 @@ -33,6 +33,7 @@
  #include "cli/cli-script.h"     /* for reset_command_nest_depth */
  #include "main.h"
@@ -28,10 +28,10 @@
    /* Each interpreter has its own rules on displaying the command
       prompt.  */
    if (!current_interp_display_prompt_p ())
-Index: gdb-7.1.90.20100806/gdb/elfread.c
+Index: gdb-7.2/gdb/elfread.c
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/elfread.c	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/elfread.c	2010-08-06 18:11:49.000000000 +0200
+--- gdb-7.2.orig/gdb/elfread.c	2010-10-06 22:39:32.000000000 +0200
++++ gdb-7.2/gdb/elfread.c	2010-10-06 22:39:52.000000000 +0200
 @@ -42,6 +42,7 @@
  #include "gdbcore.h"
  #include "gdbcmd.h"
@@ -40,7 +40,7 @@
  
  extern void _initialize_elfread (void);
  
-@@ -1371,8 +1372,357 @@ build_id_to_filename (struct build_id *b
+@@ -1371,8 +1372,361 @@ build_id_to_filename (struct build_id *b
    return retval;
  }
  
@@ -114,6 +114,10 @@
 +#endif	/* !DLOPEN_LIBRPM */
 +
 +  gdb_assert (filename != NULL);
++
++  if (strcmp (filename, BUILD_ID_MAIN_EXECUTABLE_FILENAME) == 0)
++    return 0;
++
 +  if (filename[0] != '/')
 +    {
 +      warning (_("Ignoring non-absolute filename: <%s>"), filename);
@@ -399,7 +403,7 @@
     avoidance.  */
  
  struct missing_filepair
-@@ -1426,11 +1776,17 @@ missing_filepair_change (void)
+@@ -1426,11 +1780,17 @@ missing_filepair_change (void)
        /* All their memory came just from missing_filepair_OBSTACK.  */
        missing_filepair_hash = NULL;
      }
@@ -417,7 +421,7 @@
    missing_filepair_change ();
  }
  
-@@ -1497,14 +1853,35 @@ debug_print_missing (const char *binary,
+@@ -1497,14 +1857,35 @@ debug_print_missing (const char *binary,
  
    *slot = missing_filepair;
  
@@ -460,22 +464,23 @@
  }
  
  static char *
-Index: gdb-7.1.90.20100806/gdb/symfile.h
+Index: gdb-7.2/gdb/symfile.h
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/symfile.h	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/symfile.h	2010-08-06 17:42:05.000000000 +0200
-@@ -577,6 +577,7 @@ extern struct build_id *build_id_addr_ge
+--- gdb-7.2.orig/gdb/symfile.h	2010-10-06 22:39:32.000000000 +0200
++++ gdb-7.2/gdb/symfile.h	2010-10-06 22:39:52.000000000 +0200
+@@ -577,6 +577,8 @@ extern struct build_id *build_id_addr_ge
  extern char *build_id_to_filename (struct build_id *build_id,
  				   char **link_return, int add_debug_suffix);
  extern void debug_print_missing (const char *binary, const char *debug);
 +extern void debug_flush_missing (void);
++#define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file")
  
  /* From dwarf2read.c */
  
-Index: gdb-7.1.90.20100806/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.2/gdb/testsuite/lib/gdb.exp
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/testsuite/lib/gdb.exp	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/testsuite/lib/gdb.exp	2010-08-06 17:42:05.000000000 +0200
+--- gdb-7.2.orig/gdb/testsuite/lib/gdb.exp	2010-10-06 22:39:32.000000000 +0200
++++ gdb-7.2/gdb/testsuite/lib/gdb.exp	2010-10-06 22:39:32.000000000 +0200
 @@ -1359,7 +1359,7 @@ proc default_gdb_start { } {
  	    warning "Couldn't set the width to 0."
  	}
@@ -485,10 +490,10 @@
      send_gdb "set build-id-verbose 0\n"
      gdb_expect 10 {
  	-re "$gdb_prompt $" {
-Index: gdb-7.1.90.20100806/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.2/gdb/testsuite/lib/mi-support.exp
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/testsuite/lib/mi-support.exp	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/testsuite/lib/mi-support.exp	2010-08-06 17:42:05.000000000 +0200
+--- gdb-7.2.orig/gdb/testsuite/lib/mi-support.exp	2010-10-06 22:39:32.000000000 +0200
++++ gdb-7.2/gdb/testsuite/lib/mi-support.exp	2010-10-06 22:39:32.000000000 +0200
 @@ -221,7 +221,7 @@ proc default_mi_gdb_start { args } {
  	    }
      	}
@@ -498,10 +503,10 @@
      send_gdb "190-gdb-set build-id-verbose 0\n"
      gdb_expect 10 {
  	-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
-Index: gdb-7.1.90.20100806/gdb/tui/tui-interp.c
+Index: gdb-7.2/gdb/tui/tui-interp.c
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/tui/tui-interp.c	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/tui/tui-interp.c	2010-08-06 17:42:05.000000000 +0200
+--- gdb-7.2.orig/gdb/tui/tui-interp.c	2010-05-18 00:21:43.000000000 +0200
++++ gdb-7.2/gdb/tui/tui-interp.c	2010-10-06 22:39:32.000000000 +0200
 @@ -30,6 +30,7 @@
  #include "tui/tui.h"
  #include "tui/tui-io.h"
@@ -519,10 +524,10 @@
        /* Tell readline what the prompt to display is and what function
           it will need to call after a whole line is read. This also
           displays the first prompt.  */
-Index: gdb-7.1.90.20100806/gdb/aclocal.m4
+Index: gdb-7.2/gdb/aclocal.m4
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/aclocal.m4	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/aclocal.m4	2010-08-06 17:42:05.000000000 +0200
+--- gdb-7.2.orig/gdb/aclocal.m4	2010-05-23 02:56:59.000000000 +0200
++++ gdb-7.2/gdb/aclocal.m4	2010-10-06 22:39:32.000000000 +0200
 @@ -19,6 +19,162 @@ You have another version of autoconf.  I
  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'.])])
@@ -686,10 +691,10 @@
  # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
  #
  # This file is free software; the Free Software Foundation
-Index: gdb-7.1.90.20100806/gdb/config.in
+Index: gdb-7.2/gdb/config.in
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/config.in	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/config.in	2010-08-06 17:42:05.000000000 +0200
+--- gdb-7.2.orig/gdb/config.in	2010-10-06 22:39:31.000000000 +0200
++++ gdb-7.2/gdb/config.in	2010-10-06 22:39:32.000000000 +0200
 @@ -46,6 +46,9 @@
  /* Define to BFD's default target vector. */
  #undef DEFAULT_BFD_VEC
@@ -710,10 +715,10 @@
  /* Define if libunwind library is being used. */
  #undef HAVE_LIBUNWIND
  
-Index: gdb-7.1.90.20100806/gdb/configure
+Index: gdb-7.2/gdb/configure
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/configure	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/configure	2010-08-06 17:42:05.000000000 +0200
+--- gdb-7.2.orig/gdb/configure	2010-10-06 22:39:31.000000000 +0200
++++ gdb-7.2/gdb/configure	2010-10-06 22:39:32.000000000 +0200
 @@ -679,6 +679,9 @@ REPORT_BUGS_TO
  PKGVERSION
  TARGET_OBS
@@ -1247,10 +1252,10 @@
  
  
  
-Index: gdb-7.1.90.20100806/gdb/configure.ac
+Index: gdb-7.2/gdb/configure.ac
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/configure.ac	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/configure.ac	2010-08-06 17:42:05.000000000 +0200
+--- gdb-7.2.orig/gdb/configure.ac	2010-10-06 22:39:31.000000000 +0200
++++ gdb-7.2/gdb/configure.ac	2010-10-06 22:39:32.000000000 +0200
 @@ -152,6 +152,198 @@ else
  fi
  AC_SUBST(pythondir)
@@ -1450,10 +1455,10 @@
  
  AC_CONFIG_SUBDIRS(doc testsuite)
  
-Index: gdb-7.1.90.20100806/gdb/acinclude.m4
+Index: gdb-7.2/gdb/acinclude.m4
 ===================================================================
---- gdb-7.1.90.20100806.orig/gdb/acinclude.m4	2010-08-06 17:42:01.000000000 +0200
-+++ gdb-7.1.90.20100806/gdb/acinclude.m4	2010-08-06 17:42:05.000000000 +0200
+--- gdb-7.2.orig/gdb/acinclude.m4	2010-05-27 05:40:45.000000000 +0200
++++ gdb-7.2/gdb/acinclude.m4	2010-10-06 22:39:32.000000000 +0200
 @@ -1,3 +1,5 @@
 +# serial 1
 +
@@ -1469,3 +1474,16 @@
  # @defmac AC_PROG_CC_STDC
  # @maindex PROG_CC_STDC
  # @ovindex CC
+Index: gdb-7.2/gdb/corelow.c
+===================================================================
+--- gdb-7.2.orig/gdb/corelow.c	2010-10-06 22:39:39.000000000 +0200
++++ gdb-7.2/gdb/corelow.c	2010-10-06 22:39:52.000000000 +0200
+@@ -331,7 +331,7 @@ build_id_locate_exec (int from_tty)
+         symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
+     }
+   else
+-    debug_print_missing (_("the main executable file"), build_id_filename);
++    debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename);
+ 
+   do_cleanups (back_to);
+ 

================================================================
Index: packages/gdb/gdb-6.8-attach-signalled-detach-stopped.patch
diff -u packages/gdb/gdb-6.8-attach-signalled-detach-stopped.patch:1.3 packages/gdb/gdb-6.8-attach-signalled-detach-stopped.patch:1.4
--- packages/gdb/gdb-6.8-attach-signalled-detach-stopped.patch:1.3	Fri Oct 15 19:16:36 2010
+++ packages/gdb/gdb-6.8-attach-signalled-detach-stopped.patch	Thu Jun  2 11:22:03 2011
@@ -79,6 +79,35 @@
  }
  
  /* Convert a native/host siginfo object, into/from the siginfo in the
+Index: gdb-7.0.50.20100115/gdb/linux-nat.c
+===================================================================
+--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c	2010-01-15 22:19:27.000000000 +0100
++++ gdb-7.0.50.20100115/gdb/linux-nat.c	2010-01-15 22:19:55.000000000 +0100
+@@ -1768,8 +1768,22 @@ GPT: lwp %s had signal %s, but it is in 
+ 			    target_signal_to_string (signo));
+     }
+ 
+-  if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
+-    *status = W_STOPCODE (SIGSTOP);
++  /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
++     many TIDs are left unstopped).  See RH Bug 496732.  */
++  if (GET_PID (lp->ptid) == pid_was_stopped)
++    {
++      int err;
++
++      errno = 0;
++      err = kill_lwp (GET_LWP (lp->ptid), SIGSTOP);
++      if (debug_linux_nat)
++	{
++	  fprintf_unfiltered (gdb_stdlog,
++			      "SC:  lwp kill %d %s\n",
++			      err,
++			      errno ? safe_strerror (errno) : "ERRNO-OK");
++	}
++    }
+ 
+   return 0;
+ }
 Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attach-stopped.exp
 ===================================================================
 --- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/attach-stopped.exp	2010-01-01 08:32:06.000000000 +0100

================================================================
Index: packages/gdb/gdb-6.8-bz254229-gcore-prpsinfo.patch
diff -u packages/gdb/gdb-6.8-bz254229-gcore-prpsinfo.patch:1.3 packages/gdb/gdb-6.8-bz254229-gcore-prpsinfo.patch:1.4
--- packages/gdb/gdb-6.8-bz254229-gcore-prpsinfo.patch:1.3	Fri Oct 15 19:16:36 2010
+++ packages/gdb/gdb-6.8-bz254229-gcore-prpsinfo.patch	Thu Jun  2 11:22:03 2011
@@ -2,11 +2,12 @@
 ===================================================================
 --- gdb-7.1.90.20100711.orig/bfd/elf-bfd.h	2010-06-27 06:07:51.000000000 +0200
 +++ gdb-7.1.90.20100711/bfd/elf-bfd.h	2010-07-12 23:00:04.000000000 +0200
-@@ -2171,8 +2171,9 @@ extern Elf_Internal_Phdr * _bfd_elf_find
+@@ -2171,8 +2171,10 @@ extern Elf_Internal_Phdr * _bfd_elf_find
  /* Exported interface for writing elf corefile notes. */
  extern char *elfcore_write_note
    (bfd *, char *, int *, const char *, int, const void *, int);
-+#include <sys/procfs.h>
++struct elf_prpsinfo;
++typedef struct elf_prpsinfo prpsinfo_t;
  extern char *elfcore_write_prpsinfo
 -  (bfd *, char *, int *, const char *, const char *);
 +  (bfd *, char *, int *, const prpsinfo_t *);

================================================================
Index: packages/gdb/gdb-bz541866-rwatch-before-run.patch
diff -u packages/gdb/gdb-bz541866-rwatch-before-run.patch:1.1 packages/gdb/gdb-bz541866-rwatch-before-run.patch:1.2
--- packages/gdb/gdb-bz541866-rwatch-before-run.patch:1.1	Fri Oct 15 19:16:36 2010
+++ packages/gdb/gdb-bz541866-rwatch-before-run.patch	Thu Jun  2 11:22:03 2011
@@ -11,6 +11,47 @@
  NAT_CDEPS = $(srcdir)/proc-service.list
  
  # The dynamically loaded libthread_db needs access to symbols in the
+--- gdb-7.2/gdb/config/i386/linux.mh-orig	2010-06-11 14:08:51.000000000 +0200
++++ gdb-7.2/gdb/config/i386/linux.mh	2011-03-18 12:00:32.000000000 +0100
+@@ -1,6 +1,6 @@
+ # Host: Intel 386 running GNU/Linux.
+ 
+-NAT_FILE= config/nm-linux.h
++NAT_FILE= nm-linux.h
+ NATDEPFILES= inf-ptrace.o fork-child.o \
+ 	i386-nat.o i386-linux-nat.o \
+ 	proc-service.o linux-thread-db.o \
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux.h	2010-07-13 19:02:28.000000000 +0200
+@@ -0,0 +1,28 @@
++/* Native support for GNU/Linux i386.
++
++   Copyright 2010 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 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/>.  */
++
++#ifndef NM_LINUX_H
++#define NM_LINUX_H
++
++#include "config/nm-linux.h"
++
++/* Red Hat backward compatibility with gdb-6.8.  */
++#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
++
++#endif /* NM_LINUX64_H */
 Index: gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000

================================================================
Index: packages/gdb/gdb-gdbindex-bigendian.patch
diff -u packages/gdb/gdb-gdbindex-bigendian.patch:1.1 packages/gdb/gdb-gdbindex-bigendian.patch:1.2
--- packages/gdb/gdb-gdbindex-bigendian.patch:1.1	Fri Oct 15 19:16:36 2010
+++ packages/gdb/gdb-gdbindex-bigendian.patch	Thu Jun  2 11:22:03 2011
@@ -15,7 +15,7 @@
  	* valops.c (find_oload_champ_namespace_loop): replace incorrect
 --- src/gdb/dwarf2read.c	2010/09/22 19:22:44	1.460
 +++ src/gdb/dwarf2read.c	2010/09/24 16:11:46	1.461
-@@ -2248,10 +2248,12 @@ dw2_expand_symtabs_matching (struct objf
+@@ -2382,10 +2382,12 @@
  {
    int i;
    offset_type iter;
@@ -26,8 +26,8 @@
      return;
 +  index = dwarf2_per_objfile->index_table;
  
-   for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
-     {
+   for (i = 0; i < (dwarf2_per_objfile->n_comp_units
+ 		   + dwarf2_per_objfile->n_type_comp_units); ++i)
 @@ -2411,28 +2413,24 @@
  	}
      }

================================================================
Index: packages/gdb/gdb-upstream.patch
diff -u packages/gdb/gdb-upstream.patch:1.1 packages/gdb/gdb-upstream.patch:1.2
--- packages/gdb/gdb-upstream.patch:1.1	Fri Oct 15 19:16:36 2010
+++ packages/gdb/gdb-upstream.patch	Thu Jun  2 11:22:03 2011
@@ -465,3 +465,349 @@
 +gdb_test_no_output "python a = gdb.execute('help', to_string=True)" "collect help from uiout"
 +
 +gdb_test "python print a" ".*aliases -- Aliases of other commands.*" "verify help to uiout"
+
+
+
+http://sourceware.org/ml/gdb-cvs/2011-02/msg00063.html
+
+### src/gdb/ChangeLog	2011/02/12 13:07:38	1.12557
+### src/gdb/ChangeLog	2011/02/13 09:09:33	1.12558
+## -1,3 +1,9 @@
++2011-02-13  Jan Kratochvil  <jan.kratochvil at redhat.com>
++
++	* symtab.c (find_pc_sect_line): New variable objfile, initialize it
++	from S.  Iterate S using ALL_OBJFILE_SYMTABS.  Verify BV for each S.
++	* symtab.h (struct symtab) <next>: Comment extension.
++
+ 2011-02-12  Yao Qi  <yao at codesourcery.com>
+ 
+ 	* Makefile.in (CLEANDIRS): Remove duplicated common dir.
+--- src/gdb/symtab.c	2011/01/11 21:53:24	1.257
++++ src/gdb/symtab.c	2011/02/13 09:09:36	1.258
+@@ -1904,6 +1904,7 @@
+   struct blockvector *bv;
+   struct minimal_symbol *msymbol;
+   struct minimal_symbol *mfunsym;
++  struct objfile *objfile;
+ 
+   /* Info on best line seen so far, and where it starts, and its file.  */
+ 
+@@ -2031,13 +2032,17 @@
+     }
+ 
+   bv = BLOCKVECTOR (s);
++  objfile = s->objfile;
+ 
+   /* Look at all the symtabs that share this blockvector.
+      They all have the same apriori range, that we found was right;
+      but they have different line tables.  */
+ 
+-  for (; s && BLOCKVECTOR (s) == bv; s = s->next)
++  ALL_OBJFILE_SYMTABS (objfile, s)
+     {
++      if (BLOCKVECTOR (s) != bv)
++	continue;
++
+       /* Find the best line in this symtab.  */
+       l = LINETABLE (s);
+       if (!l)
+--- src/gdb/symtab.h	2011/01/11 21:53:25	1.168
++++ src/gdb/symtab.h	2011/02/13 09:09:36	1.169
+@@ -738,8 +738,7 @@
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch?r1=1.3&r2=1.4&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-6.6-buildid-locate-rpm.patch?r1=1.5&r2=1.6&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-6.8-attach-signalled-detach-stopped.patch?r1=1.3&r2=1.4&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-6.8-bz254229-gcore-prpsinfo.patch?r1=1.3&r2=1.4&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-bz541866-rwatch-before-run.patch?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-gdbindex-bigendian.patch?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-upstream.patch?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb.spec?r1=1.135&r2=1.136&f=u



More information about the pld-cvs-commit mailing list