summaryrefslogtreecommitdiff
path: root/gdb/ch-typeprint.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-02-12 18:46:45 +0000
committerPer Bothner <per@bothner.com>1995-02-12 18:46:45 +0000
commit27202b6a4746af217ab914394a1ab9b111b1db3c (patch)
treef9ae67c6ffa2999f383a5da1abd94761b408d210 /gdb/ch-typeprint.c
parentc44c67b5ae95c3e4201e0cbed7ebf429bc2d664a (diff)
* buildsym.c (finish_block): If finishing a function without known
parameter type info, set that from parameter symbols. * c-typeprint.c (c_type_print_varspec_suffix): For TYPE_CODE_FUNC, print parameter types, if available. * ch-typeprint.c (chill_type_print_base): Likewise. * gdbtypes.h (struct type): Remove function type field. (TYPE_FUNCTION_TYPE): Remove macro. We can't as simply re-use function types now that we're also storing parameter types. And the payoff is much less. * gdbtypes.c (make_function_type): Don't use/set TYPE_FUNCTION_TYPE. (recursive_dump_type): Don't print TYPE_FUNCTION_TYPE. * dwarfread.c (read_subroutine_type): Don't set TYPE_FUNCTION_TYPE.
Diffstat (limited to 'gdb/ch-typeprint.c')
-rw-r--r--gdb/ch-typeprint.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/gdb/ch-typeprint.c b/gdb/ch-typeprint.c
index 8474cce212..f06a85cca7 100644
--- a/gdb/ch-typeprint.c
+++ b/gdb/ch-typeprint.c
@@ -165,7 +165,26 @@ 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 (?)");
+ 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);