rpms/gdb/devel gdb-6.8.50.20090818-upstream.patch, NONE, 1.1 gdb-archer.patch, 1.25, 1.26 gdb.spec, 1.377, 1.378

Jan Kratochvil jkratoch at fedoraproject.org
Wed Aug 19 16:19:16 UTC 2009


Author: jkratoch

Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28413

Modified Files:
	gdb-archer.patch gdb.spec 
Added Files:
	gdb-6.8.50.20090818-upstream.patch 
Log Message:
* Wed Aug 19 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090818-4
- Fixup "bad type" internal error, import from FSF GDB.
- archer-jankratochvil-fedora12 commit: 2ba2bc451eb832182ef84c3934115de7a329da7c


gdb-6.8.50.20090818-upstream.patch:
 testsuite/gdb.base/gdbvars.c   |   16 +++++++
 testsuite/gdb.base/gdbvars.exp |   19 +++++++++
 value.c                        |   85 ++++++++++++++++++++++-------------------
 3 files changed, 81 insertions(+), 39 deletions(-)

--- NEW FILE gdb-6.8.50.20090818-upstream.patch ---
http://sourceware.org/ml/gdb-patches/2009-08/msg00310.html
http://sourceware.org/ml/gdb-cvs/2009-08/msg00092.html

2009-08-19  Ulrich Weigand  <uweigand at de.ibm.com>

	* value.c (enum internalvar_kind): Replace INTERNALVAR_SCALAR by
	INTERNALVAR_INTEGER and INTERNALVAR_POINTER.
	(union internalvar_data): Replace "scalar" member by "integer"
	and "pointer".
	(value_of_internalvar): Handle INTERNALVAR_INTEGER and
	INTERNALVAR_POINTER instead of INTERNALVAR_SCALAR.
	(get_internalvar_integer): Likewise.
	(set_internalvar): Likewise.
	(set_internalvar_integer): Likewise.
	(preserve_one_internalvar): Likewise.
	(value_from_pointer): Handle typedef'd pointer types.

2009-08-19  Doug Evans  <dje at google.com>

	* gdb.base/gdbvars.c: New file.
	* gdb.base/gdbvars.exp: Test convenience vars with program variables.

--- src/gdb/value.c	2009/08/13 18:39:20	1.92
+++ src/gdb/value.c	2009/08/19 13:00:28	1.93
@@ -920,8 +920,11 @@
       /* The internal variable holds a GDB internal convenience function.  */
       INTERNALVAR_FUNCTION,
 
-      /* The variable holds a simple scalar value.  */
-      INTERNALVAR_SCALAR,
+      /* The variable holds an integer value.  */
+      INTERNALVAR_INTEGER,
+
+      /* The variable holds a pointer value.  */
+      INTERNALVAR_POINTER,
 
       /* The variable holds a GDB-provided string.  */
       INTERNALVAR_STRING,
@@ -944,19 +947,22 @@
 	  int canonical;
 	} fn;
 
-      /* A scalar value used with INTERNALVAR_SCALAR.  */
+      /* An integer value used with INTERNALVAR_INTEGER.  */
       struct
         {
 	  /* If type is non-NULL, it will be used as the type to generate
 	     a value for this internal variable.  If type is NULL, a default
 	     integer type for the architecture is used.  */
 	  struct type *type;
-	  union
-	    {
-	      LONGEST l;    /* Used with TYPE_CODE_INT and NULL types.  */
-	      CORE_ADDR a;  /* Used with TYPE_CODE_PTR types.  */
-	    } val;
-        } scalar;
+	  LONGEST val;
+        } integer;
+
+      /* A pointer value used with INTERNALVAR_POINTER.  */
+      struct
+        {
+	  struct type *type;
+	  CORE_ADDR val;
+        } pointer;
 
       /* A string value used with INTERNALVAR_STRING.  */
       char *string;
@@ -1082,16 +1088,16 @@
       val = allocate_value (builtin_type (gdbarch)->internal_fn);
       break;
 
-    case INTERNALVAR_SCALAR:
-      if (!var->u.scalar.type)
+    case INTERNALVAR_INTEGER:
+      if (!var->u.integer.type)
 	val = value_from_longest (builtin_type (gdbarch)->builtin_int,
-				  var->u.scalar.val.l);
-      else if (TYPE_CODE (var->u.scalar.type) == TYPE_CODE_INT)
-	val = value_from_longest (var->u.scalar.type, var->u.scalar.val.l);
-      else if (TYPE_CODE (var->u.scalar.type) == TYPE_CODE_PTR)
-	val = value_from_pointer (var->u.scalar.type, var->u.scalar.val.a);
+				  var->u.integer.val);
       else
-        internal_error (__FILE__, __LINE__, "bad type");
+	val = value_from_longest (var->u.integer.type, var->u.integer.val);
+      break;
+
+    case INTERNALVAR_POINTER:
+      val = value_from_pointer (var->u.pointer.type, var->u.pointer.val);
       break;
 
     case INTERNALVAR_STRING:
@@ -1145,14 +1151,9 @@
 {
   switch (var->kind)
     {
-    case INTERNALVAR_SCALAR:
-      if (var->u.scalar.type == NULL
-	  || TYPE_CODE (var->u.scalar.type) == TYPE_CODE_INT)
-	{
-	  *result = var->u.scalar.val.l;
-	  return 1;
-	}
-      /* Fall through.  */
+    case INTERNALVAR_INTEGER:
+      *result = var->u.integer.val;
+      return 1;
 
     default:
       return 0;
@@ -1224,15 +1225,15 @@
       break;
 
     case TYPE_CODE_INT:
-      new_kind = INTERNALVAR_SCALAR;
-      new_data.scalar.type = value_type (val);
-      new_data.scalar.val.l = value_as_long (val);
+      new_kind = INTERNALVAR_INTEGER;
+      new_data.integer.type = value_type (val);
+      new_data.integer.val = value_as_long (val);
       break;
 
     case TYPE_CODE_PTR:
-      new_kind = INTERNALVAR_SCALAR;
-      new_data.scalar.type = value_type (val);
-      new_data.scalar.val.a = value_as_address (val);
+      new_kind = INTERNALVAR_POINTER;
+      new_data.pointer.type = value_type (val);
+      new_data.pointer.val = value_as_address (val);
       break;
 
     default:
@@ -1269,9 +1270,9 @@
   /* Clean up old contents.  */
   clear_internalvar (var);
 
-  var->kind = INTERNALVAR_SCALAR;
-  var->u.scalar.type = NULL;
-  var->u.scalar.val.l = l;
+  var->kind = INTERNALVAR_INTEGER;
+  var->u.integer.type = NULL;
+  var->u.integer.val = l;
 }
 
 void
@@ -1426,10 +1427,16 @@
 {
   switch (var->kind)
     {
-    case INTERNALVAR_SCALAR:
-      if (var->u.scalar.type && TYPE_OBJFILE (var->u.scalar.type) == objfile)
-	var->u.scalar.type
-	  = copy_type_recursive (objfile, var->u.scalar.type, copied_types);
+    case INTERNALVAR_INTEGER:
+      if (var->u.integer.type && TYPE_OBJFILE (var->u.integer.type) == objfile)
+	var->u.integer.type
+	  = copy_type_recursive (objfile, var->u.integer.type, copied_types);
+      break;
+
+    case INTERNALVAR_POINTER:
+      if (TYPE_OBJFILE (var->u.pointer.type) == objfile)
+	var->u.pointer.type
+	  = copy_type_recursive (objfile, var->u.pointer.type, copied_types);
       break;
 
     case INTERNALVAR_VALUE:
@@ -2164,7 +2171,7 @@
 value_from_pointer (struct type *type, CORE_ADDR addr)
 {
   struct value *val = allocate_value (type);
-  store_typed_address (value_contents_raw (val), type, addr);
+  store_typed_address (value_contents_raw (val), check_typedef (type), addr);
   return val;
 }
 
--- src/gdb/testsuite/gdb.base/gdbvars.c
+++ src/gdb/testsuite/gdb.base/gdbvars.c	2009-08-19 15:10:47.270783000 +0000
@@ -0,0 +1,16 @@
+/* Simple program to help exercise gdb's convenience variables.  */
+
+typedef void *ptr;
+
+ptr p = &p;
+
+int
+main ()
+{
+#ifdef usestubs
+    set_debug_traps ();
+    breakpoint ();
+#endif
+
+  return 0;
+}
--- src/gdb/testsuite/gdb.base/gdbvars.exp	2009/01/03 05:58:03	1.6
+++ src/gdb/testsuite/gdb.base/gdbvars.exp	2009/08/19 13:00:29	1.7
@@ -22,6 +22,15 @@
 set prms_id 0
 set bug_id 0
 
+set testfile "gdbvars"
+set srcfile  ${testfile}.c
+set binfile  ${objdir}/${subdir}/${testfile}
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+    untested gdbvars.exp
+    return -1
+}
+
 proc test_convenience_variables {} {
     global gdb_prompt
 
@@ -101,13 +110,23 @@
 	"Use value-history element in arithmetic expression"
 }
 
+proc test_with_program {} {
+    global hex
+    gdb_test "set \$prog_var = p" "" \
+	"Set a new convenience variable to a program variable"
+    gdb_test "print /x \$prog_var" " = $hex" \
+	"Print contents of new convenience variable of program variable"
+}
+
 # Start with a fresh gdb.
 
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
 
 send_gdb "set print sevenbit-strings\n" ; gdb_expect -re ".*$gdb_prompt $"
 
 test_value_history
 test_convenience_variables
+test_with_program

gdb-archer.patch:
 Makefile.in                                              |   95 
 NEWS                                                     |    7 
 ada-lang.c                                               |   43 
 amd64-linux-nat.c                                        |   45 
 block.c                                                  |   24 
 block.h                                                  |   12 
 breakpoint.c                                             |  137 -
 breakpoint.h                                             |    3 
 c-exp.y                                                  |  252 +-
 c-lang.c                                                 |    6 
 c-typeprint.c                                            |   47 
 cli/cli-cmds.c                                           |   72 
 coffread.c                                               |    3 
 config.in                                                |    8 
 config/i386/nm-i386.h                                    |  125 +
 config/i386/nm-linux64.h                                 |   54 
 config/mips/nm-irix5.h                                   |   44 
 configure                                                |   79 
 configure.ac                                             |   47 
 cp-name-parser.y                                         |    5 
 cp-namespace.c                                           |  245 +
 cp-support.c                                             |   88 
 cp-support.h                                             |   49 
 dbxread.c                                                |    1 
 doc/gdb.texinfo                                          |  504 ++++
 doc/gdbint.texinfo                                       |   62 
 doc/observer.texi                                        |    5 
 dwarf2-frame.c                                           |   28 
 dwarf2-frame.h                                           |    4 
 dwarf2expr.c                                             |   86 
 dwarf2expr.h                                             |   68 
 dwarf2loc.c                                              |  357 ++
 dwarf2loc.h                                              |    6 
 dwarf2read.c                                             | 1842 ++++++++++-----
 elfread.c                                                |   11 
 eval.c                                                   |  170 +
 expression.h                                             |   11 
 f-exp.y                                                  |    4 
 f-lang.c                                                 |  457 ---
 f-lang.h                                                 |   45 
 f-typeprint.c                                            |   36 
 f-valprint.c                                             |  267 --
 findcmd.c                                                |  111 
 findvar.c                                                |  126 -
 frame.c                                                  |   19 
 frame.h                                                  |    6 
 gdbinit.in                                               |   10 
 gdbserver/linux-i386-low.c                               |  210 +
 gdbserver/linux-x86-64-low.c                             |  184 +
 gdbthread.h                                              |    3 
 gdbtypes.c                                               |  596 ++++
 gdbtypes.h                                               |  146 +
 gnu-v3-abi.c                                             |   18 
 gnulib/Makefile.in                                       |    4 
 i386-linux-nat.c                                         |   47 
 i386-nat.c                                               |   49 
 i386-nat.h                                               |   17 
 infrun.c                                                 |    8 
 jv-lang.c                                                |    1 
 language.h                                               |    1 
 linespec.c                                               |   62 
 linux-nat.c                                              |   88 
 linux-nat.h                                              |    6 
 m2-lang.c                                                |    1 
 machoread.c                                              |    1 
 main.c                                                   |   80 
 maint.c                                                  |    8 
 mdebugread.c                                             |    2 
 mi/mi-cmd-var.c                                          |  165 -
 mi/mi-cmds.c                                             |    2 
 mi/mi-cmds.h                                             |    2 
 mi/mi-main.c                                             |    5 
 mipsread.c                                               |    1 
 objfiles.c                                               |   21 
 objfiles.h                                               |   21 
 parse.c                                                  |  154 +
 parser-defs.h                                            |   25 
 ppc-linux-nat.c                                          |   19 
 printcmd.c                                               |   90 
 python/lib/gdb/FrameIterator.py                          |   33 
 python/lib/gdb/FrameWrapper.py                           |  112 
 python/lib/gdb/__init__.py                               |   19 
 python/lib/gdb/backtrace.py                              |   42 
 python/lib/gdb/command/__init__.py                       |    1 
 python/lib/gdb/command/alias.py                          |   59 
 python/lib/gdb/command/backtrace.py                      |  106 
 python/lib/gdb/command/ignore_errors.py                  |   37 
 python/lib/gdb/command/pahole.py                         |   75 
 python/lib/gdb/command/require.py                        |   57 
 python/lib/gdb/command/save_breakpoints.py               |   65 
 python/lib/gdb/command/upto.py                           |  129 +
 python/lib/gdb/function/__init__.py                      |    1 
 python/lib/gdb/function/caller_is.py                     |   58 
 python/lib/gdb/function/in_scope.py                      |   47 
 python/python-block.c                                    |  265 ++
 python/python-breakpoint.c                               |  665 +++++
 python/python-cmd.c                                      |   17 
 python/python-frame.c                                    |  116 
 python/python-hooks.c                                    |   50 
 python/python-inferior.c                                 |  926 +++++++
 python/python-infthread.c                                |  285 ++
 python/python-internal.h                                 |   69 
 python/python-membuf.c                                   |  268 ++
 python/python-param.c                                    |  606 ++++
 python/python-prettyprint.c                              |   21 
 python/python-symbol.c                                   |  336 ++
 python/python-symtab.c                                   |  322 ++
 python/python-type.c                                     |  170 +
 python/python-utils.c                                    |   46 
 python/python-value.c                                    |   55 
 python/python.c                                          |  384 +++
 python/python.h                                          |    4 
 scm-lang.c                                               |    1 
 scm-valprint.c                                           |    4 
 solib-darwin.c                                           |    1 
 solib-spu.c                                              |    7 
 solib-svr4.c                                             |    4 
 solib.c                                                  |    3 
 solist.h                                                 |    2 
 somread.c                                                |    1 
 spu-tdep.c                                               |    2 
 stabsread.c                                              |    4 
 stack.c                                                  |   38 
 symfile.c                                                |   42 
 symfile.h                                                |   12 
 symmisc.c                                                |    4 
 symtab.c                                                 |  321 +-
 symtab.h                                                 |   20 
 target.c                                                 |   20 
 target.h                                                 |   32 
 testsuite/gdb.arch/powerpc-power7.exp                    |  175 +
 testsuite/gdb.arch/powerpc-power7.s                      |  107 
 testsuite/gdb.arch/x86_64-vla-typedef-foo.S              |  455 +++
 testsuite/gdb.arch/x86_64-vla-typedef.c                  |   43 
 testsuite/gdb.arch/x86_64-vla-typedef.exp                |   64 
 testsuite/gdb.base/arrayidx.c                            |    7 
 testsuite/gdb.base/arrayidx.exp                          |   10 
 testsuite/gdb.base/help.exp                              |    2 
 testsuite/gdb.base/lineno-makeup-func.c                  |   21 
 testsuite/gdb.base/lineno-makeup.c                       |   35 
 testsuite/gdb.base/lineno-makeup.exp                     |   78 
 testsuite/gdb.base/macscp.exp                            |    8 
 testsuite/gdb.base/radix.exp                             |    7 
 testsuite/gdb.base/valgrind-attach.c                     |   28 
 testsuite/gdb.base/valgrind-attach.exp                   |   94 
 testsuite/gdb.base/valgrind-attach.sh                    |   20 
 testsuite/gdb.base/vla-overflow.c                        |   30 
 testsuite/gdb.base/vla-overflow.exp                      |  108 
 testsuite/gdb.base/vla.c                                 |   55 
 testsuite/gdb.base/vla.exp                               |   62 
 testsuite/gdb.base/watchpoint-hw.c                       |    6 
 testsuite/gdb.base/watchpoint-hw.exp                     |   45 
 testsuite/gdb.cp/cp-relocate.exp                         |    6 
 testsuite/gdb.cp/cplusfuncs.cc                           |    6 
 testsuite/gdb.cp/cplusfuncs.exp                          |  195 +
 testsuite/gdb.cp/expand-sals.exp                         |    2 
 testsuite/gdb.cp/member-ptr.cc                           |   17 
 testsuite/gdb.cp/member-ptr.exp                          |   34 
 testsuite/gdb.cp/namespace-multiple-imports.cc           |   20 
 testsuite/gdb.cp/namespace-multiple-imports.exp          |   49 
 testsuite/gdb.cp/namespace-nested-imports.cc             |   36 
 testsuite/gdb.cp/namespace-nested-imports.exp            |   57 
 testsuite/gdb.cp/namespace-no-imports.cc                 |   37 
 testsuite/gdb.cp/namespace-no-imports.exp                |   76 
 testsuite/gdb.cp/namespace-recursive.cc                  |   30 
 testsuite/gdb.cp/namespace-recursive.exp                 |   66 
 testsuite/gdb.cp/namespace-using.cc                      |  128 -
 testsuite/gdb.cp/namespace-using.exp                     |  130 +
 testsuite/gdb.cp/namespace.exp                           |   23 
 testsuite/gdb.cp/overload.exp                            |    8 
 testsuite/gdb.cp/ovldbreak.exp                           |   46 
 testsuite/gdb.cp/shadowing.cc                            |   48 
 testsuite/gdb.cp/shadowing.exp                           |   91 
 testsuite/gdb.dwarf2/callframecfa.S                      |  309 ++
 testsuite/gdb.dwarf2/callframecfa.exp                    |   55 
 testsuite/gdb.dwarf2/dw2-aranges.S                       |  140 +
 testsuite/gdb.dwarf2/dw2-aranges.exp                     |   40 
 testsuite/gdb.dwarf2/dw2-stripped.c                      |   42 
 testsuite/gdb.dwarf2/dw2-stripped.exp                    |   79 
 testsuite/gdb.dwarf2/dw2-struct-member-data-location.S   |   83 
 testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp |   37 
 testsuite/gdb.fortran/common-block.exp                   |  101 
 testsuite/gdb.fortran/common-block.f90                   |   67 
 testsuite/gdb.fortran/dwarf-stride.exp                   |   42 
 testsuite/gdb.fortran/dwarf-stride.f90                   |   40 
 testsuite/gdb.fortran/dynamic.exp                        |  145 +
 testsuite/gdb.fortran/dynamic.f90                        |   98 
 testsuite/gdb.fortran/library-module-lib.f90             |   28 
 testsuite/gdb.fortran/library-module-main.f90            |   23 
 testsuite/gdb.fortran/library-module.exp                 |   53 
 testsuite/gdb.fortran/logical.exp                        |   44 
 testsuite/gdb.fortran/logical.f90                        |   33 
 testsuite/gdb.fortran/module.exp                         |   28 
 testsuite/gdb.fortran/module.f90                         |   37 
 testsuite/gdb.fortran/string.exp                         |   59 
 testsuite/gdb.fortran/string.f90                         |   37 
 testsuite/gdb.gdb/selftest.exp                           |    4 
 testsuite/gdb.mi/gdb701.exp                              |    2 
 testsuite/gdb.mi/mi-var-display.exp                      |    4 
 testsuite/gdb.mi/mi2-var-display.exp                     |    4 
 testsuite/gdb.opt/array-from-register-func.c             |   22 
 testsuite/gdb.opt/array-from-register.c                  |   28 
 testsuite/gdb.opt/array-from-register.exp                |   33 
 testsuite/gdb.python/Makefile.in                         |    2 
 testsuite/gdb.python/python-cmd.exp                      |   27 
 testsuite/gdb.python/python-frame.exp                    |   48 
 testsuite/gdb.python/python-function.exp                 |   27 
 testsuite/gdb.python/python-inferior.c                   |   49 
 testsuite/gdb.python/python-inferior.exp                 |  201 +
 testsuite/gdb.python/python-infthread.c                  |   14 
 testsuite/gdb.python/python-infthread.exp                |   58 
 testsuite/gdb.python/python-mi.exp                       |   96 
 testsuite/gdb.python/python-prettyprint.c                |   13 
 testsuite/gdb.python/python-prettyprint.exp              |   11 
 testsuite/gdb.python/python-prettyprint.py               |   12 
 testsuite/gdb.python/python-template.exp                 |   25 
 testsuite/gdb.python/python-value.exp                    |   68 
 testsuite/gdb.python/python.exp                          |   27 
 testsuite/gdb.threads/watchpoint-fork-forkoff.c          |  175 +
 testsuite/gdb.threads/watchpoint-fork-mt.c               |  157 +
 testsuite/gdb.threads/watchpoint-fork.c                  |   57 
 testsuite/gdb.threads/watchpoint-fork.exp                |  130 +
 testsuite/gdb.threads/watchthreads-reorder.c             |  366 ++
 testsuite/gdb.threads/watchthreads-reorder.exp           |  101 
 testsuite/lib/cp-support.exp                             |    3 
 testsuite/lib/gdb.exp                                    |    1 
 testsuite/lib/mi-support.exp                             |   86 
 testsuite/lib/python-support.exp                         |   53 
 thread.c                                                 |   18 
 top.c                                                    |    1 
 typeprint.c                                              |   14 
 typeprint.h                                              |    3 
 ui-file.c                                                |   20 
 ui-file.h                                                |    6 
 utils.c                                                  |    7 
 valarith.c                                               |   45 
 valops.c                                                 |  254 +-
 valprint.c                                               |    3 
 value.c                                                  |  150 +
 value.h                                                  |    8 
 varobj.c                                                 |  610 +++-
 varobj.h                                                 |   32 
 xcoffread.c                                              |    1 
 243 files changed, 18345 insertions(+), 2643 deletions(-)

Index: gdb-archer.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-archer.patch,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- gdb-archer.patch	18 Aug 2009 19:37:35 -0000	1.25
+++ gdb-archer.patch	19 Aug 2009 16:19:15 -0000	1.26
@@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectAr
 http://sourceware.org/gdb/wiki/ArcherBranchManagement
 
 GIT snapshot:
-commit 850e3cb38a25cb7fdfa4cef667626ffbde51bcac
+commit 2ba2bc451eb832182ef84c3934115de7a329da7c
 
 branch `archer' - the merge of branches:
 archer-tromey-call-frame-cfa
@@ -27214,10 +27214,10 @@ index bf9915c..233206c 100644
  extern long ui_file_read (struct ui_file *file, char *buf, long length_buf);
  
 diff --git a/gdb/utils.c b/gdb/utils.c
-index 5fa2f26..f985fa9 100644
+index 16ad084..3021a43 100644
 --- a/gdb/utils.c
 +++ b/gdb/utils.c
-@@ -2604,7 +2604,10 @@ fprintf_symbol_filtered (struct ui_file *stream, char *name,
+@@ -2610,7 +2610,10 @@ fprintf_symbol_filtered (struct ui_file *stream, char *name,
     As an extra hack, string1=="FOO(ARGS)" matches string2=="FOO".
     This "feature" is useful when searching for matching C++ function names
     (such as if the user types 'break FOO', where FOO is a mangled C++
@@ -27229,7 +27229,7 @@ index 5fa2f26..f985fa9 100644
  
  int
  strcmp_iw (const char *string1, const char *string2)
-@@ -2629,7 +2632,7 @@ strcmp_iw (const char *string1, const char *string2)
+@@ -2635,7 +2638,7 @@ strcmp_iw (const char *string1, const char *string2)
  	  string2++;
  	}
      }
@@ -27732,7 +27732,7 @@ index cbb5d94..cf35bf0 100644
  	  ++reps;
  	  ++rep1;
 diff --git a/gdb/value.c b/gdb/value.c
-index 97f236c..8af6ae1 100644
+index 48fedfd..5c207e3 100644
 --- a/gdb/value.c
 +++ b/gdb/value.c
 @@ -37,8 +37,10 @@
@@ -27857,7 +27857,7 @@ index 97f236c..8af6ae1 100644
  

  /* Internal variables.  These are variables within the debugger
     that hold values assigned by debugger commands.
-@@ -1363,6 +1413,37 @@ call_internal_function (struct gdbarch *gdbarch,
+@@ -1364,6 +1414,40 @@ call_internal_function (struct gdbarch *gdbarch,
    return (*ifn->handler) (gdbarch, language, ifn->cookie, argc, argv);
  }
  
@@ -27876,10 +27876,13 @@ index 97f236c..8af6ae1 100644
 +	type_mark_used (value_type (var->u.value));
 +	break;
 +
-+      case INTERNALVAR_SCALAR:
-+	type_mark_used (var->u.scalar.type);
++      case INTERNALVAR_INTEGER:
++	type_mark_used (var->u.integer.type);
 +	break;
 +
++      case INTERNALVAR_POINTER:
++	type_mark_used (var->u.pointer.type);
++	break;
 +      }
 +
 +  for (chunk = value_history_chain; chunk != NULL; chunk = chunk->next)
@@ -27895,7 +27898,7 @@ index 97f236c..8af6ae1 100644
  /* The 'function' command.  This does nothing -- it is just a
     placeholder to let "help function NAME" work.  This is also used as
     the implementation of the sub-command that is created when
-@@ -1410,11 +1491,10 @@ preserve_one_value (struct value *value, struct objfile *objfile,
+@@ -1411,11 +1495,10 @@ preserve_one_value (struct value *value, struct objfile *objfile,
  		    htab_t copied_types)
  {
    if (TYPE_OBJFILE (value->type) == objfile)
@@ -27909,16 +27912,23 @@ index 97f236c..8af6ae1 100644
  						 copied_types);
  }
  
-@@ -1429,7 +1509,7 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile,
-     case INTERNALVAR_SCALAR:
-       if (var->u.scalar.type && TYPE_OBJFILE (var->u.scalar.type) == objfile)
- 	var->u.scalar.type
--	  = copy_type_recursive (objfile, var->u.scalar.type, copied_types);
-+	  = copy_type_recursive (var->u.scalar.type, copied_types);
+@@ -1430,13 +1513,13 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile,
+     case INTERNALVAR_INTEGER:
+       if (var->u.integer.type && TYPE_OBJFILE (var->u.integer.type) == objfile)
+ 	var->u.integer.type
+-	  = copy_type_recursive (objfile, var->u.integer.type, copied_types);
++	  = copy_type_recursive (var->u.integer.type, copied_types);
+       break;
+ 
+     case INTERNALVAR_POINTER:
+       if (TYPE_OBJFILE (var->u.pointer.type) == objfile)
+ 	var->u.pointer.type
+-	  = copy_type_recursive (objfile, var->u.pointer.type, copied_types);
++	  = copy_type_recursive (var->u.pointer.type, copied_types);
        break;
  
      case INTERNALVAR_VALUE:
-@@ -1831,6 +1911,8 @@ value_change_enclosing_type (struct value *val, struct type *new_encl_type)
+@@ -1838,6 +1921,8 @@ value_change_enclosing_type (struct value *val, struct type *new_encl_type)
      val->contents =
        (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type));
  
@@ -27927,7 +27937,7 @@ index 97f236c..8af6ae1 100644
    val->enclosing_type = new_encl_type;
    return val;
  }
-@@ -1895,6 +1977,8 @@ value_primitive_field (struct value *arg1, int offset,
+@@ -1902,6 +1987,8 @@ value_primitive_field (struct value *arg1, int offset,
  	  memcpy (value_contents_all_raw (v), value_contents_all_raw (arg1),
  		  TYPE_LENGTH (value_enclosing_type (arg1)));
  	}
@@ -27936,7 +27946,7 @@ index 97f236c..8af6ae1 100644
        v->type = type;
        v->offset = value_offset (arg1);
        v->embedded_offset = (offset + value_embedded_offset (arg1)
-@@ -2145,6 +2229,42 @@ pack_long (gdb_byte *buf, struct type *type, LONGEST num)
+@@ -2152,6 +2239,42 @@ pack_long (gdb_byte *buf, struct type *type, LONGEST num)
  }
  
  
@@ -27979,7 +27989,7 @@ index 97f236c..8af6ae1 100644
  /* Convert C numbers into newly allocated values.  */
  
  struct value *
-@@ -2158,6 +2278,19 @@ value_from_longest (struct type *type, LONGEST num)
+@@ -2165,6 +2288,19 @@ value_from_longest (struct type *type, LONGEST num)
  }
  
  
@@ -27999,7 +28009,7 @@ index 97f236c..8af6ae1 100644
  /* Create a value representing a pointer of type TYPE to the address
     ADDR.  */
  struct value *
-@@ -2316,4 +2449,8 @@ VARIABLE is already initialized."));
+@@ -2323,4 +2459,8 @@ VARIABLE is already initialized."));
    add_prefix_cmd ("function", no_class, function_command, _("\
  Placeholder command for showing help on convenience functions."),
  		  &functionlist, "function ", 0, &cmdlist);


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.377
retrieving revision 1.378
diff -u -p -r1.377 -r1.378
--- gdb.spec	18 Aug 2009 19:37:35 -0000	1.377
+++ gdb.spec	19 Aug 2009 16:19:15 -0000	1.378
@@ -14,7 +14,7 @@ Version: 6.8.50.20090818
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 3%{?_with_upstream:.upstream}%{?dist}
+Release: 4%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+
 Group: Development/Debuggers
@@ -219,7 +219,7 @@ Patch229: gdb-6.3-bz140532-ppc-unwinding
 Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
 
 # Backported post gdb-6.8.50.20090818 snapshot fixups.
-#Patch232: gdb-6.8.50.20090818-upstream.patch
+Patch232: gdb-6.8.50.20090818-upstream.patch
 
 # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
 Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch
@@ -444,7 +444,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc
 
 %if 0%{!?_with_upstream:1}
 
-#patch232 -p1
+%patch232 -p1
 %patch349 -p1
 %patch1 -p1
 %patch3 -p1
@@ -821,6 +821,10 @@ fi
 %endif
 
 %changelog
+* Wed Aug 19 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090818-4
+- Fixup "bad type" internal error, import from FSF GDB.
+- archer-jankratochvil-fedora12 commit: 2ba2bc451eb832182ef84c3934115de7a329da7c
+
 * Tue Aug 18 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090818-3
 - archer-jankratochvil-fedora12 commit: 850e3cb38a25cb7fdfa4cef667626ffbde51bcac
 - Fix the hardware watchpoints.




More information about the fedora-extras-commits mailing list