* utils.c (fputs_maybe_filtered): Check if there's already a top
[deliverable/binutils-gdb.git] / gdb / jv-typeprint.c
index 18bfc32b385a91b56ca9ab392bd2b7e8235903f0..03b6036f1a0cb0033d816616827d5e555b34f57c 100644 (file)
@@ -1,11 +1,12 @@
 /* Support for printing Java types for GDB, the GNU debugger.
-   Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    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 2 of the License, or
+   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,
@@ -14,9 +15,7 @@
    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, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include "defs.h"
@@ -186,7 +185,7 @@ java_type_print_base (struct type *type, struct ui_file *stream, int show,
                    fprintf_filtered (stream, "public ");
                }
 
-             if (TYPE_FIELD_STATIC (type, i))
+             if (field_is_static (&TYPE_FIELD (type, i)))
                fprintf_filtered (stream, "static ");
 
              java_print_type (TYPE_FIELD_TYPE (type, i),
@@ -338,6 +337,6 @@ java_print_type (struct type *type, char *varstring, struct ui_file *stream,
   /* For demangled function names, we have the arglist as part of the name,
      so don't print an additional pair of ()'s */
 
-  demangled_args = strchr (varstring, '(') != NULL;
+  demangled_args = varstring != NULL && strchr (varstring, '(') != NULL;
   c_type_print_varspec_suffix (type, stream, show, 0, demangled_args);
 }
This page took 0.046936 seconds and 4 git commands to generate.