public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer: Merge commit 'origin/archer-jankratochvil-misc' into archer
@ 2009-03-09 22:12 jkratoch
  0 siblings, 0 replies; 7+ messages in thread
From: jkratoch @ 2009-03-09 22:12 UTC (permalink / raw)
  To: archer-commits

The branch, archer has been updated
       via  a99e30d08ade4a2df0f943b036cd653bcd12b04d (commit)
       via  6d9d76db272654e4d50af4f2403dfba0c2df7c19 (commit)
      from  ec29855686f2a78d90ebcc63765681249bbbe808 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit a99e30d08ade4a2df0f943b036cd653bcd12b04d
Merge: ec29855686f2a78d90ebcc63765681249bbbe808 6d9d76db272654e4d50af4f2403dfba0c2df7c19
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 9 23:11:43 2009 +0100

    Merge commit 'origin/archer-jankratochvil-misc' into archer

-----------------------------------------------------------------------

Summary of changes:
 gdb/breakpoint.c                     |   43 ++++++++++++---
 gdb/testsuite/gdb.cp/expand-sals.cc  |   53 ++++++++++++++++++
 gdb/testsuite/gdb.cp/expand-sals.exp |  100 ++++++++++++++++++++++++++++++++++
 3 files changed, 188 insertions(+), 8 deletions(-)
 create mode 100644 gdb/testsuite/gdb.cp/expand-sals.cc
 create mode 100644 gdb/testsuite/gdb.cp/expand-sals.exp

First 500 lines of diff:
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 38a17a1..531c43d 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -5482,7 +5482,6 @@ expand_line_sal_maybe (struct symtab_and_line sal)
   struct symtabs_and_lines expanded;
   CORE_ADDR original_pc = sal.pc;
   char *original_function = NULL;
-  int found;
   int i;
 
   /* If we have explicit pc, don't expand.
@@ -5558,14 +5557,42 @@ expand_line_sal_maybe (struct symtab_and_line sal)
 
   if (original_pc)
     {
-      found = 0;
+      /* Find all the other PCs for a line of code with multiple instances
+	 (locations).  If the instruction is in the middle of an instruction
+	 block for source line GDB cannot safely find the same instruction in
+	 the other compiled instances of the same source line because the other
+	 instances may have been compiled completely differently.
+
+	 The testcase gdb.cp/expand-sals.exp shows that breaking at the return
+	 address in a caller of the current frame works for the current
+	 instance but the breakpoint cannot catch the point (instruction) where
+	 the callee returns in the other compiled instances of this source line.
+
+	 The current implementation will place the breakpoint at the expected
+	 returning address of the current instance of the caller.  But the
+	 other instances will get the breakpoint at the first instruction of
+	 the source line - therefore before the call would be made.  Another
+	 possibility would be to place the breakpoint in the other instances at
+	 the start of the next source line.
+
+	 A possible heuristics would compare the instructions length of each of
+	 the instances of the current source line and if it matches it would
+	 place the breakpoint at the same offset.  Unfortunately a mistaken
+	 guess would possibly crash the inferior.  */
+
+      CORE_ADDR best = -1;
+
+      /* Find the nearest preceding PC and set it to ORIGINAL_PC.  */
       for (i = 0; i < expanded.nelts; ++i)
-	if (expanded.sals[i].pc == original_pc)
-	  {
-	    found = 1;
-	    break;
-	  }
-      gdb_assert (found);
+	if (expanded.sals[i].pc <= original_pc
+	    && (best == -1 || expanded.sals[best].pc < expanded.sals[i].pc))
+	  best = i;
+
+      if (best == -1)
+	error (_("Cannot find the best address for %s out of the %d locations"),
+	       paddr (original_pc), expanded.nelts);
+
+      expanded.sals[best].pc = original_pc;
     }
 
   return expanded;
diff --git a/gdb/testsuite/gdb.cp/expand-sals.cc b/gdb/testsuite/gdb.cp/expand-sals.cc
new file mode 100644
index 0000000..6169a05
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/expand-sals.cc
@@ -0,0 +1,53 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright (C) 2009 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/>.  */
+
+int
+func ()
+{
+  return 42;	/* func-line */
+}
+
+volatile int global_x;
+
+class A
+{
+public:
+  A ()
+    {
+      global_x = func ();	/* caller-line */
+    }
+};
+
+/* class B is here just to make the `func' calling line above having multiple
+   instances - multiple locations.  Template cannot be used as its instances
+   would have different function names which get discarded by GDB
+   expand_line_sal_maybe.  */
+
+class B : public A
+{
+};
+
+int
+main (void)
+{
+  A a;
+  B b;
+
+  return 0;	/* exit-line */
+}
diff --git a/gdb/testsuite/gdb.cp/expand-sals.exp b/gdb/testsuite/gdb.cp/expand-sals.exp
new file mode 100644
index 0000000..a2631fb
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/expand-sals.exp
@@ -0,0 +1,100 @@
+# Copyright 2009 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if { [skip_cplus_tests] } { continue }
+
+set srcfile expand-sals.cc
+if { [prepare_for_testing expand-sals.exp expand-sals $srcfile {debug c++}] } {
+    return -1
+}
+if ![runto_main] {
+    return -1
+}
+
+gdb_breakpoint [gdb_get_line_number "exit-line"]
+
+gdb_breakpoint [gdb_get_line_number "func-line"]
+gdb_continue_to_breakpoint "func" ".*func-line.*"
+
+gdb_test "up" "caller-line.*"
+
+# PC should not be at the boundary of source lines to make the original bug
+# exploitable.
+
+set test "p/x \$pc"
+set pc {}
+gdb_test_multiple $test $test {
+    -re "\\$\[0-9\]+ = (0x\[0-9a-f\]+)\r\n$gdb_prompt $" {
+	set pc $expect_out(1,string)
+	pass $test
+    }
+}
+
+set test "info line"
+set end {}
+gdb_test_multiple $test $test {
+    -re "Line \[0-9\]+ of .* starts at address 0x\[0-9a-f\]+.* and ends at (0x\[0-9a-f\]+).*\\.\r\n$gdb_prompt $" {
+	set end $expect_out(1,string)
+	pass $test
+    }
+}
+
+set test "caller line has trailing code"
+if {$pc != $end} {
+    pass $test
+} else {
+    fail $test
+}
+
+# Original problem was an internal error here.  Still sanity multiple locations
+# were found at this code place as otherwise this test would not test anything.
+set test "break"
+gdb_test_multiple $test $test {
+    -re "Breakpoint \[0-9\]+ at .*, line \[0-9\]+\\. \\(\[2-9\] locations\\)\r\n$gdb_prompt $" {
+	pass $test
+    }
+    -re "Breakpoint \[0-9\]+ at .*, line \[0-9\]+\\.\r\n$gdb_prompt $" {
+	# It just could not be decided if GDB is OK by this testcase.
+	setup_xfail *-*-*
+	fail $test
+	return 0
+    }
+}
+
+gdb_continue_to_breakpoint "caller" ".*caller-line.*"
+
+# Test GDB caught this return call and not the next one through B::B()
+gdb_test "bt" \
+	 "#0 \[^\r\n\]* A \[^\r\n\]*\r\n#1 \[^\r\n\]* main \[^\r\n\]*" \
+	 "bt from A"
+
+gdb_continue_to_breakpoint "next caller instance" ".*caller-line.*"
+
+# Test that GDB caught now already A through B::B() in the other instance.
+# As discussed in GDB expand_line_sal_maybe it would more match the original
+# instance behavior to catch here the `func' breakpoint and catch the
+# multiple-locations breakpoint only during the call return.  This is not the
+# case, expecting here to catch the breakpoint before the call happens.
+
+gdb_test "bt" \
+	 "#0 \[^\r\n\]* A \[^\r\n\]*\r\n#1 \[^\r\n\]* B \[^\r\n\]*\r\n#2 \[^\r\n\]* main \[^\r\n\]*" \
+	 "bt from B before the call"
+
+gdb_continue_to_breakpoint "next caller func" ".*func-line.*"
+
+# Verify GDB really could not catch the originally intended point of the return
+# from func.
+
+gdb_continue_to_breakpoint "uncaught return" ".*exit-line.*"


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [SCM]  archer: Merge commit 'origin/archer-jankratochvil-misc' into archer
@ 2009-03-30 17:22 jkratoch
  0 siblings, 0 replies; 7+ messages in thread
From: jkratoch @ 2009-03-30 17:22 UTC (permalink / raw)
  To: archer-commits

The branch, archer has been updated
       via  1ffc3d262e82dca2cda7161d077daf504c83049d (commit)
       via  40eb49471d238095a443b0bc52d02723130c2537 (commit)
       via  0adf45a975c950b336e60ae9b6707a03b214cb08 (commit)
       via  21a8e954408460987eb5c5b3c6005ed05ef205cb (commit)
       via  0d0dcd08bf84e52e3dd43b37a3b06eb2f934291d (commit)
       via  6332d6a7d94e223d42f981701e703e549e36915b (commit)
       via  ace893b9443896a2f15aaece99d59d406cbd58c7 (commit)
       via  4cbedfdc756e827c0cad49a43e68917487988b3c (commit)
       via  823ab34a0473db7f19cf665998afbb8763533ff1 (commit)
      from  0bd30605d0f86a62c7dfa2f127b242bcbbe0e818 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 1ffc3d262e82dca2cda7161d077daf504c83049d
Merge: 40eb49471d238095a443b0bc52d02723130c2537 21a8e954408460987eb5c5b3c6005ed05ef205cb
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 30 19:22:00 2009 +0200

    Merge commit 'origin/archer-jankratochvil-misc' into archer

commit 40eb49471d238095a443b0bc52d02723130c2537
Merge: 0d0dcd08bf84e52e3dd43b37a3b06eb2f934291d 0adf45a975c950b336e60ae9b6707a03b214cb08
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 30 19:21:55 2009 +0200

    Merge commit 'origin/archer-jankratochvil-python' into archer

commit 0d0dcd08bf84e52e3dd43b37a3b06eb2f934291d
Merge: 0bd30605d0f86a62c7dfa2f127b242bcbbe0e818 6332d6a7d94e223d42f981701e703e549e36915b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 30 19:03:24 2009 +0200

    Merge commit 'origin/archer-jankratochvil-misc' into archer

-----------------------------------------------------------------------

Summary of changes:
 gdb/doc/gdb.texinfo                            |   41 +++---
 gdb/dwarf2read.c                               |    2 +-
 gdb/python/python-frame.c                      |   59 ++++-----
 gdb/symtab.h                                   |    8 +-
 gdb/testsuite/gdb.arch/powerpc-power7.exp      |   25 +++-
 gdb/testsuite/gdb.base/nodebug.exp             |    7 -
 gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c |   46 +++++++
 gdb/testsuite/gdb.dwarf2/dw2-unresolved.S      |  171 ++++++++++++++++++++++++
 gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp    |   41 ++++++
 gdb/testsuite/gdb.python/python-frame.exp      |   12 +-
 10 files changed, 338 insertions(+), 74 deletions(-)
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-unresolved.S
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp

First 500 lines of diff:
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index c711d3d..63844a2 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -19690,32 +19690,36 @@ separated by newlines.  If there are no commands, this attribute is
 @cindex frames in python
 @tindex gdb.Frame
 @tindex Frame
-When the debugged program stops, @value{GDBN} is able to analyse its call
+When the debugged program stops, @value{GDBN} is able to analyze its call
 stack (@pxref{Frames,,Stack frames}).  The @code{gdb.Frame} class
 represents a frame in the stack.  A @code{gdb.Frame} object is only valid
 while its corresponding frame exists in the inferior's stack.  If you try
-to use an invalid frame object, a @code{RuntimeError} exception will be
-thrown.
+to use an invalid frame object, @value{GDBN} will throw a @code{RuntimeError}
+exception.
+
+Two @code{gdb.Frame} objects can be compared for equality with the @code{==}
+operator, like:
+
+@smallexample
+(@value{GDBP}) python print gdb.newest_frame() == gdb.selected_frame ()
+True
+@end smallexample
 
 The following frame-related functions are available in the @code{gdb} module:
 
-@findex gdb.frames
 @defun frames
 Return a tuple containing all frame objects.
 @end defun
 
-@findex gdb.newest_frame
 @defun newest_frame
 Return the newest frame object.
 @end defun
 
-@findex gdb.selected_frame
 @defun selected_frame
 Return the selected frame object.  (@pxref{Selection,,Selecting a Frame}).
 @end defun
 
-@findex gdb.frame_stop_reason_string
-@defun frame_stop_reason_string @var{reason}
+@defun frame_stop_reason_string reason
 Return a string explaining the reason why @value{GDBN} stopped unwinding
 frames, as expressed by the given @var{reason} code (an integer, see the
 @code{unwind_stop_reason} method further down in this section).
@@ -19724,15 +19728,11 @@ frames, as expressed by the given @var{reason} code (an integer, see the
 A @code{gdb.Frame} object has the following methods:
 
 @table @code
-@defmethod Frame equals @code{frame}
-Compare frames.
-@end defmethod
-
 @defmethod Frame is_valid
 Returns true if the @code{gdb.Frame} object is valid, false if not.
 A frame object can become invalid if the frame it refers to doesn't
 exist anymore in the inferior.  All @code{gdb.Frame} methods will throw
-an exception if it is invalid at the time the method call is made.
+an exception if it is invalid at the time the method is called.
 @end defmethod
 
 @defmethod Frame name
@@ -19741,15 +19741,16 @@ obtained.
 @end defmethod
 
 @defmethod Frame type
-Returns the type of the frame. The value can be one of
+Returns the type of the frame.  The value can be one of
 @code{gdb.NORMAL_FRAME}, @code{gdb.DUMMY_FRAME}, @code{gdb.SIGTRAMP_FRAME}
 or @code{gdb.SENTINEL_FRAME}.
 @end defmethod
 
 @defmethod Frame unwind_stop_reason
 Return an integer representing the reason why it's not possible to find
-frames older than this.  Use @code{gdb.frame_stop_reason_string} to convert
-the value returned by this function to a string.
+more frames toward the outermost frame.  Use
+@code{gdb.frame_stop_reason_string} to convert the value returned by this
+function to a string.
 @end defmethod
 
 @defmethod Frame pc
@@ -19765,19 +19766,19 @@ Returns the symbol for the function corresponding to this frame. @c (@pxref{Symb
 @end defmethod
 
 @defmethod Frame older
-Return the frame immediately older (outer) to this frame.
+Return the frame that called this frame.
 @end defmethod
 
 @defmethod Frame newer
-Return the frame immediately newer (inner) to this frame.
+Return the frame called by this frame.
 @end defmethod
 
 @defmethod Frame find_sal
 Return the frame's symtab and line object. @c (@pxref{Symtab_and_line,, Symtab and line}).
 @end defmethod
 
-@defmethod Frame read_var @var{variable}
-Return the value of the given variable in this frame.  @code{variable} can be
+@defmethod Frame read_var variable
+Return the value of the given variable in this frame.  @var{variable} can be
 either a string or a @code{gdb.Symbol} object. @c (@pxref{Symbols In Python}).
 @end defmethod
 @end table
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 2ba61f4..625c416 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -8367,7 +8367,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
 		  && dwarf2_attr (die, DW_AT_type, cu) != NULL)
 		{
 		  SYMBOL_CLASS (sym) = LOC_UNRESOLVED;
-		  add_symbol_to_list (sym, &global_symbols);
+		  add_symbol_to_list (sym, cu->list_in_scope);
 		}
 	      else if (!die_is_declaration (die, cu))
 		{
diff --git a/gdb/python/python-frame.c b/gdb/python/python-frame.c
index 4b76709..6c33e65 100644
--- a/gdb/python/python-frame.c
+++ b/gdb/python/python-frame.c
@@ -109,31 +109,6 @@ frapy_is_valid (PyObject *self, PyObject *args)
   Py_RETURN_TRUE;
 }
 
-/* Implementation of gdb.Frame.equals (self, other) -> Boolean. */
-
-static PyObject *
-frapy_equal_p (PyObject *self, PyObject *args)
-{
-  int equalp = 0;	  /* Initialize to appease gcc warning.  */
-  frame_object *self_frame = (frame_object *) self;
-  frame_object *other;
-  volatile struct gdb_exception except;
-
-  if (!PyArg_ParseTuple (args, "O!", &frame_object_type, &other))
-    return NULL;
-
-  TRY_CATCH (except, RETURN_MASK_ALL)
-    {
-      equalp = frame_id_eq (self_frame->frame_id, other->frame_id);
-    }
-  GDB_PY_HANDLE_EXCEPTION (except);
-
-  if (equalp)
-    Py_RETURN_TRUE;
-
-  Py_RETURN_FALSE;
-}
-
 /* Implementation of gdb.Frame.name (self) -> String.
    Returns the name of the function corresponding to this frame.  */
 
@@ -581,6 +556,31 @@ gdbpy_frame_stop_reason_string (PyObject *self, PyObject *args)
   return PyUnicode_Decode (str, strlen (str), host_charset (), NULL);
 }
 
+/* Implements the equality comparison for Frame objects.
+   All other comparison operators will throw a TypeError Python exception,
+   as they aren't valid for frames.  */
+
+static PyObject *
+frapy_richcompare (PyObject *self, PyObject *other, int op)
+{
+  if (!PyObject_TypeCheck (other, &frame_object_type))
+    {
+      PyErr_SetString (PyExc_TypeError, "Frame object expected in comparison.");
+      return NULL;
+    }
+  else if (op != Py_EQ)
+    {
+      PyErr_SetString (PyExc_TypeError, "Invalid comparison for gdb.Frame.");
+      return NULL;
+    }
+
+  if (frame_id_eq (((frame_object *) self)->frame_id,
+		   ((frame_object *) other)->frame_id))
+    Py_RETURN_TRUE;
+
+  Py_RETURN_FALSE;
+}
+
 /* Sets up the Frame API in the gdb module.  */
 
 void
@@ -616,9 +616,6 @@ gdbpy_initialize_frames (void)
 \f
 
 static PyMethodDef frame_object_methods[] = {
-  { "equals", frapy_equal_p, METH_VARARGS,
-    "equals (frame) -> Boolean.\n\
-Compare this frame to the given frame." },
   { "is_valid", frapy_is_valid, METH_NOARGS,
     "is_valid () -> Boolean.\n\
 Return true if this frame is valid, false if not." },
@@ -642,10 +639,10 @@ Return the frame's code block." },
 Returns the symbol for the function corresponding to this frame." },
   { "older", frapy_older, METH_NOARGS,
     "older () -> gdb.Frame.\n\
-Return the frame immediately older (outer) to this frame." },
+Return the frame that called this frame." },
   { "newer", frapy_newer, METH_NOARGS,
     "newer () -> gdb.Frame.\n\
-Return the frame immetidaely newer (inner) to this frame." },
+Return the frame called by this frame." },
   { "find_sal", frapy_find_sal, METH_NOARGS,
     "find_sal () -> gdb.Symtab_and_line.\n\
 Return the frame's symtab and line." },
@@ -680,7 +677,7 @@ static PyTypeObject frame_object_type = {
   "GDB frame object",		  /* tp_doc */
   0,				  /* tp_traverse */
   0,				  /* tp_clear */
-  0,				  /* tp_richcompare */
+  frapy_richcompare,		  /* tp_richcompare */
   0,				  /* tp_weaklistoffset */
   0,				  /* tp_iter */
   0,				  /* tp_iternext */
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 06bf7e8..801cd2b 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -472,7 +472,13 @@ enum address_class
      in another object file or runtime common storage.
      The linker might even remove the minimal symbol if the global
      symbol is never referenced, in which case the symbol remains
-     unresolved.  */
+     unresolved.
+     
+     GDB would normally find the symbol in the minimal symbol table if it will
+     not find it in the full symbol table.  But a reference to an external
+     symbol in a local block shadowing other definition requires full symbol
+     without possibly having its address available for LOC_STATIC.  Testcase
+     is provided as `gdb.dwarf2/dw2-unresolved.exp'.  */
 
   LOC_UNRESOLVED,
 
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7.exp b/gdb/testsuite/gdb.arch/powerpc-power7.exp
index d9c48f9..ae301db 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power7.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power7.exp
@@ -47,14 +47,23 @@ gdb_test_multiple $test $test {
     }
 }
 
-proc func_check {offset instr} {
+proc instr_to_patt {offset instr} {
+    # 0x0000000000000018 <func+24>:	stxvd2x vs43,r4,r5
+    return ".*\r\n[string map {0x 0x0*} $offset] <func\\+?\[0-9\]*>:\[ \t\]*[string map [list { } "\[ \t\]+" . {\.}] $instr]\[ \t\]*\r\n.*"
+}
+
+# KFAIL strings would not exist if -Many would print the same as -Mpower7.
+# That means the power7 form should be the preferred one.
+# http://sourceware.org/ml/gdb-patches/2009-03/threads.html#00020
+
+proc func_check {offset instr {kfail ""}} {
     global func
 
-    # 0x0000000000000018 <func+24>:	stxvd2x vs43,r4,r5
-    set patt ".*\r\n[string map {0x 0x0*} $offset] <func\\+?\[0-9\]*>:\[ \t\]*[string map [list { } "\[ \t\]+" . {\.}] $instr]\[ \t\]*\r\n.*"
     set test "Found $offset: $instr"
-    if [regexp -nocase -line $patt $func] {
+    if [regexp -nocase -line [instr_to_patt $offset $instr] $func] {
 	pass $test
+    } elseif {$kfail != "" && [regexp -nocase -line [instr_to_patt $offset $kfail] $func]} {
+	kfail gdb/NNNN $test
     } else {
 	fail $test
     }
@@ -98,8 +107,8 @@ func_check  0x88 "sleep"
 func_check  0x8c "rvwinkle"
 func_check  0x90 "prtyw   r3,r4"
 func_check  0x94 "prtyd   r13,r14"
-func_check  0x98 "mfcfar  r10"
-func_check  0x9c "mtcfar  r11"
+func_check  0x98 "mfcfar  r10"           "mfspr   r10,28"
+func_check  0x9c "mtcfar  r11"           "mtspr   28,r11"
 func_check  0xa0 "cmpb    r3,r4,r5"
 func_check  0xa4 "lwzcix  r10,r11,r12"
 func_check  0xa8 "dadd    f16,f17,f18"
@@ -143,8 +152,8 @@ func_check 0x13c "ftdiv   cr0,f10,f11"
 func_check 0x140 "ftdiv   cr7,f10,f11"
 func_check 0x144 "ftsqrt  cr0,f10"
 func_check 0x148 "ftsqrt  cr7,f10"
-func_check 0x14c "dcbtt   r8,r9"
-func_check 0x150 "dcbtstt r8,r9"
+func_check 0x14c "dcbtt   r8,r9"         "dcbt    16,r8,r9"
+func_check 0x150 "dcbtstt r8,r9"         "dcbtst  16,r8,r9"
 func_check 0x154 "dcffix  f10,f12"
 func_check 0x158 "dcffix. f20,f22"
 func_check 0x15c "lbarx   r10,r11,r12"
diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.exp
index 31fb88e..4c01be4 100644
--- a/gdb/testsuite/gdb.base/nodebug.exp
+++ b/gdb/testsuite/gdb.base/nodebug.exp
@@ -215,12 +215,5 @@ if [runto inner] then {
     if [runto middle] then {
 	gdb_test "backtrace 10" "#0.*middle.*#1.*top.*#2.*main.*" \
 	    "backtrace from middle in nodebug.exp"
-
-	# Test return from a function with no debug info (symbol; still it may
-	# have a minimal-symbol).  In gdb.base/return*.exp we would need to
-	# build a separate executable with no "debug" option.
-	gdb_test "return 0" "#0 .* top \\(.*"				     \
-		 "return from function with no debug info"		     \
-		 "Make selected stack frame return now\\? \\(y or n\\) " "y"
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c b/gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c
new file mode 100644
index 0000000..c24eb96
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c
@@ -0,0 +1,46 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2009 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
+
+asm (".globl cu_text_start");
+asm ("cu_text_start:");
+
+int
+main (void)
+{
+  unsigned char var = 1;
+
+  if (var != 1)
+    abort ();
+  {
+    extern unsigned char var;
+
+    /* Do not rely on the `extern' DIE output by GCC (GCC PR debug/39563).  */
+asm (".globl extern_block_start");
+asm ("extern_block_start:");
+    if (var != 2)
+      abort ();
+asm (".globl extern_block_end");
+asm ("extern_block_end:");
+  }
+
+  return 0;
+}
+
+asm (".globl cu_text_end");
+asm ("cu_text_end:");
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.S b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.S
new file mode 100644
index 0000000..4c098f3
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.S
@@ -0,0 +1,171 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+	.data
+
+/* VAR1 is wrong here, in the real inferior it is located on stack.  As both
+   places are never modified and they are initialized to the same value it
+   makes no difference.  Ensure the name clash for "var".  */
+var1:	.byte	1
+
+	.globl	var
+var:	.byte	2
+
+/* Debug information */
+
+	.section .debug_info
+.Lcu1_begin:
+	/* CU header */
+	.4byte	.Lcu1_end - .Lcu1_start		/* Length of Compilation Unit */
+.Lcu1_start:
+	.2byte	2				/* DWARF Version */
+	.4byte	.Labbrev1_begin			/* Offset into abbrev section */
+	.byte	4				/* Pointer size */
+
+	/* CU die */
+	.uleb128 1				/* Abbrev: DW_TAG_compile_unit */
+	.4byte	cu_text_end			/* DW_AT_high_pc */
+	.4byte	cu_text_start			/* DW_AT_low_pc */
+	.ascii	"dw2-unresolved-main.c\0"	/* DW_AT_name */
+	.ascii	"GNU C 4.3.2\0"			/* DW_AT_producer */
+	.byte	1				/* DW_AT_language (C) */
+
+.Ltype_uchar:
+	.uleb128	2			/* Abbrev: DW_TAG_base_type */
+	.ascii		"unsigned char\0"	/* DW_AT_name */
+	.byte		1			/* DW_AT_byte_size */
+	.byte		7			/* DW_AT_encoding */
+
+	/* main */
+	.uleb128	3			/* Abbrev: DW_TAG_subprogram */
+	.byte		1			/* DW_AT_decl_file */
+	.byte		2			/* DW_AT_decl_line */
+	.ascii		"main\0"		/* DW_AT_name */
+	.4byte		.Ltype_uchar-.Lcu1_begin	/* DW_AT_type */
+	.4byte		cu_text_start		/* DW_AT_low_pc */
+	.4byte		cu_text_end		/* DW_AT_high_pc */
+
+	.uleb128	4			/* Abbrev: DW_TAG_variable (location) */
+	.ascii		"var\0"			/* DW_AT_name */
+	.byte		2f - 1f			/* DW_AT_location */
+1:	.byte		3			/*   DW_OP_addr */
+/* See VAR1 definition why this DIE is not correct.  */
+	.4byte		var1			/*   <addr> */
+2:	.4byte		.Ltype_uchar-.Lcu1_begin	/* DW_AT_type */
+
+	.uleb128	6			/* Abbrev: DW_TAG_lexical_block */
+	.4byte		extern_block_start	/* DW_AT_low_pc */
+	.4byte		extern_block_end	/* DW_AT_high_pc */
+
+	.uleb128	5			/* Abbrev: DW_TAG_variable (extern) */
+	.ascii		"var\0"			/* DW_AT_name */
+	.4byte		.Ltype_uchar-.Lcu1_begin	/* DW_AT_type */
+	.byte		1			/* DW_AT_external */
+
+	.byte		0			/* End of children of the lexical block */
+
+	.byte		0			/* End of children of main */
+
+	.byte		0			/* End of children of CU */
+
+.Lcu1_end:
+
+/* Abbrev table */
+	.section .debug_abbrev
+.Labbrev1_begin:
+	.uleb128	1			/* Abbrev code */
+	.uleb128	0x11			/* DW_TAG_compile_unit */
+	.byte		1			/* has_children */
+	.uleb128	0x12			/* DW_AT_high_pc */
+	.uleb128	0x1			/* DW_FORM_addr */
+	.uleb128	0x11			/* DW_AT_low_pc */
+	.uleb128	0x1			/* DW_FORM_addr */
+	.uleb128	0x3			/* DW_AT_name */
+	.uleb128	0x8			/* DW_FORM_string */
+	.uleb128	0x25			/* DW_AT_producer */
+	.uleb128	0x8			/* DW_FORM_string */
+	.uleb128	0x13			/* DW_AT_language */
+	.uleb128	0xb			/* DW_FORM_data1 */
+	.byte		0x0			/* Terminator */
+	.byte		0x0			/* Terminator */
+
+	.uleb128	2			/* Abbrev code */
+	.uleb128	0x24			/* DW_TAG_base_type */
+	.byte		0			/* has_children */
+	.uleb128	0x3			/* DW_AT_name */
+	.uleb128	0x8			/* DW_FORM_string */
+	.uleb128	0xb			/* DW_AT_byte_size */
+	.uleb128	0xb			/* DW_FORM_data1 */
+	.uleb128	0x3e			/* DW_AT_encoding */
+	.uleb128	0xb			/* DW_FORM_data1 */
+	.byte		0x0			/* Terminator */
+	.byte		0x0			/* Terminator */
+
+	.uleb128	3			/* Abbrev code */
+	.uleb128	0x2e			/* DW_TAG_subprogram */
+	.byte		1			/* has_children */
+	.uleb128	0x3a			/* DW_AT_decl_file */
+	.uleb128	0xb			/* DW_FORM_data1 */
+	.uleb128	0x3b			/* DW_AT_decl_line */
+	.uleb128	0xb			/* DW_FORM_data1 */
+	.uleb128	0x3			/* DW_AT_name */
+	.uleb128	0x8			/* DW_FORM_string */
+	.uleb128	0x49			/* DW_AT_type */
+	.uleb128	0x13			/* DW_FORM_ref4 */
+	.uleb128	0x11			/* DW_AT_low_pc */


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [SCM]  archer: Merge commit 'origin/archer-jankratochvil-misc' into archer
@ 2009-03-20 17:07 jkratoch
  0 siblings, 0 replies; 7+ messages in thread
From: jkratoch @ 2009-03-20 17:07 UTC (permalink / raw)
  To: archer-commits

The branch, archer has been updated
       via  1766bf14929c3a3638e14073b5577cce4d49a146 (commit)
       via  c6e2af6188a2739f47617648b4228cfed8670385 (commit)
       via  5e553480d633af0afb7c1f5637045536946474d1 (commit)
       via  ced80d48e949c8b85c2960e96756ecd1071d08f9 (commit)
       via  0818a5c5da713fd16039c28fc994df47006fa7cf (commit)
       via  a68c6b5270cb88e69b44a6d3dafacc0e6fc89de5 (commit)
       via  4080b50b2da5e473048adb7ffd3de24433ba656e (commit)
       via  9640dcec5549aabe60d6e0bb71264195d243990f (commit)
       via  c325065ffe6bddac7001ea5f670867e078a9d51a (commit)
       via  7106f1d0117d444f3eccb83c74fde7c36e41a882 (commit)
       via  5a67455b533bcb2ad274f9e45f650008c9eeca28 (commit)
       via  728867ce2db30336db87da676bcf9bb7bf18f3f9 (commit)
       via  c27fa6c58ca5189d4f7707a48f86ea381b1b5c33 (commit)
       via  3807d1423919f50d09e9dc6fefe0e92cdb4ebb0e (commit)
       via  9c3b6b68f4102cc3e71e39301026ccd19b6a7b25 (commit)
       via  6418262610197a1d63af6393d077f10fac01304c (commit)
       via  b09f162534e007376ea03e7f075a69a5e2820184 (commit)
       via  67df65cc54808054e45498160f67ce682a9aaa7b (commit)
       via  7075b478c79fa7bf8a95b17474f5f799b0ad5523 (commit)
       via  1e1d73cda98b1adda884b80e07c7b4929c175628 (commit)
       via  cccc77e39b624e4806ecafb83d3e8bb36bed36e9 (commit)
       via  f6c4f4bcef04d0570b54ad5018bee1f18c558f0f (commit)
       via  00c72a380f005f60d894849f75a100aef41a64c5 (commit)
       via  3cac04bb9690610124cae1edaf7c00586e2ff20a (commit)
       via  b9c4946d6ccda8c5822d0477bc97ecf66443c0d8 (commit)
       via  7f8922c7dc999f143e8b5ad96ee0b6da65e9e958 (commit)
       via  feb5906a26ae6ac25421e68af62b980f77d161d2 (commit)
       via  37bf1aa770645ab3651059d21f63d61f35ce8c75 (commit)
       via  35a99eec6383d50976240f9616dfb58261a8c26c (commit)
       via  bdc15da4ffbed38da8cf01bb7e51c4828ddf92bf (commit)
       via  8668207120c7bcd12428005f6ca23e0930c79ccf (commit)
       via  d16cd7f687a1cd6a59c29f2d7d047afa2a36b24a (commit)
       via  9d4c404f085e44f57198b9dd49c19b98438b6312 (commit)
       via  895c727c6f70bc6e1c889e4829c2a2b2bae098dc (commit)
       via  e4e4cf0c68335d414443577034bd1b78e6d6801b (commit)
       via  4a21824c4e5ae0c9de855e459ad213cd3739cbc6 (commit)
       via  a8216bad276394c3b79823f94943e513b8e8da4a (commit)
       via  d74e50a6ebd519021f395b50bbd6288fca11ec7f (commit)
       via  878507e5212b2b26ef6703f9a6caf8a1dacee012 (commit)
       via  41f3f3478ace2386cd55dd7ddaa4b01d07fea4c2 (commit)
       via  828ee76fe6e084e7844b9728fc16b07d80e55bef (commit)
       via  3ee2df87e7214fb741d5ab7997be17a500db8fd5 (commit)
       via  20aea9dca5fa69b9384adc82e74403992583333d (commit)
       via  3eee5409dd191f20d8aa34cf4d0ed8c397e239e1 (commit)
       via  1337af2c5e39e4cd16c98708292db3aa7f166305 (commit)
       via  94a096f938768a4d82f1cbc0f0087cf7945a732c (commit)
       via  80c354acbef216f2f16ff0dc5063e2b2ea62bafc (commit)
       via  0d9c52f7198b5f765f029111132de9aec407391a (commit)
       via  61207893e6ca2d50d5d0cd0177282d0bb5e0a6ae (commit)
       via  1b4eb5ae2d46594bf1fb0ba1639cfe11e6ae30da (commit)
       via  cbc007ab970d823f6b227905750b59854a0b4b29 (commit)
       via  3a6e68ebef6ab5687ecac21cdfba472342ed8a16 (commit)
       via  fd944dcf8360733363a810773e2cf2d1c4c9b64b (commit)
       via  10bb83dbe042456bb001c0f0bd1f891d13600d17 (commit)
       via  462a55658391356ad3238f73eff0986fc5363cf9 (commit)
       via  5c82fe5ff8b977094f1eed336b93b42b2d94e9b8 (commit)
       via  ecc831560c4430bb256b3f1de4901350f3145189 (commit)
       via  62c51403278e51642a9c47ae412b0e20bb1c9a91 (commit)
       via  3f5c6cdd418790ed494542e0b46676a9cdfc51fd (commit)
       via  afe3398d21aeb2db9102943064d3f8f3dca65a78 (commit)
       via  4154ca785ead2ff26e43e11779ba6ec7a2c33e50 (commit)
       via  6e4b1a5d7f013dce3488b8e085602d247db3ecd3 (commit)
       via  d74691357824a02883c9b0fc618ac72605d055bb (commit)
       via  8b968dd733cdad869f9ecf5ee49921f0808eb5c8 (commit)
       via  2a6adb4f5011d2b573c770e37d5b9d46c648756d (commit)
       via  e43e248c3fb96a6d81437a3bf6e76e316dbd85fd (commit)
       via  018ef8b6676a4273b283377ea97315fbf9766569 (commit)
       via  5a6efe76888879ad90c41f4376d4e2ba1969047f (commit)
       via  9f3ba2c986b1dfcbef83e207b04b7a8c36813e22 (commit)
       via  4c665bf01df990b025c2f0d3b48cc25c06aef17e (commit)
       via  bd05934f6fc4af74a26ce299d0c98b9bafab3bee (commit)
       via  188e8d512a5d5b78bfcc7f4bddbf03f97657ca2f (commit)
       via  2ef8938e922a1e1ee34289b2d5b27dd35cf634d3 (commit)
       via  36df8be687fd208ad1af239d5dcdafca6f100dab (commit)
       via  d232f05ca5ebf81feec050cc89a398a1aad194bb (commit)
       via  a815a109a4baa3595efdad89b1bd02a2a5173da2 (commit)
       via  283228f90893965ad467c82e57839e70566b2262 (commit)
       via  61f1c81818350fac95ec24bb30725815101d657f (commit)
       via  d839f4146b052a37a401ddc6c2832a627655a170 (commit)
       via  6717cbae1062bad54a6afc9346c6c7e5592a4cc6 (commit)
       via  f2c7f692bd9bb95b9a36a24149c1bdaa7af38386 (commit)
       via  6ae52b97315e7335557904ecc209ef3ae28cbc00 (commit)
       via  85348bc937acb9e8231604801b7f6f0527138045 (commit)
       via  713d3e48f8e8d699ccc71e1b8ecccbca943d94f3 (commit)
       via  34acffeb667e03ab09051cbdb4cac4d64609bac1 (commit)
       via  fef853a84582f229c0e2af35fd88eb023fd8fee3 (commit)
       via  35aa8b0f44761a36363ee209ab4cda824097f7d5 (commit)
       via  317e9ce1e0dd315fd4dba1858065563e066bf9d9 (commit)
      from  f2a07ac5bb676a5272544caa0d20610fce1c8d7d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 1766bf14929c3a3638e14073b5577cce4d49a146
Merge: 5e553480d633af0afb7c1f5637045536946474d1 c6e2af6188a2739f47617648b4228cfed8670385
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 20 18:07:13 2009 +0100

    Merge commit 'origin/archer-jankratochvil-misc' into archer

commit 5e553480d633af0afb7c1f5637045536946474d1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 20 17:57:05 2009 +0100

    Fix compilation error on *obstack_free conflict.
    
    FSF GDB accepted patch:
    f6c4f4bcef04d0570b54ad5018bee1f18c558f0f
    
    [archer-tromey-charset] patch:
    775b290a7715c0cbbb0dc1c4b9ba46076431a8f1

commit ced80d48e949c8b85c2960e96756ecd1071d08f9
Merge: 0818a5c5da713fd16039c28fc994df47006fa7cf 6418262610197a1d63af6393d077f10fac01304c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 20 15:17:33 2009 +0100

    Merge commit 'origin/master' into archer

commit 0818a5c5da713fd16039c28fc994df47006fa7cf
Merge: a68c6b5270cb88e69b44a6d3dafacc0e6fc89de5 c325065ffe6bddac7001ea5f670867e078a9d51a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 20 15:12:21 2009 +0100

    Merge commit 'origin/archer-jankratochvil-vla' into archer

commit a68c6b5270cb88e69b44a6d3dafacc0e6fc89de5
Merge: 4080b50b2da5e473048adb7ffd3de24433ba656e 9640dcec5549aabe60d6e0bb71264195d243990f
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 20 15:12:16 2009 +0100

    Merge commit 'origin/archer-jankratochvil-python' into archer

commit 4080b50b2da5e473048adb7ffd3de24433ba656e
Merge: 728867ce2db30336db87da676bcf9bb7bf18f3f9 7106f1d0117d444f3eccb83c74fde7c36e41a882
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 20 15:12:13 2009 +0100

    Merge commit 'origin/archer-jankratochvil-type-refcount' into archer

commit 728867ce2db30336db87da676bcf9bb7bf18f3f9
Merge: 3807d1423919f50d09e9dc6fefe0e92cdb4ebb0e c27fa6c58ca5189d4f7707a48f86ea381b1b5c33
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 20 15:07:37 2009 +0100

    Merge commit 'origin/archer-jankratochvil-expr' into archer

commit 3807d1423919f50d09e9dc6fefe0e92cdb4ebb0e
Merge: f2a07ac5bb676a5272544caa0d20610fce1c8d7d b09f162534e007376ea03e7f075a69a5e2820184
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 20 15:06:09 2009 +0100

    Merge commit 'origin/archer-tromey-charset' into archer

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   34 ++
 Makefile.def                                       |   12 +
 Makefile.in                                        |  388 ++++++++++++++++++++
 bfd/ChangeLog                                      |  109 +++++-
 bfd/Makefile.am                                    |   33 +-
 bfd/Makefile.in                                    |   34 +-
 bfd/bfd-in2.h                                      |    4 +
 bfd/coffcode.h                                     |   29 +-
 bfd/config.bfd                                     |    2 -
 bfd/configure                                      |    4 +-
 bfd/configure.in                                   |    4 +-
 bfd/dwarf2.c                                       |    3 +-
 bfd/elf.c                                          |   69 ++++
 bfd/elf32-arm.c                                    |    4 +-
 bfd/elf32-hppa.c                                   |    6 +-
 bfd/elf32-m68hc1x.c                                |    5 +-
 bfd/elf32-s390.c                                   |   33 +-
 bfd/elf32-spu.c                                    |  336 +++++++++--------
 bfd/elf32-spu.h                                    |    9 +-
 bfd/elf64-hppa.c                                   |   26 +--
 bfd/elf64-s390.c                                   |   33 +-
 bfd/section.c                                      |    4 +
 bfd/simple.c                                       |    3 +-
 bfd/som.c                                          |   27 +--
 bfd/targets.c                                      |    4 +-
 bfd/version.h                                      |    2 +-
 bfd/vms-hdr.c                                      |    4 -
 bfd/xsym.c                                         |    5 +-
 configure                                          |   80 +++--
 configure.ac                                       |   68 ++--
 gdb/ChangeLog                                      |  181 +++++++++-
 gdb/Makefile.in                                    |    6 +-
 gdb/NEWS                                           |    4 +-
 gdb/acinclude.m4                                   |   28 ++
 gdb/ada-exp.y                                      |   24 +-
 gdb/ada-lex.l                                      |   30 +-
 gdb/aix-thread.c                                   |   57 ++--
 gdb/amd64-linux-nat.c                              |    9 +
 gdb/auxv.c                                         |    1 +
 gdb/breakpoint.c                                   |    2 +-
 gdb/c-exp.y                                        |   99 +-----
 gdb/c-lang.c                                       |  112 +++---
 gdb/charset.c                                      |  141 +++++++-
 gdb/charset.h                                      |    4 +-
 gdb/configure                                      |   70 ++++
 gdb/configure.tgt                                  |    2 +-
 gdb/cp-name-parser.y                               |   24 +-
 gdb/cp-namespace.c                                 |   26 +-
 gdb/cp-support.c                                   |   81 ++++
 gdb/cp-support.h                                   |    2 +
 gdb/darwin-nat-info.c                              |    6 +-
 gdb/darwin-nat.c                                   |    2 +-
 gdb/defs.h                                         |    2 +
 gdb/doc/ChangeLog                                  |   12 +
 gdb/doc/gdb.texinfo                                |   37 ++-
 gdb/dwarf2read.c                                   |    2 +-
 gdb/expprint.c                                     |    7 +-
 gdb/f-exp.y                                        |   24 +-
 gdb/frame.c                                        |   31 +-
 gdb/gdb_obstack.h                                  |    2 +-
 gdb/gdb_thread_db.h                                |    8 +-
 gdb/gdb_wchar.h                                    |   62 +++
 gdb/gdbserver/ChangeLog                            |   48 +++
 gdb/gdbserver/linux-low.c                          |  348 +++++++++---------
 gdb/gdbserver/linux-low.h                          |   16 +-
 gdb/gdbserver/proc-service.c                       |   10 +-
 gdb/gdbserver/thread-db.c                          |   44 ++--
 gdb/gnu-nat.c                                      |    2 +-
 gdb/go32-nat.c                                     |   11 +-
 gdb/hppanbsd-nat.c                                 |    6 +-
 gdb/hppanbsd-tdep.c                                |    6 +-
 gdb/hppaobsd-tdep.c                                |    6 +-
 gdb/hpux-thread.c                                  |    4 +-
 gdb/inf-ptrace.c                                   |    2 +-
 gdb/inf-ttrace.c                                   |    2 +-
 gdb/infrun.c                                       |    4 +-
 gdb/jv-exp.y                                       |   24 +-
 gdb/linespec.c                                     |   16 +-
 gdb/linux-nat.c                                    |   26 +-
 gdb/m2-exp.y                                       |   24 +-
 gdb/mi/mi-main.h                                   |    4 +-
 gdb/monitor.c                                      |    2 +-
 gdb/nto-procfs.c                                   |    2 +-
 gdb/objc-exp.y                                     |    6 +-
 gdb/p-exp.y                                        |   24 +-
 gdb/printcmd.c                                     |   19 +-
 gdb/procfs.c                                       |    4 +-
 gdb/python/python-cmd.c                            |    2 +-
 gdb/remote-m32r-sdi.c                              |    2 +-
 gdb/remote-mips.c                                  |   14 +-
 gdb/remote-sim.c                                   |    6 +-
 gdb/remote.c                                       |   13 +-
 gdb/reply_mig_hack.awk                             |    6 +-
 gdb/reverse.c                                      |    6 +-
 gdb/rs6000-nat.c                                   |    3 +-
 gdb/stack.c                                        |   79 ++++
 gdb/symtab.c                                       |   17 +-
 gdb/target.c                                       |   34 +-
 gdb/target.h                                       |    5 +-
 gdb/testsuite/ChangeLog                            |   24 ++
 gdb/testsuite/gdb.ada/fixed_points.exp             |   10 +
 .../gdb.ada/fixed_points/fixed_points.adb          |   39 ++-
 gdb/testsuite/gdb.base/charset.exp                 |   12 +-
 gdb/testsuite/gdb.base/return-nodebug.c            |   22 +-
 gdb/testsuite/gdb.base/return-nodebug.exp          |   44 ++-
 .../{return-nodebug.c => return-nodebug1.c}        |   29 +--
 gdb/testsuite/gdb.base/solib-display.exp           |    2 +-
 gdb/testsuite/gdb.cp/namespace-using.exp           |    5 +-
 gdb/utils.c                                        |    4 +
 gdb/version.in                                     |    2 +-
 gdb/windows-nat.c                                  |    6 +-
 gdb/xtensa-xtregs.c                                |    2 +-
 include/ChangeLog                                  |   10 +
 include/alloca-conf.h                              |   60 ++-
 include/demangle.h                                 |    6 +-
 include/elf/ChangeLog                              |   10 +
 include/elf/common.h                               |   13 +
 libiberty/ChangeLog                                |   12 +
 libiberty/cp-demangle.c                            |   71 ++++-
 libiberty/testsuite/demangle-expected              |   18 +-
 opcodes/ChangeLog                                  |    7 +
 opcodes/Makefile.am                                |   10 +-
 opcodes/Makefile.in                                |   11 +-
 opcodes/cgen-opc.c                                 |    7 +-
 opcodes/openrisc-opc.c                             |    5 +-
 opcodes/score-dis.c                                |   36 ++-
 sim/common/ChangeLog                               |    5 +
 sim/common/sim-utils.c                             |    6 +-
 128 files changed, 2626 insertions(+), 1181 deletions(-)
 create mode 100644 gdb/gdb_wchar.h
 copy gdb/testsuite/gdb.base/{return-nodebug.c => return-nodebug1.c} (69%)

First 500 lines of diff:
diff --git a/ChangeLog b/ChangeLog
index 5ee9384..7e44f7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2009-03-18  Tom Tromey  <tromey@redhat.com>
+
+	* configure: Rebuild.
+	* configure.ac (host_libs): Add libiconv.
+	* Makefile.in: Rebuild.
+	* Makefile.def (host_modules): Add libiconv.
+	(configure-gdb, all-gdb): Depend on libiconv.
+
+2009-03-16  Tristan Gingold  <gingold@adacore.com>
+
+	* configure.ac: Treat gdb as supported on x86_64-darwin.
+	* configure: Regenerate.
+
+2009-03-16  Joseph Myers  <joseph@codesourcery.com>
+
+	Merge from GCC:
+
+	2009-03-16  Joseph Myers  <joseph@codesourcery.com>
+
+	* configure.ac (--with-host-libstdcxx): New option.
+	* configure: Regenerate.
+
+	2009-01-29  Robert Millan  <rmh@aybabtu.com>
+
+	* configure.ac: Recognize GNU/kOpenSolaris (*-*-kopensolaris*-gnu).
+	* configure: Regenerate.
+
+	2009-01-12  Sebastian Pop <sebastian.pop@amd.com>
+
+	PR tree-optimization/38515
+	* configure.ac (cloog-polylib): Removed.
+	(with_ppl, with_cloog): Test for "no".
+	* configure: Regenerated.
+
 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 	Backport from git Libtool:
diff --git a/Makefile.def b/Makefile.def
index fee4dda..a0a5266 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -94,6 +94,14 @@ host_modules= { module= libcpp; bootstrap=true; };
 host_modules= { module= libdecnumber; bootstrap=true; };
 host_modules= { module= libgui; };
 host_modules= { module= libiberty; bootstrap=true; };
+// We abuse missing to avoid installing anything for libiconv.
+host_modules= { module= libiconv;
+		extra_configure_flags='--disable-shared';
+		no_install= true;
+		missing= install-info;
+		missing= install-pdf;
+		missing= install-html;
+		missing= install-info; };
 host_modules= { module= libtool; };
 host_modules= { module= m4; };
 host_modules= { module= make; };
@@ -339,7 +347,11 @@ dependencies = { module=configure-cloog; on=all-ppl; };
 dependencies = { module=configure-gdb; on=all-intl; };
 dependencies = { module=configure-gdb; on=configure-sim; };
 dependencies = { module=configure-gdb; on=all-bfd; };
+// Depend on all-libiconv so that configure checks for iconv
+// functions will work.
+dependencies = { module=configure-gdb; on=all-libiconv; };
 dependencies = { module=all-gdb; on=all-libiberty; };
+dependencies = { module=all-gdb; on=all-libiconv; };
 dependencies = { module=all-gdb; on=all-opcodes; };
 dependencies = { module=all-gdb; on=all-readline; };
 dependencies = { module=all-gdb; on=all-build-bison; };
diff --git a/Makefile.in b/Makefile.in
index 3ca3f26..26d1d01 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -714,6 +714,7 @@ configure-host:  \
     maybe-configure-libdecnumber \
     maybe-configure-libgui \
     maybe-configure-libiberty \
+    maybe-configure-libiconv \
     maybe-configure-libtool \
     maybe-configure-m4 \
     maybe-configure-make \
@@ -871,6 +872,7 @@ all-host: maybe-all-libgui
 @if libiberty-no-bootstrap
 all-host: maybe-all-libiberty
 @endif libiberty-no-bootstrap
+all-host: maybe-all-libiconv
 all-host: maybe-all-libtool
 all-host: maybe-all-m4
 all-host: maybe-all-make
@@ -989,6 +991,7 @@ info-host: maybe-info-libcpp
 info-host: maybe-info-libdecnumber
 info-host: maybe-info-libgui
 info-host: maybe-info-libiberty
+info-host: maybe-info-libiconv
 info-host: maybe-info-libtool
 info-host: maybe-info-m4
 info-host: maybe-info-make
@@ -1098,6 +1101,7 @@ dvi-host: maybe-dvi-libcpp
 dvi-host: maybe-dvi-libdecnumber
 dvi-host: maybe-dvi-libgui
 dvi-host: maybe-dvi-libiberty
+dvi-host: maybe-dvi-libiconv
 dvi-host: maybe-dvi-libtool
 dvi-host: maybe-dvi-m4
 dvi-host: maybe-dvi-make
@@ -1207,6 +1211,7 @@ pdf-host: maybe-pdf-libcpp
 pdf-host: maybe-pdf-libdecnumber
 pdf-host: maybe-pdf-libgui
 pdf-host: maybe-pdf-libiberty
+pdf-host: maybe-pdf-libiconv
 pdf-host: maybe-pdf-libtool
 pdf-host: maybe-pdf-m4
 pdf-host: maybe-pdf-make
@@ -1316,6 +1321,7 @@ html-host: maybe-html-libcpp
 html-host: maybe-html-libdecnumber
 html-host: maybe-html-libgui
 html-host: maybe-html-libiberty
+html-host: maybe-html-libiconv
 html-host: maybe-html-libtool
 html-host: maybe-html-m4
 html-host: maybe-html-make
@@ -1425,6 +1431,7 @@ TAGS-host: maybe-TAGS-libcpp
 TAGS-host: maybe-TAGS-libdecnumber
 TAGS-host: maybe-TAGS-libgui
 TAGS-host: maybe-TAGS-libiberty
+TAGS-host: maybe-TAGS-libiconv
 TAGS-host: maybe-TAGS-libtool
 TAGS-host: maybe-TAGS-m4
 TAGS-host: maybe-TAGS-make
@@ -1534,6 +1541,7 @@ install-info-host: maybe-install-info-libcpp
 install-info-host: maybe-install-info-libdecnumber
 install-info-host: maybe-install-info-libgui
 install-info-host: maybe-install-info-libiberty
+install-info-host: maybe-install-info-libiconv
 install-info-host: maybe-install-info-libtool
 install-info-host: maybe-install-info-m4
 install-info-host: maybe-install-info-make
@@ -1643,6 +1651,7 @@ install-pdf-host: maybe-install-pdf-libcpp
 install-pdf-host: maybe-install-pdf-libdecnumber
 install-pdf-host: maybe-install-pdf-libgui
 install-pdf-host: maybe-install-pdf-libiberty
+install-pdf-host: maybe-install-pdf-libiconv
 install-pdf-host: maybe-install-pdf-libtool
 install-pdf-host: maybe-install-pdf-m4
 install-pdf-host: maybe-install-pdf-make
@@ -1752,6 +1761,7 @@ install-html-host: maybe-install-html-libcpp
 install-html-host: maybe-install-html-libdecnumber
 install-html-host: maybe-install-html-libgui
 install-html-host: maybe-install-html-libiberty
+install-html-host: maybe-install-html-libiconv
 install-html-host: maybe-install-html-libtool
 install-html-host: maybe-install-html-m4
 install-html-host: maybe-install-html-make
@@ -1861,6 +1871,7 @@ installcheck-host: maybe-installcheck-libcpp
 installcheck-host: maybe-installcheck-libdecnumber
 installcheck-host: maybe-installcheck-libgui
 installcheck-host: maybe-installcheck-libiberty
+installcheck-host: maybe-installcheck-libiconv
 installcheck-host: maybe-installcheck-libtool
 installcheck-host: maybe-installcheck-m4
 installcheck-host: maybe-installcheck-make
@@ -1970,6 +1981,7 @@ mostlyclean-host: maybe-mostlyclean-libcpp
 mostlyclean-host: maybe-mostlyclean-libdecnumber
 mostlyclean-host: maybe-mostlyclean-libgui
 mostlyclean-host: maybe-mostlyclean-libiberty
+mostlyclean-host: maybe-mostlyclean-libiconv
 mostlyclean-host: maybe-mostlyclean-libtool
 mostlyclean-host: maybe-mostlyclean-m4
 mostlyclean-host: maybe-mostlyclean-make
@@ -2079,6 +2091,7 @@ clean-host: maybe-clean-libcpp
 clean-host: maybe-clean-libdecnumber
 clean-host: maybe-clean-libgui
 clean-host: maybe-clean-libiberty
+clean-host: maybe-clean-libiconv
 clean-host: maybe-clean-libtool
 clean-host: maybe-clean-m4
 clean-host: maybe-clean-make
@@ -2188,6 +2201,7 @@ distclean-host: maybe-distclean-libcpp
 distclean-host: maybe-distclean-libdecnumber
 distclean-host: maybe-distclean-libgui
 distclean-host: maybe-distclean-libiberty
+distclean-host: maybe-distclean-libiconv
 distclean-host: maybe-distclean-libtool
 distclean-host: maybe-distclean-m4
 distclean-host: maybe-distclean-make
@@ -2297,6 +2311,7 @@ maintainer-clean-host: maybe-maintainer-clean-libcpp
 maintainer-clean-host: maybe-maintainer-clean-libdecnumber
 maintainer-clean-host: maybe-maintainer-clean-libgui
 maintainer-clean-host: maybe-maintainer-clean-libiberty
+maintainer-clean-host: maybe-maintainer-clean-libiconv
 maintainer-clean-host: maybe-maintainer-clean-libtool
 maintainer-clean-host: maybe-maintainer-clean-m4
 maintainer-clean-host: maybe-maintainer-clean-make
@@ -2460,6 +2475,7 @@ check-host:  \
     maybe-check-libdecnumber \
     maybe-check-libgui \
     maybe-check-libiberty \
+    maybe-check-libiconv \
     maybe-check-libtool \
     maybe-check-m4 \
     maybe-check-make \
@@ -2595,6 +2611,7 @@ install-host-nogcc:  \
     maybe-install-libdecnumber \
     maybe-install-libgui \
     maybe-install-libiberty \
+    maybe-install-libiconv \
     maybe-install-libtool \
     maybe-install-m4 \
     maybe-install-make \
@@ -2671,6 +2688,7 @@ install-host:  \
     maybe-install-libdecnumber \
     maybe-install-libgui \
     maybe-install-libiberty \
+    maybe-install-libiconv \
     maybe-install-libtool \
     maybe-install-m4 \
     maybe-install-make \
@@ -29059,6 +29077,374 @@ maintainer-clean-libiberty:
 
 
 
+.PHONY: configure-libiconv maybe-configure-libiconv
+maybe-configure-libiconv:
+@if gcc-bootstrap
+configure-libiconv: stage_current
+@endif gcc-bootstrap
+@if libiconv
+maybe-configure-libiconv: configure-libiconv
+configure-libiconv: 
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv ; \
+	$(HOST_EXPORTS) \
+	echo Configuring in $(HOST_SUBDIR)/libiconv; \
+	cd "$(HOST_SUBDIR)/libiconv" || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	srcdiroption="--srcdir=$${topdir}/libiconv"; \
+	libsrcdir="$$s/libiconv"; \
+	$(SHELL) $${libsrcdir}/configure \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} $${srcdiroption} --disable-shared \
+	  || exit 1
+@endif libiconv
+
+
+
+
+
+.PHONY: all-libiconv maybe-all-libiconv
+maybe-all-libiconv:
+@if gcc-bootstrap
+all-libiconv: stage_current
+@endif gcc-bootstrap
+@if libiconv
+TARGET-libiconv=all
+maybe-all-libiconv: all-libiconv
+all-libiconv: configure-libiconv
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/libiconv && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)  \
+		$(TARGET-libiconv))
+@endif libiconv
+
+
+
+
+.PHONY: check-libiconv maybe-check-libiconv
+maybe-check-libiconv:
+@if libiconv
+maybe-check-libiconv: check-libiconv
+
+check-libiconv:
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/libiconv && \
+	  $(MAKE) $(FLAGS_TO_PASS)  check)
+
+@endif libiconv
+
+.PHONY: install-libiconv maybe-install-libiconv
+maybe-install-libiconv:
+@if libiconv
+maybe-install-libiconv: install-libiconv
+
+install-libiconv:
+
+@endif libiconv
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-libiconv info-libiconv
+maybe-info-libiconv:
+@if libiconv
+maybe-info-libiconv: info-libiconv
+
+info-libiconv: \
+    configure-libiconv 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libiconv/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing info in libiconv" ; \
+	(cd $(HOST_SUBDIR)/libiconv && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          info) \
+	  || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-dvi-libiconv dvi-libiconv
+maybe-dvi-libiconv:
+@if libiconv
+maybe-dvi-libiconv: dvi-libiconv
+
+dvi-libiconv: \
+    configure-libiconv 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libiconv/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing dvi in libiconv" ; \
+	(cd $(HOST_SUBDIR)/libiconv && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          dvi) \
+	  || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-pdf-libiconv pdf-libiconv
+maybe-pdf-libiconv:
+@if libiconv
+maybe-pdf-libiconv: pdf-libiconv
+
+pdf-libiconv: \
+    configure-libiconv 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libiconv/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing pdf in libiconv" ; \
+	(cd $(HOST_SUBDIR)/libiconv && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          pdf) \
+	  || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-html-libiconv html-libiconv
+maybe-html-libiconv:
+@if libiconv
+maybe-html-libiconv: html-libiconv
+
+html-libiconv: \
+    configure-libiconv 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libiconv/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing html in libiconv" ; \
+	(cd $(HOST_SUBDIR)/libiconv && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          html) \
+	  || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-TAGS-libiconv TAGS-libiconv
+maybe-TAGS-libiconv:
+@if libiconv
+maybe-TAGS-libiconv: TAGS-libiconv
+
+TAGS-libiconv: \
+    configure-libiconv 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libiconv/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing TAGS in libiconv" ; \
+	(cd $(HOST_SUBDIR)/libiconv && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          TAGS) \
+	  || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-install-info-libiconv install-info-libiconv
+maybe-install-info-libiconv:
+@if libiconv
+maybe-install-info-libiconv: install-info-libiconv
+
+# libiconv doesn't support install-info.
+install-info-libiconv:
+
+@endif libiconv
+
+.PHONY: maybe-install-pdf-libiconv install-pdf-libiconv
+maybe-install-pdf-libiconv:
+@if libiconv
+maybe-install-pdf-libiconv: install-pdf-libiconv
+
+# libiconv doesn't support install-pdf.
+install-pdf-libiconv:
+
+@endif libiconv
+
+.PHONY: maybe-install-html-libiconv install-html-libiconv
+maybe-install-html-libiconv:
+@if libiconv
+maybe-install-html-libiconv: install-html-libiconv
+
+# libiconv doesn't support install-html.
+install-html-libiconv:
+
+@endif libiconv
+
+.PHONY: maybe-installcheck-libiconv installcheck-libiconv
+maybe-installcheck-libiconv:
+@if libiconv
+maybe-installcheck-libiconv: installcheck-libiconv
+
+installcheck-libiconv: \
+    configure-libiconv 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libiconv/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing installcheck in libiconv" ; \
+	(cd $(HOST_SUBDIR)/libiconv && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          installcheck) \
+	  || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-mostlyclean-libiconv mostlyclean-libiconv
+maybe-mostlyclean-libiconv:
+@if libiconv
+maybe-mostlyclean-libiconv: mostlyclean-libiconv
+
+mostlyclean-libiconv: 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libiconv/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [SCM]  archer: Merge commit 'origin/archer-jankratochvil-misc' into archer
@ 2009-03-13 15:36 jkratoch
  0 siblings, 0 replies; 7+ messages in thread
From: jkratoch @ 2009-03-13 15:36 UTC (permalink / raw)
  To: archer-commits

The branch, archer has been updated
       via  f7395c26d5216c414498cbca9be5cc1b699ae635 (commit)
       via  faf81bd1827c1405b4f5218bfbe75f98d6de1cb5 (commit)
       via  81eb33a072e71058d691fcf884f1b2d0966b3ec6 (commit)
       via  6a1955b849f21abaa7de93dc4f65cab16f348a45 (commit)
      from  c426803f90bd1e42536ac9b908ad2d3c7075adc0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f7395c26d5216c414498cbca9be5cc1b699ae635
Merge: 81eb33a072e71058d691fcf884f1b2d0966b3ec6 faf81bd1827c1405b4f5218bfbe75f98d6de1cb5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 13 16:36:07 2009 +0100

    Merge commit 'origin/archer-jankratochvil-misc' into archer

commit 81eb33a072e71058d691fcf884f1b2d0966b3ec6
Merge: c426803f90bd1e42536ac9b908ad2d3c7075adc0 6a1955b849f21abaa7de93dc4f65cab16f348a45
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 13 16:24:51 2009 +0100

    Merge commit 'origin/archer-jankratochvil-misc' into archer

-----------------------------------------------------------------------

Summary of changes:
 gdb/testsuite/gdb.base/multi-forks.exp |    4 ++++
 gdb/testsuite/gdb.cp/expand-sals.exp   |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp
index ac56fb0..70c1a20 100644
--- a/gdb/testsuite/gdb.base/multi-forks.exp
+++ b/gdb/testsuite/gdb.base/multi-forks.exp
@@ -66,6 +66,10 @@ global gdb_prompt
 # The result should be that each of the 4 forks returns zero.
 
 runto_main
+
+gdb_test "call close (1)" "= 0" \
+	 "Suppress the inferior output mixing with GDB output"
+
 set exit_bp_loc [gdb_get_line_number "Set exit breakpoint here."]
 gdb_test "break $exit_bp_loc" "Breakpoint.* at .*" "Break at exit"
 gdb_test "set follow child" "" ""
diff --git a/gdb/testsuite/gdb.cp/expand-sals.exp b/gdb/testsuite/gdb.cp/expand-sals.exp
index a2631fb..6e04cbf 100644
--- a/gdb/testsuite/gdb.cp/expand-sals.exp
+++ b/gdb/testsuite/gdb.cp/expand-sals.exp
@@ -77,7 +77,7 @@ gdb_continue_to_breakpoint "caller" ".*caller-line.*"
 
 # Test GDB caught this return call and not the next one through B::B()
 gdb_test "bt" \
-	 "#0 \[^\r\n\]* A \[^\r\n\]*\r\n#1 \[^\r\n\]* main \[^\r\n\]*" \
+	 "#0 \[^\r\n\]* (A::)?A \[^\r\n\]*\r\n#1 \[^\r\n\]* main \[^\r\n\]*" \
 	 "bt from A"
 
 gdb_continue_to_breakpoint "next caller instance" ".*caller-line.*"
@@ -89,7 +89,7 @@ gdb_continue_to_breakpoint "next caller instance" ".*caller-line.*"
 # case, expecting here to catch the breakpoint before the call happens.
 
 gdb_test "bt" \
-	 "#0 \[^\r\n\]* A \[^\r\n\]*\r\n#1 \[^\r\n\]* B \[^\r\n\]*\r\n#2 \[^\r\n\]* main \[^\r\n\]*" \
+	 "#0 \[^\r\n\]* (A::)?A \[^\r\n\]*\r\n#1 \[^\r\n\]* (B::)?B \[^\r\n\]*\r\n#2 \[^\r\n\]* main \[^\r\n\]*" \
 	 "bt from B before the call"
 
 gdb_continue_to_breakpoint "next caller func" ".*func-line.*"


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [SCM]  archer: Merge commit 'origin/archer-jankratochvil-misc' into archer
@ 2009-03-05 21:49 jkratoch
  0 siblings, 0 replies; 7+ messages in thread
From: jkratoch @ 2009-03-05 21:49 UTC (permalink / raw)
  To: archer-commits

The branch, archer has been updated
       via  a02ff1c049b55fae6e887eb4130e82aba3b4f897 (commit)
       via  940c193de37706e1745719caefcb95d31d452fbc (commit)
       via  76fccb9ce587c83f5d74c6f1ac8923c78f784341 (commit)
       via  f167d06f1917ae5474507153f672747077b7c4a6 (commit)
       via  af5f84e0d7400aed8217429f3159ffc424c78274 (commit)
       via  83add4249d214f9fa385af953d9d2ad1e6b16ebd (commit)
      from  ace5ac468d6708dd9d078fe264e38cf8ba5ebc37 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit a02ff1c049b55fae6e887eb4130e82aba3b4f897
Merge: 76fccb9ce587c83f5d74c6f1ac8923c78f784341 940c193de37706e1745719caefcb95d31d452fbc
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Mar 5 22:48:59 2009 +0100

    Merge commit 'origin/archer-jankratochvil-misc' into archer

commit 76fccb9ce587c83f5d74c6f1ac8923c78f784341
Merge: ace5ac468d6708dd9d078fe264e38cf8ba5ebc37 f167d06f1917ae5474507153f672747077b7c4a6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Mar 5 22:45:05 2009 +0100

    Merge commit 'origin/archer-jankratochvil-misc' into archer

-----------------------------------------------------------------------

Summary of changes:
 gdb/rs6000-tdep.c                         |   52 +++++++++++++++--------------
 gdb/testsuite/gdb.arch/powerpc-power7.exp |   10 -----
 opcodes/ChangeLog                         |    5 +++
 opcodes/ppc-opc.c                         |   20 +++++-----
 4 files changed, 42 insertions(+), 45 deletions(-)

First 500 lines of diff:
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 1c59a42..926d0b6 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -117,9 +117,6 @@ static const char *powerpc_vector_strings[] =
   NULL
 };
 
-/* The configurable `disassemble_info.disassembler_options' string.  */
-static char *disassembler_options;
-
 /* A variable that can be configured by the user.  */
 static enum powerpc_vector_abi powerpc_vector_abi_global = POWERPC_VEC_AUTO;
 static const char *powerpc_vector_abi_string = "auto";
@@ -2996,17 +2993,15 @@ find_variant_by_arch (enum bfd_architecture arch, unsigned long mach)
 }
 
 static int
-gdb_print_insn_powerpc (bfd_vma memaddr, disassemble_info *info_pointer)
+gdb_print_insn_powerpc (bfd_vma memaddr, disassemble_info *info)
 {
-  disassemble_info info = *info_pointer;
+  if (!info->disassembler_options)
+    info->disassembler_options = "any";
 
-  if (disassembler_options && disassembler_options[0])
-    info.disassembler_options = disassembler_options;
-    
-  if (info.endian == BFD_ENDIAN_BIG)
-    return print_insn_big_powerpc (memaddr, &info);
+  if (info->endian == BFD_ENDIAN_BIG)
+    return print_insn_big_powerpc (memaddr, info);
   else
-    return print_insn_little_powerpc (memaddr, &info);
+    return print_insn_little_powerpc (memaddr, info);
 }
 \f
 static CORE_ADDR
@@ -3331,6 +3326,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   enum bfd_architecture arch;
   unsigned long mach;
   bfd abfd;
+  asection *sect;
   enum auto_boolean soft_float_flag = powerpc_soft_float_global;
   int soft_float;
   enum powerpc_vector_abi vector_abi = powerpc_vector_abi_global;
@@ -3379,6 +3375,26 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   arch = info.bfd_arch_info->arch;
   mach = info.bfd_arch_info->mach;
 
+  /* For e500 executables, the apuinfo section is of help here.  Such
+     section contains the identifier and revision number of each
+     Application-specific Processing Unit that is present on the
+     chip.  The content of the section is determined by the assembler
+     which looks at each instruction and determines which unit (and
+     which version of it) can execute it. In our case we just look for
+     the existance of the section.  */
+
+  if (info.abfd)
+    {
+      sect = bfd_get_section_by_name (info.abfd, ".PPC.EMB.apuinfo");
+      if (sect)
+	{
+	  arch = info.bfd_arch_info->arch;
+	  mach = bfd_mach_ppc_e500;
+	  bfd_default_set_arch_mach (&abfd, arch, mach);
+	  info.bfd_arch_info = bfd_get_arch_info (&abfd);
+	}
+    }
+
   /* Find a default target description which describes our register
      layout, if we do not already have one.  */
   if (! tdesc_has_registers (tdesc))
@@ -4042,18 +4058,4 @@ _initialize_rs6000_tdep (void)
 			_("Show the vector ABI."),
 			NULL, powerpc_set_vector_abi, NULL,
 			&setpowerpccmdlist, &showpowerpccmdlist);
-
-  /* Arches list is taken from opcodes/ppc-dis.c powerpc_init_dialect.  */
-  disassembler_options = xstrdup ("any");
-  add_setshow_string_cmd ("disassembler-options", class_support,
-			  &disassembler_options, _("\
-Pass the text on to disassembler."), _("\
-Show the text passed on to disassembler."), _("\
-This is the objdump option -M to specify the PowerPC model.  The possible\n\
-(sub)strings are: ppcps, booke, e500mc, e500, efs, e300, 440, 464, power4,\n\
-power5, cell, power6, power7, vsx, any, 32 and 64.  Unlike objdump GDB uses\n\
-the default value `any'."),
-			  NULL,
-			  NULL,
-			  &setpowerpccmdlist, &showpowerpccmdlist);
 }
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7.exp b/gdb/testsuite/gdb.arch/powerpc-power7.exp
index e1fc23f..d9c48f9 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power7.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power7.exp
@@ -37,16 +37,6 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${objfile}
  
 
-# Setup the disassembler.  With the default `any' flavor the instruction:
-#   0x20: xxmrghd vs3,vs4,vs5
-# (incl. many others) would get disassembled as:
-#   0x20: stfq f3,10320(r4)
-
-gdb_test "set powerpc disassembler-options power7"
-gdb_test "show powerpc disassembler-options power7" \
-         "The text passed on to disassembler is \"power7\"."
-
-
 # Disassemble the function.
 
 set test "disass func"
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 34230ec..0a81ca4 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-03  Peter Bergner  <bergner@vnet.ibm.com>
+
+	* ppc-opc.c (powerpc_opcodes): Reorder the opcode table so that
+	instructions from newer processors are listed before older ones.
+
 2009-03-02  Qinwei  <qinwei@sunnorth.com.cn>
 
 	* score7-dis.c: New file.
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index c872db5..5e70395 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -4560,8 +4560,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
 
 {"lhbrx",	X(31,790),	X_MASK,      COM,	PPCNONE,	{RT, RA0, RB}},
 
-{"lfqx",	X(31,791),	X_MASK,      POWER2,	PPCNONE,	{FRT, RA, RB}},
 {"lfdpx",	X(31,791),	X_MASK,      POWER6,	POWER7,		{FRT, RA, RB}},
+{"lfqx",	X(31,791),	X_MASK,      POWER2,	PPCNONE,	{FRT, RA, RB}},
 
 {"sraw",	XRC(31,792,0),	X_MASK,      PPCCOM,	PPCNONE,	{RA, RS, RB}},
 {"sra",		XRC(31,792,0),	X_MASK,      PWRCOM,	PPCNONE,	{RA, RS, RB}},
@@ -4638,8 +4638,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
 
 {"sthbrx",	X(31,918),	X_MASK,      COM,	PPCNONE,	{RS, RA0, RB}},
 
-{"stfqx",	X(31,919),	X_MASK,      POWER2,	PPCNONE,	{FRS, RA, RB}},
 {"stfdpx",	X(31,919),	X_MASK,      POWER6,	PPCNONE,	{FRS, RA, RB}},
+{"stfqx",	X(31,919),	X_MASK,      POWER2,	PPCNONE,	{FRS, RA, RB}},
 
 {"sraq",	XRC(31,920,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
 {"sraq.",	XRC(31,920,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
@@ -4801,12 +4801,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
 
 {"psq_l",	OP(56),		OP_MASK,     PPCPS,	PPCNONE,	{FRT,PSD,RA,PSW,PSQ}},
 
+{"lfdp",	OP(57),		OP_MASK,     POWER6,	POWER7,		{FRT, D, RA0}},
+
 {"lfqu",	OP(57),		OP_MASK,     POWER2,	PPCNONE,	{FRT, D, RA0}},
 
 {"psq_lu",	OP(57),		OP_MASK,     PPCPS,	PPCNONE,	{FRT,PSD,RA,PSW,PSQ}},
 
-{"lfdp",	OP(57),		OP_MASK,     POWER6,	POWER7,		{FRT, D, RA0}},
-
 {"ld",		DSO(58,0),	DS_MASK,     PPC64,	PPCNONE,	{RT, DS, RA0}},
 {"ldu",		DSO(58,1),	DS_MASK,     PPC64,	PPCNONE,	{RT, DS, RAL}},
 {"lwa",		DSO(58,2),	DS_MASK,     PPC64,	PPCNONE,	{RT, DS, RA0}},
@@ -4921,10 +4921,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
 {"fcfidus",	XRC(59,974,0),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
 {"fcfidus.",	XRC(59,974,1),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
 
-{"stfq",	OP(60),		OP_MASK,     POWER2,	PPCNONE,	{FRS, D, RA}},
-
-{"psq_st",	OP(60),		OP_MASK,     PPCPS,	PPCNONE,	{FRS,PSD,RA,PSW,PSQ}},
-
 {"xxsldwi",	XX3(60,2),	XX3SHW_MASK, PPCVSX,	PPCNONE,	{XT6, XA6, XB6, SHW}},
 {"xxsel",	XX4(60,3),	XX4_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6, XC6}},
 {"xxspltd",	XX3(60,10),	XX3DM_MASK,  PPCVSX,	PPCNONE,	{XT6, XA6, XB6S, DMEX}},
@@ -5067,12 +5063,16 @@ const struct powerpc_opcode powerpc_opcodes[] = {
 {"xvcvsxddp",	XX2(60,504),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
 {"xvnegdp",	XX2(60,505),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
 
-{"psq_stu",	OP(61),		OP_MASK,     PPCPS,	PPCNONE,	{FRS,PSD,RA,PSW,PSQ}},
+{"stfq",	OP(60),		OP_MASK,     POWER2,	PPCNONE,	{FRS, D, RA}},
 
-{"stfqu",	OP(61),		OP_MASK,     POWER2,	PPCNONE,	{FRS, D, RA}},
+{"psq_st",	OP(60),		OP_MASK,     PPCPS,	PPCNONE,	{FRS,PSD,RA,PSW,PSQ}},
 
 {"stfdp",	OP(61),		OP_MASK,     POWER6,	PPCNONE,	{FRT, D, RA0}},
 
+{"stfqu",	OP(61),		OP_MASK,     POWER2,	PPCNONE,	{FRS, D, RA}},
+
+{"psq_stu",	OP(61),		OP_MASK,     PPCPS,	PPCNONE,	{FRS,PSD,RA,PSW,PSQ}},
+
 {"std",		DSO(62,0),	DS_MASK,     PPC64,	PPCNONE,	{RS, DS, RA0}},
 {"stdu",	DSO(62,1),	DS_MASK,     PPC64,	PPCNONE,	{RS, DS, RAS}},
 {"stq",		DSO(62,2),	DS_MASK,     POWER4,	PPCNONE,	{RSQ, DS, RA0}},


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [SCM]  archer: Merge commit 'origin/archer-jankratochvil-misc' into archer
@ 2009-03-03 20:34 jkratoch
  0 siblings, 0 replies; 7+ messages in thread
From: jkratoch @ 2009-03-03 20:34 UTC (permalink / raw)
  To: archer-commits

The branch, archer has been updated
       via  01fcb90a5cfae1933dd18268f086ba150244d0d4 (commit)
       via  3de42e41dc5ff710c1515b148edefc45b26d8456 (commit)
      from  8cc3753a9aad85bf53bef54c04334c60d16cb251 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 01fcb90a5cfae1933dd18268f086ba150244d0d4
Merge: 8cc3753a9aad85bf53bef54c04334c60d16cb251 3de42e41dc5ff710c1515b148edefc45b26d8456
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Mar 3 21:24:09 2009 +0100

    Merge commit 'origin/archer-jankratochvil-misc' into archer

-----------------------------------------------------------------------

Summary of changes:
 gdb/testsuite/gdb.opt/array-from-register-func.c |   22 ++++++++++++++
 gdb/testsuite/gdb.opt/array-from-register.c      |   28 ++++++++++++++++++
 gdb/testsuite/gdb.opt/array-from-register.exp    |   33 ++++++++++++++++++++++
 3 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 gdb/testsuite/gdb.opt/array-from-register-func.c
 create mode 100644 gdb/testsuite/gdb.opt/array-from-register.c
 create mode 100644 gdb/testsuite/gdb.opt/array-from-register.exp

First 500 lines of diff:
diff --git a/gdb/testsuite/gdb.opt/array-from-register-func.c b/gdb/testsuite/gdb.opt/array-from-register-func.c
new file mode 100644
index 0000000..729f457
--- /dev/null
+++ b/gdb/testsuite/gdb.opt/array-from-register-func.c
@@ -0,0 +1,22 @@
+/* This file is part of GDB, the GNU debugger.
+
+   Copyright 2009 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+int
+func (int *arr)
+{
+  return arr[0];
+}
diff --git a/gdb/testsuite/gdb.opt/array-from-register.c b/gdb/testsuite/gdb.opt/array-from-register.c
new file mode 100644
index 0000000..3090e7e
--- /dev/null
+++ b/gdb/testsuite/gdb.opt/array-from-register.c
@@ -0,0 +1,28 @@
+/* This file is part of GDB, the GNU debugger.
+
+   Copyright 2009 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+extern int func (int *arr);
+
+int
+main (void)
+{
+  int arr[] = { 42 };
+
+  func (arr);
+
+  return 0;
+}
diff --git a/gdb/testsuite/gdb.opt/array-from-register.exp b/gdb/testsuite/gdb.opt/array-from-register.exp
new file mode 100644
index 0000000..f2de718
--- /dev/null
+++ b/gdb/testsuite/gdb.opt/array-from-register.exp
@@ -0,0 +1,33 @@
+# Copyright 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# This file is part of the gdb testsuite.
+
+if { [prepare_for_testing array-from-register.exp "array-from-register"      \
+			  {array-from-register.c array-from-register-func.c} \
+			  {debug optimize=-O2}] } {
+    return -1
+}
+
+if ![runto func] then {
+    return -1
+}
+
+gdb_test "p arr" "\\$\[0-9\]+ = \\(int \\*\\) *0x\[0-9a-f\]+"
+
+# Seen regression:
+# Address requested for identifier "arr" which is in register $rdi
+gdb_test "p arr\[0\]" "\\$\[0-9\]+ = 42"


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [SCM]  archer: Merge commit 'origin/archer-jankratochvil-misc' into archer
@ 2009-03-02 20:46 jkratoch
  0 siblings, 0 replies; 7+ messages in thread
From: jkratoch @ 2009-03-02 20:46 UTC (permalink / raw)
  To: archer-commits

The branch, archer has been updated
       via  cec79ce49870fcc1a6ff3307a398c57629def724 (commit)
       via  2f4534f00e90e15f04716bc977ba81a99f6ae942 (commit)
       via  2fac9534dc2dc85f7c999b94574cf0acf1767dd6 (commit)
       via  22d08140a880ab777cbc9090d87dd9b3b6c1631b (commit)
       via  dbdbd032f965ce2d447859f2ea15dfd8d488f268 (commit)
       via  b83458acdef987da786ffd02a312cb8b8ca2a6ea (commit)
       via  5f2b2a8cca73a90618b488f66866fdff75892d4b (commit)
       via  c7c96c12054b0089c813555d72c60e8cdaa56946 (commit)
       via  89308881045da59ed60edaa07f891df15db630c6 (commit)
       via  d1078c2fa27154160e390b04f9c89a41103d80ed (commit)
       via  1453f41cc1b2703b905f769de4b48a4db44a21d2 (commit)
       via  67ce5c51fad3b8bdc866d181e58293e87dc265a3 (commit)
       via  9c0fd74003677eef751f51629c403a03f2241c06 (commit)
       via  348985d7c203ef469d9ffdb1d921475f48a7e823 (commit)
       via  632bf4271d3217495085f83b1de7845ac2da0032 (commit)
       via  eec15c138feaba1072ea64acfb27eef7357dc3a7 (commit)
       via  db8f8a559425859ed43df0ea70b4f6b2a4dcd506 (commit)
       via  5f25e94a1252325146a1fc7d3b2449450292d38d (commit)
       via  f3859ae1c33373a36e211e7c1500054908f6a189 (commit)
       via  70baabfbb4e13618de72299df79682022cdf9bd8 (commit)
       via  22e9b41768f640a6dece93c706e0bf6f43779cc7 (commit)
       via  3db9d948d9ea2a69608f2cb5260364979c4c326b (commit)
       via  b0f394cdd4280b1f8ad7dd4a034318badf3cb04c (commit)
       via  de8053313621eb1ba7db9f44d691b366d50143f9 (commit)
      from  9a550f784d43869ae4ae92f3e2ba92e3dffdcfce (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit cec79ce49870fcc1a6ff3307a398c57629def724
Merge: 2f4534f00e90e15f04716bc977ba81a99f6ae942 dbdbd032f965ce2d447859f2ea15dfd8d488f268
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 2 21:45:49 2009 +0100

    Merge commit 'origin/archer-jankratochvil-misc' into archer

commit 2f4534f00e90e15f04716bc977ba81a99f6ae942
Merge: 22d08140a880ab777cbc9090d87dd9b3b6c1631b 2fac9534dc2dc85f7c999b94574cf0acf1767dd6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 2 21:45:43 2009 +0100

    Merge commit 'origin/archer-jankratochvil-python' into archer

commit 22d08140a880ab777cbc9090d87dd9b3b6c1631b
Merge: 9a550f784d43869ae4ae92f3e2ba92e3dffdcfce c7c96c12054b0089c813555d72c60e8cdaa56946
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 2 21:44:22 2009 +0100

    Merge commit 'origin/archer-keiths-expr-cumulative' into archer
    
    Conflicts:
    	gdb/dwarf2read.c

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                 |   11 +
 bfd/ChangeLog                             |   79 +
 bfd/Makefile.am                           |    9 +-
 bfd/Makefile.in                           |    8 +
 bfd/archures.c                            |    4 +-
 bfd/bfd-in2.h                             |   17 +-
 bfd/configure                             |   12 +-
 bfd/configure.in                          |    4 +-
 bfd/cpu-score.c                           |   68 +-
 bfd/elf-hppa.h                            | 1160 +---------------
 bfd/elf32-hppa.c                          |   70 +-
 bfd/elf32-score.c                         | 2250 +++++++++++++++++++----------
 bfd/elf32-score.h                         |  152 ++
 bfd/{elf32-score.c => elf32-score7.c}     | 1842 ++++++++++++------------
 bfd/elf64-hppa.c                          | 2206 ++++++++++++++++++++++------
 bfd/libbfd.h                              |    4 +-
 bfd/reloc.c                               |   17 +-
 bfd/version.h                             |    2 +-
 gdb/ChangeLog                             |   23 +
 gdb/Makefile.in                           |   12 +-
 gdb/common/gdb_signals.h                  |   56 +
 gdb/{signals => common}/signals.c         |    9 +-
 gdb/doc/gdb.texinfo                       |   20 +-
 gdb/dwarf2read.c                          |   10 +-
 gdb/gdbserver/ChangeLog                   |    8 +
 gdb/gdbserver/Makefile.in                 |    7 +-
 gdb/gdbserver/server.h                    |    8 +-
 gdb/infrun.c                              |   58 +-
 gdb/python/python-frame.c                 |   24 +-
 gdb/rs6000-tdep.c                         |   52 +-
 gdb/symtab.c                              |  145 +-
 gdb/target.h                              |   34 +-
 gdb/testsuite/gdb.arch/powerpc-power7.exp |  176 +++
 gdb/testsuite/gdb.arch/powerpc-power7.s   |  107 ++
 gdb/testsuite/gdb.cp/namespace-using.exp  |   35 +-
 gdb/testsuite/gdb.python/python-frame.exp |    9 +
 gdb/version.in                            |    2 +-
 include/elf/ChangeLog                     |    5 +
 include/elf/common.h                      |    3 +
 include/elf/score.h                       |   13 +-
 include/opcode/ChangeLog                  |    6 +
 include/opcode/score-datadep.h            |  227 +---
 include/opcode/score-inst.h               |  313 +----
 libtool.m4                                |   12 +-
 opcodes/ChangeLog                         |   14 +
 opcodes/Makefile.am                       |    7 +
 opcodes/Makefile.in                       |    7 +
 opcodes/configure                         |   10 +-
 opcodes/configure.in                      |    2 +-
 opcodes/score-dis.c                       |  880 ++++++++++--
 opcodes/score-opc.h                       |  460 +++----
 opcodes/score7-dis.c                      |  972 +++++++++++++
 52 files changed, 7173 insertions(+), 4468 deletions(-)
 create mode 100644 bfd/elf32-score.h
 copy bfd/{elf32-score.c => elf32-score7.c} (69%)
 create mode 100644 gdb/common/gdb_signals.h
 rename gdb/{signals => common}/signals.c (99%)
 create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7.exp
 create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7.s
 create mode 100644 opcodes/score7-dis.c

First 500 lines of diff:
diff --git a/ChangeLog b/ChangeLog
index 474f3d4..5ee9384 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Backport from git Libtool:
+
+	2009-01-19  Robert Millan  <rmh@aybabtu.com>
+	Support GNU/kOpenSolaris.
+	* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
+	(_LT_CHECK_MAGIC_METHOD, _LT_COMPILER_PIC, _LT_LINKER_SHLIBS)
+	(_LT_LANG_CXX_CONFIG) [kopensolaris*-gnu]: Recognize
+	GNU/kOpenSolaris.
+
 2009-02-05  Andreas Schwab  <schwab@suse.de>
 
 	* Makefile.tpl (stage_last): Define $r and $s before using
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index bdd2f80..d431c0d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,82 @@
+2009-03-02  Qinwei  <qinwei@sunnorth.com.cn>
+
+	* elf32-score7.c: New file.
+	* elf32-score.h: New file.
+	* elf32-score.c: Add code to support score 7.  Set score7 as the
+	default.
+	* cpu-score.c: Add score7 architecure.
+	(compatibile): New function.
+	* Makefile.am: Add rules for building elf32-score7 object.
+	* Makefile.in: Regenerate.
+	* configure.in: Add elf32-score7 object to score vectors.
+	* configure: Regenerate.
+	* reloc.c: Add score7 relocs.
+	* archures.c: Add score3 and score7 machine numbers.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+
+2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	* configure: Regenerate.
+
+2009-03-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* elf32-hppa.c (hppa32_elf_local_refcounts): New function.
+	(elf32_hppa_check_relocs): Use it.
+
+	* elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
+	elf64-hppa.c.
+	(elf_hppa_unmark_useless_dynamic_symbols): Likewise.
+	(elf_hppa_remark_useless_dynamic_symbols): Likewise.
+	(elf_hppa_is_dynamic_loader_symbol): Likewise.
+	(elf_hppa_record_segment_addrs): Likewise.
+	(elf_hppa_final_link): Likewise.
+	(elf_hppa_relocate_insn): Likewise.
+	(elf_hppa_final_link_relocate): Likewise.
+	(elf64_hppa_relocate_section): Likewise.
+	* elf64-hppa.c: Insert above.
+
+2009-02-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+	* elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
+	(elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
+	(elf_hppa_relocate_section): Likewise.
+	* elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
+	from struct elf_link_hash_entry.  Add count field.
+	(struct elf64_hppa_dyn_hash_table): Delete.
+	(struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
+	(elf64_hppa_hash_table): Rename to hppa_link_hash_table.
+	(hppa_elf_hash_entry, eh_name): Define.
+	(elf64_hppa_new_dyn_hash_entry): Delete.
+	(elf64_hppa_dyn_hash_lookup): Delete.
+	(elf64_hppa_dyn_hash_traverse): Delete.
+	(get_dyn_name): Delete.
+	(elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
+	of struct elf64_hppa_dyn_hash_entry *.
+	(elf64_hppa_finalize_dlt, llocate_global_data_dlt,
+	allocate_global_data_plt, allocate_global_data_stub,
+	allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
+	Likewise.
+	(hppa64_link_hash_newfunc): New.
+	(elf64_hppa_hash_table_create): Rework.
+	(count_dyn_reloc): Likewise.
+	(hppa64_elf_local_refcounts): New.
+	(elf64_hppa_check_relocs): Rework using standard technique for recording
+	local DLT, PLT and OPD reference counts.
+	(elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
+	elf_link_hash_entry *.
+	(elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
+	allocate_global_data_plt, allocate_global_data_stub,
+	allocate_global_data_opd, allocate_dynrel_entries,
+	elf64_hppa_adjust_dynamic_symbol,
+	elf64_hppa_mark_milli_and_exported_functions): Likewise.
+	(elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
+	Use hppa_link_hash_table.  Rework.
+	(elf64_hppa_link_output_symbol_hook): Rework.
+	(elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
+	elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
+	elf64_hppa_finish_dynamic_sections): Likewise.
+
 2009-02-26  Christophe Lyon  <christophe.lyon@st.com>
 
 	* elf32-arm.c (stub_reloc_type): Removed.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 8d67cb8..08f0c2a 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -289,6 +289,7 @@ BFD32_BACKENDS = \
 	elf32-ppc.lo \
 	elf32-s390.lo \
 	elf32-score.lo \
+	elf32-score7.lo \
 	elf32-sh.lo \
 	elf32-sh-symbian.lo \
 	elf32-sh64.lo \
@@ -474,6 +475,7 @@ BFD32_BACKENDS_CFILES = \
 	elf32-sh64-com.c \
 	elf32-s390.c \
 	elf32-score.c \
+	elf32-score7.c \
 	elf32-sh.c \
 	elf32-sh-symbian.c \
 	elfxx-sparc.c \
@@ -1570,7 +1572,12 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
 elf32-score.lo: elf32-score.c $(INCDIR)/filenames.h \
   $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
-  $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
+  $(INCDIR)/bfdlink.h elf32-score.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
+elf32-score7.lo: elf32-score7.c $(INCDIR)/filenames.h \
+  $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
+  $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/bfdlink.h elf32-score.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
 elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 9932dea..1eb5887 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -555,6 +555,7 @@ BFD32_BACKENDS = \
 	elf32-ppc.lo \
 	elf32-s390.lo \
 	elf32-score.lo \
+	elf32-score7.lo \
 	elf32-sh.lo \
 	elf32-sh-symbian.lo \
 	elf32-sh64.lo \
@@ -739,6 +740,7 @@ BFD32_BACKENDS_CFILES = \
 	elf32-sh64.c \
 	elf32-sh64-com.c \
 	elf32-s390.c \
+	elf32-score7.c \
 	elf32-score.c \
 	elf32-sh.c \
 	elf32-sh-symbian.c \
@@ -2167,6 +2169,12 @@ elf32-score.lo: elf32-score.c $(INCDIR)/filenames.h \
   $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
+  $(INCDIR)/bfdlink.h elf32-score.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
+elf32-score7.lo: elf32-score7.c $(INCDIR)/filenames.h \
+  $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
+  $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/bfdlink.h elf32-score.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
 elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
diff --git a/bfd/archures.c b/bfd/archures.c
index f548ea2..fa03d81 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -1,6 +1,6 @@
 /* BFD library support routines for architectures.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
    Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
 
@@ -376,6 +376,8 @@ DESCRIPTION
 .#define bfd_mach_s390_31       31
 .#define bfd_mach_s390_64       64
 .  bfd_arch_score,     {* Sunplus score *} 
+.#define bfd_mach_score3         3
+.#define bfd_mach_score7         7
 .  bfd_arch_openrisc,  {* OpenRISC *}
 .  bfd_arch_mmix,      {* Donald Knuth's educational processor.  *}
 .  bfd_arch_xstormy16,
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 7870962..be35ac4 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -2002,6 +2002,8 @@ enum bfd_architecture
 #define bfd_mach_s390_31       31
 #define bfd_mach_s390_64       64
   bfd_arch_score,     /* Sunplus score */ 
+#define bfd_mach_score3         3
+#define bfd_mach_score7         7
   bfd_arch_openrisc,  /* OpenRISC */
   bfd_arch_mmix,      /* Donald Knuth's educational processor.  */
   bfd_arch_xstormy16,
@@ -3889,10 +3891,8 @@ instructions  */
   BFD_RELOC_390_GOTPLT20,
   BFD_RELOC_390_TLS_GOTIE20,
 
-/* Score relocations  */
-  BFD_RELOC_SCORE_DUMMY1,
-
-/* Low 16 bit for load/store  */
+/* Score relocations
+Low 16 bit for load/store  */
   BFD_RELOC_SCORE_GPREL15,
 
 /* This is a 24-bit reloc with the right 1 bit assumed to be 0  */
@@ -3902,12 +3902,21 @@ instructions  */
 /* This is a 19-bit reloc with the right 1 bit assumed to be 0  */
   BFD_RELOC_SCORE_BRANCH,
 
+/* This is a 32-bit reloc for 48-bit instructions.  */
+  BFD_RELOC_SCORE_IMM30,
+
+/* This is a 32-bit reloc for 48-bit instructions.  */
+  BFD_RELOC_SCORE_IMM32,
+
 /* This is a 11-bit reloc with the right 1 bit assumed to be 0  */
   BFD_RELOC_SCORE16_JMP,
 
 /* This is a 8-bit reloc with the right 1 bit assumed to be 0  */
   BFD_RELOC_SCORE16_BRANCH,
 
+/* This is a 9-bit reloc with the right 1 bit assumed to be 0  */
+  BFD_RELOC_SCORE_BCMP,
+
 /* Undocumented Score relocs  */
   BFD_RELOC_SCORE_GOT15,
   BFD_RELOC_SCORE_GOT_LO16,
diff --git a/bfd/configure b/bfd/configure
index 80e5eaf..6c21291 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -6179,7 +6179,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -8327,7 +8327,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -8888,7 +8888,7 @@ _LT_EOF
       archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
       if test "$host_os" = linux-dietlibc; then
 	case $cc_basename in
@@ -10437,7 +10437,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -20783,8 +20783,8 @@ do
     bfd_elf32_powerpcle_vec)	tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
-    bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32.lo $elf" ;;
-    bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32.lo $elf" ;;
+    bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
+    bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
     # FIXME: We include cofflink.lo not because it's needed for
     # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
     # which needs it but does not list it.  Should be fixed in right place.
diff --git a/bfd/configure.in b/bfd/configure.in
index a444418..a56004d 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -724,8 +724,8 @@ do
     bfd_elf32_powerpcle_vec)	tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
-    bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32.lo $elf" ;;
-    bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32.lo $elf" ;; 
+    bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
+    bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
     # FIXME: We include cofflink.lo not because it's needed for
     # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
     # which needs it but does not list it.  Should be fixed in right place.
diff --git a/bfd/cpu-score.c b/bfd/cpu-score.c
index 0ccc371..0ed4095 100644
--- a/bfd/cpu-score.c
+++ b/bfd/cpu-score.c
@@ -1,8 +1,9 @@
 /* BFD support for the score processor
-   Copyright 2006, 2007 Free Software Foundation, Inc.   
+   Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
    Contributed by
+   Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
-   Pei-Lin Tsai (pltsai@sunplus.com)  
+   Pei-Lin Tsai (pltsai@sunplus.com)
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -21,32 +22,47 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
-#include "sysdep.h"
 #include "bfd.h"
+#include "sysdep.h"
 #include "libbfd.h"
 
-const bfd_arch_info_type
-bfd_score_arch =
+/* This routine is provided two arch_infos and works out which Score
+   machine which would be compatible with both and returns a pointer
+   to its info structure.  */
+
+static const bfd_arch_info_type *
+compatible (const bfd_arch_info_type * a, const bfd_arch_info_type * b)
 {
-  32,				/* There's 32 bits_per_word.  */
-  32,				/* There's 32 bits_per_address.  */
-  8,				/* There's 8 bits_per_byte.  */
-  bfd_arch_score,		/* One of enum bfd_architecture, defined
-				   in archures.c and provided in
-				   generated header files.  */
-  0,				/* Only 1 machine, but #255 for
-				   historical reasons.  */
-  "score",			/* The arch_name.  */
-  "score",			/* The printable name is the same.  */
-  4,				/* Section alignment power; each section
-				   is aligned to (only) 2^4 bytes.  */
-  TRUE,				/* This is the default "machine", since
-				   there's only one.  */
-  bfd_default_compatible,	/* A default function for testing
-				   "machine" compatibility of two
-				   bfd_arch_info_type.  */
-  bfd_default_scan,		/* Check if an bfd_arch_info_type is a
-				   match.  */
-  NULL				/* Pointer to next bfd_arch_info_type in
-				   the same family.  */
+  /* If a & b are for different architectures we can do nothing.  */
+  if (a->arch != b->arch)
+    return NULL;
+
+  if (a->mach != b->mach)
+    return NULL;
+
+  return a;
+}
+
+#define N(addr_bits, machine, print, default, next)		\
+{								\
+  32,				/* 16 bits in a word.  */	\
+  32,				/* Bits in an address.  */	\
+  8,				/* 8 bits in a byte.  */	\
+  bfd_arch_score,						\
+  machine,			/* Machine number.  */		\
+  "score",			/* Architecture name.   */	\
+  print,			/* Printable name.  */		\
+  4,				/* Section align power.  */	\
+  default,			/* The default machine.  */	\
+  compatible,							\
+  bfd_default_scan,						\
+  next								\
+}
+
+static const bfd_arch_info_type arch_info_struct[] =
+{
+  N (16, bfd_mach_score3, "score3", FALSE, NULL),
 };
+
+const bfd_arch_info_type bfd_score_arch =
+  N (16, bfd_mach_score7, "score7", TRUE, & arch_info_struct[0]);
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 0edf989..51a9484 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1,5 +1,5 @@
 /* Common code for PA ELF implementations.
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1218,1161 +1218,3 @@ elf_hppa_action_discarded (asection *sec)
 
   return _bfd_elf_default_action_discarded (sec);
 }
-
-#if ARCH_SIZE == 64
-/* Hook called by the linker routine which adds symbols from an object
-   file.  HP's libraries define symbols with HP specific section
-   indices, which we have to handle.  */
-
-static bfd_boolean
-elf_hppa_add_symbol_hook (bfd *abfd,
-			  struct bfd_link_info *info ATTRIBUTE_UNUSED,
-			  Elf_Internal_Sym *sym,
-			  const char **namep ATTRIBUTE_UNUSED,
-			  flagword *flagsp ATTRIBUTE_UNUSED,
-			  asection **secp,
-			  bfd_vma *valp)
-{
-  unsigned int index = sym->st_shndx;
-
-  switch (index)
-    {
-    case SHN_PARISC_ANSI_COMMON:
-      *secp = bfd_make_section_old_way (abfd, ".PARISC.ansi.common");
-      (*secp)->flags |= SEC_IS_COMMON;
-      *valp = sym->st_size;
-      break;
-
-    case SHN_PARISC_HUGE_COMMON:
-      *secp = bfd_make_section_old_way (abfd, ".PARISC.huge.common");
-      (*secp)->flags |= SEC_IS_COMMON;
-      *valp = sym->st_size;
-      break;
-    }
-
-  return TRUE;
-}
-
-static bfd_boolean
-elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
-					 void *data)
-{
-  struct bfd_link_info *info = data;
-
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-  /* If we are not creating a shared library, and this symbol is
-     referenced by a shared library but is not defined anywhere, then
-     the generic code will warn that it is undefined.
-
-     This behavior is undesirable on HPs since the standard shared
-     libraries contain references to undefined symbols.
-
-     So we twiddle the flags associated with such symbols so that they
-     will not trigger the warning.  ?!? FIXME.  This is horribly fragile.
-
-     Ultimately we should have better controls over the generic ELF BFD
-     linker code.  */
-  if (! info->relocatable
-      && info->unresolved_syms_in_shared_libs != RM_IGNORE
-      && h->root.type == bfd_link_hash_undefined
-      && h->ref_dynamic
-      && !h->ref_regular)
-    {
-      h->ref_dynamic = 0;
-      h->pointer_equality_needed = 1;
-    }
-
-  return TRUE;
-}
-
-static bfd_boolean
-elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
-					 void *data)
-{
-  struct bfd_link_info *info = data;
-
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-  /* If we are not creating a shared library, and this symbol is
-     referenced by a shared library but is not defined anywhere, then
-     the generic code will warn that it is undefined.
-
-     This behavior is undesirable on HPs since the standard shared
-     libraries contain references to undefined symbols.
-
-     So we twiddle the flags associated with such symbols so that they
-     will not trigger the warning.  ?!? FIXME.  This is horribly fragile.
-
-     Ultimately we should have better controls over the generic ELF BFD


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-30 17:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 22:12 [SCM] archer: Merge commit 'origin/archer-jankratochvil-misc' into archer jkratoch
  -- strict thread matches above, loose matches on Subject: below --
2009-03-30 17:22 jkratoch
2009-03-20 17:07 jkratoch
2009-03-13 15:36 jkratoch
2009-03-05 21:49 jkratoch
2009-03-03 20:34 jkratoch
2009-03-02 20:46 jkratoch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).