public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-vla: Fix the `output' command for VLA objects.
@ 2011-11-27 20:33 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2011-11-27 20:33 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-vla has been updated
       via  888d3adcef81341de12e9da424c660152adc0178 (commit)
      from  fb9d144c4cb4152a1e20e8fecf58ff556fd110d6 (commit)

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

- Log -----------------------------------------------------------------
commit 888d3adcef81341de12e9da424c660152adc0178
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Nov 27 21:32:46 2011 +0100

    Fix the `output' command for VLA objects.

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

Summary of changes:
 gdb/printcmd.c                        |    4 ++++
 gdb/testsuite/gdb.fortran/dynamic.exp |    7 +++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

First 500 lines of diff:
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index d86a651..1701059 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -50,6 +50,7 @@
 #include "charset.h"
 #include "arch-utils.h"
 #include "cli/cli-utils.h"
+#include "dwarf2loc.h"
 
 #ifdef TUI
 #include "tui/tui.h"		/* For tui_active et al.   */
@@ -1068,6 +1069,9 @@ output_command (char *exp, int from_tty)
 
   val = evaluate_expression (expr);
 
+  if (VALUE_LVAL (val) == lval_memory)
+    object_address_set (value_raw_address (val));
+
   annotate_value_begin (value_type (val));
 
   get_formatted_print_options (&opts, format);
diff --git a/gdb/testsuite/gdb.fortran/dynamic.exp b/gdb/testsuite/gdb.fortran/dynamic.exp
index 3b4a43f..e79e94a 100644
--- a/gdb/testsuite/gdb.fortran/dynamic.exp
+++ b/gdb/testsuite/gdb.fortran/dynamic.exp
@@ -65,6 +65,13 @@ gdb_test "p varx(6, 15, 28)" "\\$\[0-9\]* = 9"
 gdb_test "p varv" "\\$\[0-9\]* = (<(object|the array) is not associated>|.*(Cannot access it|Unable to access the object) because the object is not associated.)" "p varv unassociated"
 gdb_test "ptype varv" "type = (<(object|the array) is not associated>|.*(Cannot access it|Unable to access the object) because the object is not associated.)" "ptype varv unassociated"
 
+set test "output varx"
+gdb_test_multiple $test $test {
+    -re "^output varx\r\n\[() ,6789.\]*$gdb_prompt $" {
+	pass $test
+    }
+}
+
 gdb_breakpoint [gdb_get_line_number "varv-associated"]
 gdb_continue_to_breakpoint "varv-associated"
 gdb_test "p varx(3, 7, 19)" "\\$\[0-9\]* = 6" "p varx(3, 7, 19) with varv associated"


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-27 20:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-27 20:33 [SCM] archer-jankratochvil-vla: Fix the `output' command for VLA objects 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).