* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / ch-typeprint.c
index 3311e1f92004f9ab3c3641d87248dda8a10dbac8..f06a85cca79baa2b6aed401561eddcd212e5c1fd 100644 (file)
@@ -106,7 +106,8 @@ chill_type_print_base (type, stream, show, level)
       case TYPE_CODE_PTR:
        if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
          {
-           fprintf_filtered (stream, "PTR");
+           fprintf_filtered (stream,
+                             TYPE_NAME (type) ? TYPE_NAME (type) : "PTR");
            break;
          }
        fprintf_filtered (stream, "REF ");
@@ -118,7 +119,8 @@ chill_type_print_base (type, stream, show, level)
           anyone ever fixes the compiler to give us the real names
           in the presence of the chill equivalent of typedef (assuming
           there is one).  */
-       fprintf_filtered (stream, "BOOL");
+       fprintf_filtered (stream,
+                         TYPE_NAME (type) ? TYPE_NAME (type) : "BOOL");
        break;
 
       case TYPE_CODE_ARRAY:
@@ -141,7 +143,7 @@ chill_type_print_base (type, stream, show, level)
 
       case TYPE_CODE_SET:
         fputs_filtered ("POWERSET ", stream);
-       chill_print_type (TYPE_FIELD_TYPE (type, 0), "", stream,
+       chill_print_type (TYPE_INDEX_TYPE (type), "", stream,
                          show - 1, level);
        break;
 
@@ -163,12 +165,36 @@ chill_type_print_base (type, stream, show, level)
         chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
        break;
       case TYPE_CODE_FUNC:
-       fprintf_filtered (stream, "PROC (?)");
-        chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
+       fprintf_filtered (stream, "PROC (");
+       len = TYPE_NFIELDS (type);
+       for (i = 0; i < len; i++)
+         {
+           struct type *param_type = TYPE_FIELD_TYPE (type, i);
+           if (i > 0)
+             {
+               fputs_filtered (", ", stream);
+               wrap_here ("    ");
+             }
+           if (TYPE_CODE (param_type) == TYPE_CODE_REF)
+             {
+               chill_type_print_base (TYPE_TARGET_TYPE (param_type),
+                                      stream, show, level);
+               fputs_filtered (" LOC", stream);
+             }
+           else
+             chill_type_print_base (param_type, stream, show, level);
+         }
+       fprintf_filtered (stream, ")");
+       if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
+         {
+           fputs_filtered (" RETURNS (", stream);
+           chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
+           fputs_filtered (")", stream);
+         }
        break;
 
       case TYPE_CODE_STRUCT:
-       if (chill_is_varying_struct (type))
+       if (chill_varying_type (type))
          {
            chill_type_print_base (TYPE_FIELD_TYPE (type, 1),
                                   stream, show, level);
This page took 0.024232 seconds and 4 git commands to generate.