public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: sergio@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-sergio-catch-syscall: Merge commit 'gdb/master' into catch-syscall
Date: Wed, 12 Nov 2008 17:40:00 -0000	[thread overview]
Message-ID: <20081112174016.314.qmail@sourceware.org> (raw)

The branch, archer-sergio-catch-syscall has been updated
       via  c7c93be2ade609b28ac7131f4885d1e2f25e7f92 (commit)
       via  c219a7436c70547cae2b9fd04c6753f8b5413eb4 (commit)
       via  8c3691546a6d49856ae77ef3ad7a082edff27e29 (commit)
       via  9f0175f8f67ad30d74e31ecefa8bb97823bd48fa (commit)
       via  77bb678838103017a6bfc64e3c5f7bc3d1c2bd54 (commit)
       via  548f2726ce84ff4fc97fed6824faaa1745520a37 (commit)
       via  bf0c6dc1673d8bbdc899edb7086f1d99949b97aa (commit)
       via  ee3b086123639ba7c4e345f9d36be66cf1f5edfd (commit)
      from  505a054d0c8817668cc30397690ad75fe1204113 (commit)

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

- Log -----------------------------------------------------------------
commit c7c93be2ade609b28ac7131f4885d1e2f25e7f92
Merge: 505a054d0c8817668cc30397690ad75fe1204113 c219a7436c70547cae2b9fd04c6753f8b5413eb4
Author: Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Date:   Wed Nov 12 09:40:02 2008 -0800

    Merge commit 'gdb/master' into catch-syscall

commit c219a7436c70547cae2b9fd04c6753f8b5413eb4
Author: Tristan Gingold <gingold@adacore.com>
Date:   Wed Nov 12 10:27:57 2008 +0000

    2008-11-12  Tristan Gingold  <gingold@adacore.com>
    
    	* bfd.c (bfd_get_sign_extend_vma): Return 0 for mach-o.

commit 8c3691546a6d49856ae77ef3ad7a082edff27e29
Author: Doug Evans <dje@google.com>
Date:   Wed Nov 12 00:39:27 2008 +0000

    	* infcall.c (call_function_by_hand): Handle inferior exit.
    
    	* gdb.base/callexit.exp: New file.
    	* gdb.base/callexit.c: New file.

commit 9f0175f8f67ad30d74e31ecefa8bb97823bd48fa
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Wed Nov 12 00:00:33 2008 +0000

    *** empty log message ***

commit 77bb678838103017a6bfc64e3c5f7bc3d1c2bd54
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Tue Nov 11 23:58:59 2008 +0000

    daily update

commit 548f2726ce84ff4fc97fed6824faaa1745520a37
Author: Joel Sherrill <joel@oarcorp.com>
Date:   Tue Nov 11 22:20:54 2008 +0000

    2008-11-10  Joel Sherrill <joel.sherrill@oarcorp.com>
    
    	* erc32.c, exec.c: Fix warnings.

commit bf0c6dc1673d8bbdc899edb7086f1d99949b97aa
Author: Thiago Jung Bauermann <bauerman@br.ibm.com>
Date:   Tue Nov 11 22:07:40 2008 +0000

    	* remote-sim.c (gdbsim_create_inferior, gdbsim_mourn_inferior): Add
    	missing struct target_ops argument.

commit ee3b086123639ba7c4e345f9d36be66cf1f5edfd
Author: Joel Sherrill <joel@oarcorp.com>
Date:   Tue Nov 11 22:05:44 2008 +0000

    2008-11-11  Joel Sherrill <joel.sherrilL@oarcorp.com>
    
    	* MAINTAINERS: Add myself for write after approval privileges.

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

Summary of changes:
 bfd/ChangeLog                       |    4 ++
 bfd/bfd.c                           |    3 +
 bfd/version.h                       |    2 +-
 gdb/ChangeLog                       |   13 +++++
 gdb/MAINTAINERS                     |    1 +
 gdb/infcall.c                       |   10 ++++
 gdb/remote-sim.c                    |    7 ++-
 gdb/testsuite/ChangeLog             |    5 ++
 gdb/testsuite/gdb.base/callexit.c   |   33 +++++++++++++
 gdb/testsuite/gdb.base/callexit.exp |   90 +++++++++++++++++++++++++++++++++++
 gdb/version.in                      |    2 +-
 sim/erc32/ChangeLog                 |    4 ++
 sim/erc32/erc32.c                   |    5 +-
 sim/erc32/exec.c                    |    4 +-
 14 files changed, 174 insertions(+), 9 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/callexit.c
 create mode 100644 gdb/testsuite/gdb.base/callexit.exp

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c539cf7..0452dbb 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2008-11-12  Tristan Gingold  <gingold@adacore.com>
+
+	* bfd.c (bfd_get_sign_extend_vma): Return 0 for mach-o.
+
 2008-11-11  Alan Modra  <amodra@bigpond.net.au>
 
 	* elf.c (assign_file_positions_for_non_load_sections): Consolidate
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 1ffd7d0..1900c14 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1001,6 +1001,9 @@ bfd_get_sign_extend_vma (bfd *abfd)
       || strcmp (name, "pei-arm-wince-little") == 0)
     return 1;
 
+  if (CONST_STRNEQ (name, "mach-o"))
+    return 0;
+
   bfd_set_error (bfd_error_wrong_format);
   return -1;
 }
diff --git a/bfd/version.h b/bfd/version.h
index 6d90504..ec8acbc 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20081111
+#define BFD_VERSION_DATE 20081112
 #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 b2d74fc..3f04ade 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+2008-11-11  Doug Evans  <dje@google.com>
+
+	* infcall.c (call_function_by_hand): Handle inferior exit.
+
+2008-11-11  Thiago Jung Bauermann  <bauerman@br.ibm.com>
+
+	* remote-sim.c (gdbsim_create_inferior, gdbsim_mourn_inferior): Add
+	missing struct target_ops argument.
+
+2008-11-11  Joel Sherrill <joel.sherrilL@oarcorp.com>
+
+	* MAINTAINERS: Add myself for write after approval privileges.
+
 2008-11-10  Tom Tromey  <tromey@redhat.com>
 
 	* gdbtypes.c (copy_type_recursive): Clear new fields.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 754d1cd..150b6e4 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -568,6 +568,7 @@ Thomas Schwinge					tschwinge@gnu.org
 Keith Seitz					keiths@redhat.com
 Carlos Eduardo Seo				cseo@linux.vnet.ibm.com
 Stan Shebs					stan@codesourcery.com
+Joel Sherrill					joel.sherrill@oarcorp.com
 Mark Shinwell					shinwell@codesourcery.com
 Craig Silverstein				csilvers@google.com
 Aidan Skinner					aidan@velvet.net
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 5cc068a..aa3bee0 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -699,6 +699,16 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
     discard_cleanups (old_cleanups);
   }
 
+  if (! target_has_execution)
+    {
+      /* If we try to restore the inferior status (via the cleanup),
+	 we'll crash as the inferior is no longer running.  */
+      discard_cleanups (inf_status_cleanup);
+      discard_inferior_status (inf_status);
+      error (_("\
+The program being debugged exited while in a function called from GDB."));
+    }
+
   if (stopped_by_random_signal || !stop_stack_dummy)
     {
       /* Find the name of the function we're about to complain about.  */
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 62f9cb1..6f92ad8 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -94,7 +94,7 @@ static void gdbsim_prepare_to_store (struct regcache *regcache);
 
 static void gdbsim_files_info (struct target_ops *target);
 
-static void gdbsim_mourn_inferior (void);
+static void gdbsim_mourn_inferior (struct target_ops *target);
 
 static void gdbsim_stop (ptid_t ptid);
 
@@ -445,7 +445,8 @@ gdbsim_load (char *args, int fromtty)
    user types "run" after having attached.  */
 
 static void
-gdbsim_create_inferior (char *exec_file, char *args, char **env, int from_tty)
+gdbsim_create_inferior (struct target_ops *target, char *exec_file, char *args,
+			char **env, int from_tty)
 {
   int len;
   char *arg_buf, **argv;
@@ -822,7 +823,7 @@ gdbsim_files_info (struct target_ops *target)
 /* Clear the simulator's notion of what the break points are.  */
 
 static void
-gdbsim_mourn_inferior (void)
+gdbsim_mourn_inferior (struct target_ops *target)
 {
   if (remote_debug)
     printf_filtered ("gdbsim_mourn_inferior:\n");
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2e739d7..0da2e5f 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-11  Doug Evans  <dje@google.com>
+
+	* gdb.base/callexit.exp: New file.
+	* gdb.base/callexit.c: New file.
+
 2008-11-10  Doug Evans  <dje@google.com>
 
 	* lib/gdb.exp (GDBFLAGS): Move -nx ...
diff --git a/gdb/testsuite/gdb.base/callexit.c b/gdb/testsuite/gdb.base/callexit.c
new file mode 100644
index 0000000..f08d800
--- /dev/null
+++ b/gdb/testsuite/gdb.base/callexit.c
@@ -0,0 +1,33 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008 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/>.  */
+
+/* Support program for testing gdb's ability to handle an
+   inferior function call that terminates the program.  */
+
+#include <stdlib.h>
+
+void
+callexit ()
+{
+  exit (0);
+}
+
+int
+main ()
+{
+  return 0;
+}
diff --git a/gdb/testsuite/gdb.base/callexit.exp b/gdb/testsuite/gdb.base/callexit.exp
new file mode 100644
index 0000000..6d4149b
--- /dev/null
+++ b/gdb/testsuite/gdb.base/callexit.exp
@@ -0,0 +1,90 @@
+# Copyright 2008 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 $tracelevel then {
+	strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "callexit"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+     untested callexit.exp
+     return -1
+}
+
+# Some targets can't do function calls, so don't even bother with this
+# test.
+if [target_info exists gdb,cannot_call_functions] {
+    setup_xfail "*-*-*" 2416
+    fail "This target can not call functions"
+    continue
+}
+
+# Set the current language to C.  This counts as a test.  If it
+# fails, then we skip the other tests.
+
+proc set_lang_c {} {
+    global gdb_prompt
+
+    send_gdb "set language c\n"
+    gdb_expect {
+	-re ".*$gdb_prompt $" {}
+	timeout { fail "set language c (timeout)" ; return 0; }
+    }
+
+    send_gdb "show language\n"
+    gdb_expect {
+	-re ".* source language is \"c\".*$gdb_prompt $" {
+	    pass "set language to \"c\""
+	    return 1
+	}
+	-re ".*$gdb_prompt $" {
+	    fail "setting language to \"c\""
+	    return 0
+	}
+	timeout {
+	    fail "can't show language (timeout)"
+	    return 0
+	}
+    }
+}
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if { ![set_lang_c] } {
+    gdb_suppress_tests;
+} else {
+    if { ![runto_main] } {
+	gdb_suppress_tests;
+    }
+}
+
+# Call function (causing the program to exit), and see if gdb handles
+# it properly.
+gdb_test "call callexit()" \
+	"The program being debugged exited.*" \
+	"inferior function call terminated program"
+
+return 0
diff --git a/gdb/version.in b/gdb/version.in
index 408f520..7682c58 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-6.8.50.20081111-cvs
+6.8.50.20081112-cvs
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index 27d99f5..c4a3db5 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,3 +1,7 @@
+2008-11-10  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+	* erc32.c, exec.c: Fix warnings.
+
 2008-07-11  Hans-Peter Nilsson  <hp@axis.com>
 
 	* configure: Regenerate to track ../common/common.m4 changes.
diff --git a/sim/erc32/erc32.c b/sim/erc32/erc32.c
index 0b3f3ac..c79dfd6 100644
--- a/sim/erc32/erc32.c
+++ b/sim/erc32/erc32.c
@@ -24,6 +24,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
+#include <string.h>
 #include <termios.h>
 #include <sys/fcntl.h>
 #include <sys/file.h>
@@ -1659,7 +1660,7 @@ memory_read(asi, addr, data, sz, ws)
 	errmec = 0;
 	return(1);
     }
-#endif;
+#endif
 
     if ((addr >= mem_ramstart) && (addr < (mem_ramstart + mem_ramsz))) {
 	fetch_bytes (asi, &ramb[addr & mem_rammask], data, sz);
@@ -1736,7 +1737,7 @@ memory_write(asi, addr, data, sz, ws)
 	errmec = 0;
 	return(1);
     }
-#endif;
+#endif
 
     if ((addr >= mem_ramstart) && (addr < (mem_ramstart + mem_ramsz))) {
 	if (mem_accprot) {
diff --git a/sim/erc32/exec.c b/sim/erc32/exec.c
index c9765d9..0aca49e 100644
--- a/sim/erc32/exec.c
+++ b/sim/erc32/exec.c
@@ -1713,7 +1713,7 @@ fpexec(op3, rd, rs1, rs2, sregs)
     	    sregs->fdp[rs2 | 1] = sregs->fs[rs2 & ~1];
     	    sregs->fdp[rs2 & ~1] = sregs->fs[rs2 | 1];
     default:
-      ;
+      break;
     }
 #endif
 
@@ -1886,7 +1886,7 @@ fpexec(op3, rd, rs1, rs2, sregs)
 	sregs->fs[rd & ~1] = sregs->fdp[rd | 1];
 	sregs->fs[rd | 1] = sregs->fdp[rd & ~1];
     default:
-      ;
+      break;
     }
 #endif
     if (sregs->fpstate == FP_EXC_PE) {


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


             reply	other threads:[~2008-11-12 17:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 17:40 sergio [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-11-17 17:57 sergio
2008-11-14 19:04 sergio
2008-11-11 18:33 sergio

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=20081112174016.314.qmail@sourceware.org \
    --to=sergio@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).