*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index ad6993e5ad08ad1d23b71b9806077090c9755d2b..79e38f21d57019a11de8d3a6f1e255263985bf13 100644 (file)
@@ -1,8 +1,6 @@
 /* Print values for GNU debugger GDB.
 
-   Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-   2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1986-2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,6 +30,7 @@
 #include "target.h"
 #include "breakpoint.h"
 #include "demangle.h"
+#include "gdb-demangle.h"
 #include "valprint.h"
 #include "annotate.h"
 #include "symfile.h"           /* for overlay functions */
@@ -62,9 +61,6 @@
 # define USE_PRINTF_I64 0
 #endif
 
-extern int asm_demangle;       /* Whether to demangle syms in asm
-                                  printouts.  */
-
 struct format_data
   {
     int count;
@@ -642,7 +638,7 @@ build_address_symbolic (struct gdbarch *gdbarch,
   struct symbol *symbol;
   CORE_ADDR name_location = 0;
   struct obj_section *section = NULL;
-  char *name_temp = "";
+  const char *name_temp = "";
   
   /* Let's say it is mapped (not unmapped).  */
   *unmapped = 0;
@@ -1084,6 +1080,12 @@ set_command (char *exp, int from_tty)
   struct cleanup *old_chain =
     make_cleanup (free_current_contents, &expr);
 
+  if (expr->nelts >= 1
+      && expr->elts[0].opcode != BINOP_ASSIGN
+      && expr->elts[0].opcode != BINOP_ASSIGN_MODIFY
+      && expr->elts[0].opcode != BINOP_COMMA)
+    warning (_("Expression is not an assignment (and might have no effect)"));
+
   evaluate_expression (expr);
   do_cleanups (old_chain);
 }
This page took 0.024166 seconds and 4 git commands to generate.