* infrun.c (follow_fork): Initialize new step_* locals
[deliverable/binutils-gdb.git] / gdb / expprint.c
index 756a02eb8763108815ad198777e45ee253087e23..6048a387e6d81873cbaad6e916ffdc795ed053f8 100644 (file)
@@ -1,7 +1,7 @@
 /* Print in infix form a struct expression.
 
    Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2003, 2007, 2008 Free Software Foundation, Inc.
+   1998, 1999, 2000, 2003, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -186,8 +186,8 @@ print_subexp_standard (struct expression *exp, int *pos,
           If necessary, we can temporarily set it to zero, or pass it as an
           additional parameter to LA_PRINT_STRING.  -fnf */
        get_user_print_options (&opts);
-       LA_PRINT_STRING (stream, &exp->elts[pc + 2].string, nargs, 1, 0,
-                        &opts);
+       LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
+                        &exp->elts[pc + 2].string, nargs, 0, &opts);
       }
       return;
 
@@ -205,8 +205,8 @@ print_subexp_standard (struct expression *exp, int *pos,
        (*pos) += 3 + BYTES_TO_EXP_ELEM (nargs + 1);
        fputs_filtered ("@\"", stream);
        get_user_print_options (&opts);
-       LA_PRINT_STRING (stream, &exp->elts[pc + 2].string, nargs, 1, 0,
-                        &opts);
+       LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
+                        &exp->elts[pc + 2].string, nargs, 0, &opts);
        fputs_filtered ("\"", stream);
       }
       return;
@@ -291,8 +291,8 @@ print_subexp_standard (struct expression *exp, int *pos,
        {
          struct value_print_options opts;
          get_user_print_options (&opts);
-         LA_PRINT_STRING (stream, tempstr, nargs - 1, 1, 0,
-                          &opts);
+         LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
+                          tempstr, nargs - 1, 0, &opts);
          (*pos) = pc;
        }
       else
@@ -802,6 +802,9 @@ op_name_standard (enum exp_opcode opcode)
     }
 }
 
+/* Print a raw dump of expression EXP to STREAM.
+   NOTE, if non-NULL, is printed as extra explanatory text.  */
+
 void
 dump_raw_expression (struct expression *exp, struct ui_file *stream,
                     char *note)
@@ -813,7 +816,9 @@ dump_raw_expression (struct expression *exp, struct ui_file *stream,
 
   fprintf_filtered (stream, "Dump of expression @ ");
   gdb_print_host_address (exp, stream);
-  fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %ld bytes each.\n",
+  if (note)
+    fprintf_filtered (stream, ", %s:", note);
+  fprintf_filtered (stream, "\n\tLanguage %s, %d elements, %ld bytes each.\n",
                    exp->language_defn->la_name, exp->nelts,
                    (long) sizeof (union exp_element));
   fprintf_filtered (stream, "\t%5s  %20s  %16s  %s\n", "Index", "Opcode",
This page took 0.024435 seconds and 4 git commands to generate.