1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / jv-lang.c
index 603b2253902ff72677aa61bd57462e3208784c32..8ada2e7fbceba75513bcfde6e93ad74440e2d2b2 100644 (file)
@@ -1,5 +1,5 @@
 /* Java language support routines for GDB, the GNU debugger.
-   Copyright 1997 Free Software Foundation, Inc.
+   Copyright 1997, 1998 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -44,21 +44,28 @@ struct type *java_float_type;
 struct type *java_double_type;
 struct type *java_void_type;
 
-struct type *java_object_type;
+static void java_emit_char PARAMS ((int c, GDB_FILE *stream, int quoter));
 
 /* This objfile contains symtabs that have been dynamically created
    to record dynamically loaded Java classes and dynamically
    compiled java methods. */
-struct objfile *dynamics_objfile = NULL;
 
-struct type *java_link_class_type PARAMS((struct type*, value_ptr));
+static struct objfile *dynamics_objfile = NULL;
 
-struct objfile *
+static struct type *java_link_class_type PARAMS ((struct type *, value_ptr));
+
+static struct objfile *
 get_dynamics_objfile ()
 {
   if (dynamics_objfile == NULL)
     {
-      dynamics_objfile = allocate_objfile (NULL, 0);
+
+/* CHECK WITH STU -- edie. Params 3 and 4 are USER_LOADED and IS_SOLIB. 
+   USER_LOADED - used by run_command to remove old objfile entries which 
+                 are no longer valid 
+   IS_SOLIB    - 1 if the object file is a shared library */
+
+      dynamics_objfile = allocate_objfile (NULL, 0, 0, 0);
     }
   return dynamics_objfile;
 }
@@ -560,7 +567,9 @@ java_link_class_type (type, clas)
   return type;
 }
 
-struct type*
+static struct type *java_object_type;
+
+struct type *
 get_java_object_type ()
 {
   return java_object_type;
@@ -704,15 +713,16 @@ java_value_string (ptr, len)
   error ("not implemented - java_value_string"); /* FIXME */
 }
 
-static void java_printchar PARAMS ((int c, GDB_FILE *stream));
+/* Print the character C on STREAM as part of the contents of a literal
+   string whose delimiter is QUOTER.  Note that that format for printing
+   characters and strings is language specific. */
 
 static void
-java_printchar (c, stream)
+java_emit_char (c, stream, quoter)
      int c;
      GDB_FILE *stream;
+     int quoter;
 {
-  fputc_filtered ('\'', stream);
-
   switch (c)
     {
     case '\\':
@@ -741,8 +751,6 @@ java_printchar (c, stream)
        fprintf_filtered (stream, "\\u%.4x", (unsigned int) c);
       break;
     }
-
-  fputc_filtered ('\'', stream);
 }
 
 static value_ptr
@@ -929,8 +937,9 @@ const struct language_defn java_language_defn = {
   java_parse,
   java_error,
   evaluate_subexp_java,
-  java_printchar,              /* Print a character constant */
+  c_printchar,                 /* Print a character constant */
   c_printstr,                  /* Function to print string constant */
+  java_emit_char,              /* Function to print a single character */
   java_create_fundamental_type,        /* Create fundamental type in this language */
   java_print_type,             /* Print a type using appropriate syntax */
   java_val_print,              /* Print a value using appropriate syntax */
This page took 0.024138 seconds and 4 git commands to generate.