Add "make pdf" and "make install-pdf", from Brooks Moses
[deliverable/binutils-gdb.git] / gdb / valprint.c
index d730917a08dae72c651192807214219da16248b6..c2663e12e3ba3cb2647be9995d1ef5a686c7dd42 100644 (file)
@@ -1,7 +1,7 @@
 /* Print values for GDB, the GNU debugger.
 
-   Copyright (C) 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Copyright (C) 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+   1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -207,13 +207,12 @@ val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
           int deref_ref, int recurse, enum val_prettyprint pretty)
 {
   volatile struct gdb_exception except;
+  volatile enum val_prettyprint real_pretty = pretty;
   int ret = 0;
 
   struct type *real_type = check_typedef (type);
   if (pretty == Val_pretty_default)
-    {
-      pretty = prettyprint_structs ? Val_prettyprint : Val_no_prettyprint;
-    }
+    real_pretty = prettyprint_structs ? Val_prettyprint : Val_no_prettyprint;
 
   QUIT;
 
@@ -231,7 +230,7 @@ val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
   TRY_CATCH (except, RETURN_MASK_ERROR)
     {
       ret = LA_VAL_PRINT (type, valaddr, embedded_offset, address,
-                         stream, format, deref_ref, recurse, pretty);
+                         stream, format, deref_ref, recurse, real_pretty);
     }
   if (except.reason < 0)
     fprintf_filtered (stream, _("<error reading variable>"));
@@ -341,13 +340,14 @@ void
 val_print_type_code_flags (struct type *type, const gdb_byte *valaddr,
                           struct ui_file *stream)
 {
-  LONGEST val = unpack_long (type, valaddr);
+  ULONGEST val = unpack_long (type, valaddr);
   int bitpos, nfields = TYPE_NFIELDS (type);
 
   fputs_filtered ("[ ", stream);
   for (bitpos = 0; bitpos < nfields; bitpos++)
     {
-      if (TYPE_FIELD_BITPOS (type, bitpos) != -1 && (val & (1 << bitpos)))
+      if (TYPE_FIELD_BITPOS (type, bitpos) != -1
+         && (val & ((ULONGEST)1 << bitpos)))
        {
          if (TYPE_FIELD_NAME (type, bitpos))
            fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
This page took 0.024171 seconds and 4 git commands to generate.