aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-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/c-typeprint.c
parentc44c67b5ae95c3e4201e0cbed7ebf429bc2d664a (diff)
downloadfsf-binutils-gdb-27202b6a4746af217ab914394a1ab9b111b1db3c.zip
fsf-binutils-gdb-27202b6a4746af217ab914394a1ab9b111b1db3c.tar.gz
fsf-binutils-gdb-27202b6a4746af217ab914394a1ab9b111b1db3c.tar.bz2
* 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/c-typeprint.c')
-rw-r--r--gdb/c-typeprint.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 306123d..3968737 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -420,7 +420,19 @@ c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
if (passed_a_ptr)
fprintf_filtered (stream, ")");
if (!demangled_args)
- fprintf_filtered (stream, "()");
+ { int i, len = TYPE_NFIELDS (type);
+ fprintf_filtered (stream, "(");
+ for (i = 0; i < len; i++)
+ {
+ if (i > 0)
+ {
+ fputs_filtered (", ", stream);
+ wrap_here (" ");
+ }
+ c_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0);
+ }
+ fprintf_filtered (stream, ")");
+ }
c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
passed_a_ptr, 0);
break;