public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-vla: .
@ 2011-09-26 20:17 jkratoch
  0 siblings, 0 replies; 2+ messages in thread
From: jkratoch @ 2011-09-26 20:17 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-vla has been updated
       via  51dab9e418741ac7065cd5a6ec9b57285e90227c (commit)
      from  11cf46bbcde785f048af0f38214eaf967f304d46 (commit)

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

- Log -----------------------------------------------------------------
commit 51dab9e418741ac7065cd5a6ec9b57285e90227c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Sep 26 22:16:49 2011 +0200

    .

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

Summary of changes:
 gdb/printcmd.c                       |    4 +++
 gdb/testsuite/gdb.base/vla-frame.c   |   31 +++++++++++++++++++++++++++
 gdb/testsuite/gdb.base/vla-frame.exp |   38 ++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+), 0 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/vla-frame.c
 create mode 100644 gdb/testsuite/gdb.base/vla-frame.exp

First 500 lines of diff:
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index e97d7f1..d86a651 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1981,6 +1981,10 @@ print_variable_and_value (const char *name, struct symbol *var,
       struct value_print_options opts;
 
       val = read_var_value (var, frame);
+
+      make_cleanup_restore_selected_frame ();
+      select_frame (frame);
+
       get_user_print_options (&opts);
       common_val_print (val, stream, indent, &opts, current_language);
     }
diff --git a/gdb/testsuite/gdb.base/vla-frame.c b/gdb/testsuite/gdb.base/vla-frame.c
new file mode 100644
index 0000000..5750f68
--- /dev/null
+++ b/gdb/testsuite/gdb.base/vla-frame.c
@@ -0,0 +1,31 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2011 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 <string.h>
+
+int
+main (int argc, char **argv)
+{
+  char s[2 + argc];
+  void (*f) (char *) = 0;
+
+  memset (s, 0, sizeof (s));
+  s[0] = 'X';
+
+  f (s);
+  return 0;
+}
diff --git a/gdb/testsuite/gdb.base/vla-frame.exp b/gdb/testsuite/gdb.base/vla-frame.exp
new file mode 100644
index 0000000..47736c7
--- /dev/null
+++ b/gdb/testsuite/gdb.base/vla-frame.exp
@@ -0,0 +1,38 @@
+# Copyright 2011 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/>.
+
+set testfile vla-frame
+set executable ${testfile}
+
+if { [prepare_for_testing ${testfile}.exp ${executable}] } {
+    return -1
+}
+
+if ![runto_main] {
+    return -1
+}
+
+set test "continue"
+gdb_test_multiple $test $test {
+    -re "Continuing\\.\r\n\r\nProgram received signal SIGSEGV, Segmentation fault\\.\r\n0x0+ in \\?\\? \\(\\)\r\n$gdb_prompt $" {
+	pass $test
+    }
+    -re "\r\n$gdb_prompt $" {
+	untested ${testfile}.exp
+	return
+    }
+}
+
+gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*"


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


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

* [SCM]  archer-jankratochvil-vla: .
@ 2011-12-18 21:24 jkratoch
  0 siblings, 0 replies; 2+ messages in thread
From: jkratoch @ 2011-12-18 21:24 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-vla has been updated
       via  36a2739be02aab088068b3fd575ff8ff313a956e (commit)
       via  554bc23ada8eed89ea7ee3be8696161c11352257 (commit)
      from  8163a203443198279a082f8b75d4ee4fe1740f72 (commit)

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

- Log -----------------------------------------------------------------
commit 36a2739be02aab088068b3fd575ff8ff313a956e
Merge: 8163a20 554bc23
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Dec 18 22:24:19 2011 +0100

    .

commit 554bc23ada8eed89ea7ee3be8696161c11352257
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Dec 18 20:55:08 2011 +0000

    gdb/gdbserver/
    	* linux-low.c (linux_create_inferior): Put empty if clause for write.
    
    	Revert:
    	2011-12-18  Hui Zhu  <teawater@gmail.com>
    	* linux-low.c (linux_create_inferior): Save return value to ret.

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

Summary of changes:
 gdb/gdbserver/ChangeLog   |    8 ++++++++
 gdb/gdbserver/linux-low.c |    5 +++--
 2 files changed, 11 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a7ad945..7675733 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* linux-low.c (linux_create_inferior): Put empty if clause for write.
+
+	Revert:
+	2011-12-18  Hui Zhu  <teawater@gmail.com>
+	* linux-low.c (linux_create_inferior): Save return value to ret.
+
 2011-12-18  Hui Zhu  <teawater@gmail.com>
 
 	* linux-low.c (linux_create_inferior): Save return value to ret.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index a712b1f..c99e0a3 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -577,8 +577,9 @@ linux_create_inferior (char *program, char **allargs)
 	  close (0);
 	  open ("/dev/null", O_RDONLY);
 	  dup2 (2, 1);
-	  write (2, "stdin/stdout redirected\n",
-		 sizeof ("stdin/stdout redirected\n") - 1);
+	  if (write (2, "stdin/stdout redirected\n",
+		     sizeof ("stdin/stdout redirected\n") - 1) < 0)
+	    /* Errors ignored.  */;
 	}
 
       execv (program, allargs);


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


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

end of thread, other threads:[~2011-12-18 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26 20:17 [SCM] archer-jankratochvil-vla: jkratoch
2011-12-18 21:24 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).