public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: swagiaal@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-swagiaal-upstream: Merge branch 'master' into archer-swagiaal-upstream
Date: Thu, 28 Jan 2010 19:18:00 -0000	[thread overview]
Message-ID: <20100128191837.24139.qmail@sourceware.org> (raw)

The branch, archer-swagiaal-upstream has been updated
       via  ac727f6ebe55f3d1804d0b15aa6eb45ce62ce95a (commit)
       via  aeae4a8edcc90a5560ff3d9832ea79b65b119d9f (commit)
       via  9086f91b53f60094862210b6802e233ba8111ebc (commit)
       via  7ca68a06cb3b5ccf35b636933486ff6d647895fb (commit)
       via  681a7dc3c981b2c74e27617ebefb016a9e95de4f (commit)
       via  535fe33f88c968bcc12005213fe5209829aef3eb (commit)
       via  2d99eeb2ddf520c0d81c6a10f87c12ca4295343b (commit)
       via  74a622ef4c5a7321f349dae452593b08c68a0494 (commit)
       via  f54463ccec9e82eedc37ff7a09b9379a7ad51a9e (commit)
       via  8eb9572749ae2f73f4910b2cb4f55718f63bea55 (commit)
      from  c0427f383567332e2acb5209e5ffc3856ad3dc29 (commit)

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

- Log -----------------------------------------------------------------
commit ac727f6ebe55f3d1804d0b15aa6eb45ce62ce95a
Merge: c0427f383567332e2acb5209e5ffc3856ad3dc29 aeae4a8edcc90a5560ff3d9832ea79b65b119d9f
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Thu Jan 28 14:21:42 2010 -0500

    Merge branch 'master' into archer-swagiaal-upstream

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

Summary of changes:
 bfd/version.h                           |    2 +-
 gdb/ChangeLog                           |   18 ++
 gdb/procfs.c                            |  258 +++++++++++++++---------------
 gdb/testsuite/ChangeLog                 |   12 ++
 gdb/testsuite/gdb.base/break-interp.exp |    9 +-
 gdb/testsuite/gdb.cp/nsrecurs.cc        |   45 +++++-
 gdb/testsuite/gdb.cp/nsrecurs.exp       |   15 ++-
 gdb/testsuite/gdb.cp/nsusing.cc         |  130 ++++++++++++----
 gdb/testsuite/gdb.cp/nsusing.exp        |  131 +++++++++++++---
 gdb/version.in                          |    2 +-
 gdb/windows-nat.c                       |   22 ++-
 opcodes/ChangeLog                       |   12 ++
 opcodes/i386-dis.c                      |   31 ++--
 13 files changed, 469 insertions(+), 218 deletions(-)

First 500 lines of diff:
diff --git a/bfd/version.h b/bfd/version.h
index c8c4e8b..61fb4a2 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20100127
+#define BFD_VERSION_DATE 20100128
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cbfe494..db65d6d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-28  Joel Brobecker  <brobecker@adacore.com>
+
+	Another -Wunused-function error in procfs.c (sparc-solaris)
+	* procfs.c (insert_dbx_link_breakpoint): Delete declaration.  Move up.
+	Only define if SYS_syssgi is defined.
+	(remove_dbx_link_breakpoint): Delete declaration.  Move up.
+	(dbx_link_addr, insert_dbx_link_bpt_in_file)
+	(insert_dbx_link_bpt_in_region): Move up.  Only define if SYS_syssgi
+	is itself defined.
+
+2010-01-27  Christopher Faylor  <me+cygwin@cgf.cx>
+
+	* windows-nat.c (windows_initialization_done): New variable.
+	(get_windows_debug_event): Issue error when process dies before
+	completely initializing.
+	(do_initial_windows_stuff): Set flag to indicate when we are done with
+	the initial steps of attaching to the child.
+
 2010-01-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* symtab.h (struct symbol <symtab>): New comment on NULL values.
diff --git a/gdb/procfs.c b/gdb/procfs.c
index c6f50d2..1dd39b2 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -3463,8 +3463,6 @@ static void do_detach (int signo);
 static int register_gdb_signals (procinfo *, gdb_sigset_t *);
 static void proc_trace_syscalls_1 (procinfo *pi, int syscallnum,
                                    int entry_or_exit, int mode, int from_tty);
-static int insert_dbx_link_breakpoint (procinfo *pi);
-static void remove_dbx_link_breakpoint (void);
 
 /* On mips-irix, we need to insert a breakpoint at __dbx_link during
    the startup phase.  The following two variables are used to record
@@ -3948,6 +3946,135 @@ syscall_is_lwp_create (procinfo *pi, int scall)
   return 0;
 }
 
+/* Remove the breakpoint that we inserted in __dbx_link().
+   Does nothing if the breakpoint hasn't been inserted or has already
+   been removed.  */
+
+static void
+remove_dbx_link_breakpoint (void)
+{
+  if (dbx_link_bpt_addr == 0)
+    return;
+
+  if (deprecated_remove_raw_breakpoint (target_gdbarch, dbx_link_bpt) != 0)
+    warning (_("Unable to remove __dbx_link breakpoint."));
+
+  dbx_link_bpt_addr = 0;
+  dbx_link_bpt = NULL;
+}
+
+#ifdef SYS_syssgi
+/* Return the address of the __dbx_link() function in the file
+   refernced by ABFD by scanning its symbol table.  Return 0 if
+   the symbol was not found.  */
+
+static CORE_ADDR
+dbx_link_addr (bfd *abfd)
+{
+  long storage_needed;
+  asymbol **symbol_table;
+  long number_of_symbols;
+  long i;
+
+  storage_needed = bfd_get_symtab_upper_bound (abfd);
+  if (storage_needed <= 0)
+    return 0;
+
+  symbol_table = (asymbol **) xmalloc (storage_needed);
+  make_cleanup (xfree, symbol_table);
+
+  number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
+
+  for (i = 0; i < number_of_symbols; i++)
+    {
+      asymbol *sym = symbol_table[i];
+
+      if ((sym->flags & BSF_GLOBAL)
+          && sym->name != NULL && strcmp (sym->name, "__dbx_link") == 0)
+        return (sym->value + sym->section->vma);
+    }
+
+  /* Symbol not found, return NULL.  */
+  return 0;
+}
+
+/* Search the symbol table of the file referenced by FD for a symbol
+   named __dbx_link(). If found, then insert a breakpoint at this location,
+   and return nonzero.  Return zero otherwise.  */
+
+static int
+insert_dbx_link_bpt_in_file (int fd, CORE_ADDR ignored)
+{
+  bfd *abfd;
+  long storage_needed;
+  CORE_ADDR sym_addr;
+
+  abfd = bfd_fdopenr ("unamed", 0, fd);
+  if (abfd == NULL)
+    {
+      warning (_("Failed to create a bfd: %s."), bfd_errmsg (bfd_get_error ()));
+      return 0;
+    }
+
+  if (!bfd_check_format (abfd, bfd_object))
+    {
+      /* Not the correct format, so we can not possibly find the dbx_link
+         symbol in it.  */
+      bfd_close (abfd);
+      return 0;
+    }
+
+  sym_addr = dbx_link_addr (abfd);
+  if (sym_addr != 0)
+    {
+      /* Insert the breakpoint.  */
+      dbx_link_bpt_addr = sym_addr;
+      dbx_link_bpt = deprecated_insert_raw_breakpoint (target_gdbarch, NULL,
+						       sym_addr);
+      if (dbx_link_bpt == NULL)
+        {
+          warning (_("Failed to insert dbx_link breakpoint."));
+          bfd_close (abfd);
+          return 0;
+        }
+      bfd_close (abfd);
+      return 1;
+    }
+
+  bfd_close (abfd);
+  return 0;
+}
+
+/* If the given memory region MAP contains a symbol named __dbx_link,
+   insert a breakpoint at this location and return nonzero.  Return
+   zero otherwise.  */
+
+static int
+insert_dbx_link_bpt_in_region (struct prmap *map,
+                               int (*child_func) (),
+                               void *data)
+{
+  procinfo *pi = (procinfo *) data;
+
+  /* We know the symbol we're looking for is in a text region, so
+     only look for it if the region is a text one.  */
+  if (map->pr_mflags & MA_EXEC)
+    return solib_mappings_callback (map, insert_dbx_link_bpt_in_file, pi);
+
+  return 0;
+}
+
+/* Search all memory regions for a symbol named __dbx_link.  If found,
+   insert a breakpoint at its location, and return nonzero.  Return zero
+   otherwise.  */
+
+static int
+insert_dbx_link_breakpoint (procinfo *pi)
+{
+  return iterate_over_mappings (pi, NULL, pi, insert_dbx_link_bpt_in_region);
+}
+#endif
+
 /*
  * Function: target_wait
  *
@@ -5608,133 +5735,6 @@ proc_find_memory_regions (int (*func) (CORE_ADDR,
 				find_memory_regions_callback);
 }
 
-/* Remove the breakpoint that we inserted in __dbx_link().
-   Does nothing if the breakpoint hasn't been inserted or has already
-   been removed.  */
-
-static void
-remove_dbx_link_breakpoint (void)
-{
-  if (dbx_link_bpt_addr == 0)
-    return;
-
-  if (deprecated_remove_raw_breakpoint (target_gdbarch, dbx_link_bpt) != 0)
-    warning (_("Unable to remove __dbx_link breakpoint."));
-
-  dbx_link_bpt_addr = 0;
-  dbx_link_bpt = NULL;
-}
-
-/* Return the address of the __dbx_link() function in the file
-   refernced by ABFD by scanning its symbol table.  Return 0 if
-   the symbol was not found.  */
-
-static CORE_ADDR
-dbx_link_addr (bfd *abfd)
-{
-  long storage_needed;
-  asymbol **symbol_table;
-  long number_of_symbols;
-  long i;
-
-  storage_needed = bfd_get_symtab_upper_bound (abfd);
-  if (storage_needed <= 0)
-    return 0;
-
-  symbol_table = (asymbol **) xmalloc (storage_needed);
-  make_cleanup (xfree, symbol_table);
-
-  number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
-
-  for (i = 0; i < number_of_symbols; i++)
-    {
-      asymbol *sym = symbol_table[i];
-
-      if ((sym->flags & BSF_GLOBAL)
-          && sym->name != NULL && strcmp (sym->name, "__dbx_link") == 0)
-        return (sym->value + sym->section->vma);
-    }
-
-  /* Symbol not found, return NULL.  */
-  return 0;
-}
-
-/* Search the symbol table of the file referenced by FD for a symbol
-   named __dbx_link(). If found, then insert a breakpoint at this location,
-   and return nonzero.  Return zero otherwise.  */
-
-static int
-insert_dbx_link_bpt_in_file (int fd, CORE_ADDR ignored)
-{
-  bfd *abfd;
-  long storage_needed;
-  CORE_ADDR sym_addr;
-
-  abfd = bfd_fdopenr ("unamed", 0, fd);
-  if (abfd == NULL)
-    {
-      warning (_("Failed to create a bfd: %s."), bfd_errmsg (bfd_get_error ()));
-      return 0;
-    }
-
-  if (!bfd_check_format (abfd, bfd_object))
-    {
-      /* Not the correct format, so we can not possibly find the dbx_link
-         symbol in it.  */
-      bfd_close (abfd);
-      return 0;
-    }
-
-  sym_addr = dbx_link_addr (abfd);
-  if (sym_addr != 0)
-    {
-      /* Insert the breakpoint.  */
-      dbx_link_bpt_addr = sym_addr;
-      dbx_link_bpt = deprecated_insert_raw_breakpoint (target_gdbarch, NULL,
-						       sym_addr);
-      if (dbx_link_bpt == NULL)
-        {
-          warning (_("Failed to insert dbx_link breakpoint."));
-          bfd_close (abfd);
-          return 0;
-        }
-      bfd_close (abfd);
-      return 1;
-    }
-
-  bfd_close (abfd);
-  return 0;
-} 
-
-/* If the given memory region MAP contains a symbol named __dbx_link,
-   insert a breakpoint at this location and return nonzero.  Return
-   zero otherwise.  */
-
-static int
-insert_dbx_link_bpt_in_region (struct prmap *map,
-                               int (*child_func) (),
-                               void *data)
-{     
-  procinfo *pi = (procinfo *) data;
-        
-  /* We know the symbol we're looking for is in a text region, so
-     only look for it if the region is a text one.  */
-  if (map->pr_mflags & MA_EXEC)
-    return solib_mappings_callback (map, insert_dbx_link_bpt_in_file, pi);
- 
-  return 0;
-}           
-
-/* Search all memory regions for a symbol named __dbx_link.  If found,
-   insert a breakpoint at its location, and return nonzero.  Return zero
-   otherwise.  */
-
-static int
-insert_dbx_link_breakpoint (procinfo *pi)
-{
-  return iterate_over_mappings (pi, NULL, pi, insert_dbx_link_bpt_in_region);
-}
-
 /*
  * Function: mappingflags
  *
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 65459bf..d1cfb4b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-28  Sami Wagiaalla  <swagiaal@redhat.com>
+
+    * gdb.cp/nsusing.exp: Added more tests.
+    * gdb.cp/nsrecurs.exp: Ditto.
+    * gdb.cp/nsusing.cc: Added test functions.
+    * gdb.cp/nsrecurs.cc: Ditto.
+
+2010-01-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.base/break-interp.exp: Use [file tail $filename] to omit any
+	absolute directory pathnames in gdb.sum file.
+
 2010-01-27  Sami Wagiaalla  <swagiaal@redhat.com>
 
 	* gdb.cp/namespace-using.exp: Rename to nsusing.exp.
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index d1c36ed..e628979 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -502,17 +502,18 @@ foreach ldprelink {NO YES} {
 		    file mkdir $dir
 
 		    set command "ldd $exec"
+		    set test "ldd [file tail $exec]"
 		    set result [catch "exec $command" output]
 		    verbose -log "result of $command is $result"
 		    verbose -log "output of $command is $output"
 		    if {$result != 0 || $output == ""} {
-			fail $command
+			fail $test
 		    } else {
-			pass $command
+			pass $test
 		    }
 
 		    # gdb testsuite will put there also needless -lm.
-		    set test "$command output contains libc"
+		    set test "$test output contains libc"
 		    set libc [regexp -all -inline -line {^.* => (/[^ ]+).*$} $output]
 		    if {[llength $libc] == 0} {
 			fail $test
@@ -528,7 +529,7 @@ foreach ldprelink {NO YES} {
 			lappend dests $dest
 		    }
 
-		    if {[prelink$binprelink "--dynamic-linker=$interp --ld-library-path=$dir $exec $interp [concat $dests]" $exec]
+		    if {[prelink$binprelink "--dynamic-linker=$interp --ld-library-path=$dir $exec $interp [concat $dests]" [file tail $exec]]
 		        && [copy $interp_saved $interp]} {
 			test_ld $exec 1 [expr {$binsepdebug == "NO"}]
 		    }
diff --git a/gdb/testsuite/gdb.cp/nsrecurs.cc b/gdb/testsuite/gdb.cp/nsrecurs.cc
index 84605a6..2edc35f 100644
--- a/gdb/testsuite/gdb.cp/nsrecurs.cc
+++ b/gdb/testsuite/gdb.cp/nsrecurs.cc
@@ -1,30 +1,57 @@
-namespace A{
+namespace A
+{
   int ax = 9;
 }
 
-namespace B{
+namespace B
+{
   using namespace A;
 }
 
-namespace C{
+namespace C
+{
   using namespace B;
 }
 
+using namespace C;
+
 //---------------
-namespace D{
+namespace D
+{
   using namespace D;
   int dx = 99;
 }
-using namespace C;
+using namespace D;
 
 //---------------
-namespace{
-  namespace{
+namespace
+{
+  namespace
+  {
     int xx = 999;
   }
 }
 
-int main(){
+//---------------
+namespace E
+{
+  int ex = 9999;
+}
+
+namespace F
+{
+  namespace FE = E;
+}
+
+namespace G
+{
+  namespace GF = F;
+}
+
+//----------------
+int main ()
+{
   using namespace D;
-  return ax + dx + xx;
+  namespace GX = G;
+  return ax + dx + xx + G::GF::FE::ex;
 }
diff --git a/gdb/testsuite/gdb.cp/nsrecurs.exp b/gdb/testsuite/gdb.cp/nsrecurs.exp
index 9939a9f..f884a97 100644
--- a/gdb/testsuite/gdb.cp/nsrecurs.exp
+++ b/gdb/testsuite/gdb.cp/nsrecurs.exp
@@ -13,8 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test recursive namespace lookup
-
 if $tracelevel then {
     strace $tracelevel
 }
@@ -25,7 +23,8 @@ set bug_id 0
 set testfile nsrecurs
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" \
+      "${binfile}" executable {debug c++}] != "" } {
     untested "Couldn't compile test program"
     return -1
 }
@@ -65,3 +64,13 @@ gdb_test "print dx" "= 99"
 # anonymous namespace imports.
 
 gdb_test "print xx" "= 999"
+
+############################################
+# Test printing using recursive namespace
+# aliases.
+
+setup_kfail "gdb/10541" "*-*-*"
+gdb_test "ptype G::GF" "= namespace F"
+
+setup_kfail "gdb/10541" "*-*-*"
+gdb_test "print G::GF::FE::ex" "= 9999"
diff --git a/gdb/testsuite/gdb.cp/nsusing.cc b/gdb/testsuite/gdb.cp/nsusing.cc
index b1f0ce4..72ff941 100644
--- a/gdb/testsuite/gdb.cp/nsusing.cc
+++ b/gdb/testsuite/gdb.cp/nsusing.cc
@@ -1,34 +1,77 @@
-namespace O
+namespace M
 {
-  int ox = 4;
+  int x = 911;
 }
 
-namespace PQ
+namespace N
 {
-  int marker6 ()
+  int x = 912;
+}


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


             reply	other threads:[~2010-01-28 19:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 19:18 swagiaal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-11-16 18:17 swagiaal
2010-09-15 19:51 swagiaal
2010-05-10 19:31 swagiaal
2010-05-10 19:10 swagiaal
2010-03-17 15:14 swagiaal
2010-02-17 16:03 swagiaal
2010-01-27 19:36 swagiaal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100128191837.24139.qmail@sourceware.org \
    --to=swagiaal@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).