summaryrefslogtreecommitdiff
path: root/gdb/c-typeprint.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2010-05-13 23:53:31 +0000
committerMichael Snyder <msnyder@specifix.com>2010-05-13 23:53:31 +0000
commit65d22948e1ee7d60c1bc24175e7378f933e8d72c (patch)
treeb8b5f403d49e27a57c591fd9bbcdd281eb77dd24 /gdb/c-typeprint.c
parent4c4cb03d0f9e6ff0c36847a01967538b21764770 (diff)
downloadgdb-65d22948e1ee7d60c1bc24175e7378f933e8d72c.tar.gz
2010-05-13 Michael Snyder <msnyder@vmware.com>
* charset.c: White space. * c-lang.c: White space. * cli-out.c: White space. * coffread.c: White space. * complaints.c: White space. * completer.c: White space. * corefile.c: White space. * corelow.c: White space. * cp-abi.c: White space. * cp-namespace.c: White space. * cp-support.c: White space. * cp-valprint.c: White space. * c-typeprint.c: White space. * c-valprint.c: White space.
Diffstat (limited to 'gdb/c-typeprint.c')
-rw-r--r--gdb/c-typeprint.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 68bcbd7fa89..2697c3a4798 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -233,6 +233,7 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
int show, int passed_a_ptr, int need_post_space)
{
char *name;
+
if (type == 0)
return;
@@ -919,6 +920,7 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
struct fn_field *f = TYPE_FN_FIELDLIST1 (type, i);
int len2 = TYPE_FN_FIELDLIST_LENGTH (type, i);
int j;
+
for (j = 0; j < len2; j++)
if (!TYPE_FN_FIELD_ARTIFICIAL (f, j))
real_len++;
@@ -934,13 +936,14 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
char *method_name = TYPE_FN_FIELDLIST_NAME (type, i);
char *name = type_name_no_tag (type);
int is_constructor = name && strcmp (method_name, name) == 0;
+
for (j = 0; j < len2; j++)
{
char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
int is_full_physname_constructor =
- is_constructor_name (physname)
- || is_destructor_name (physname)
- || method_name[0] == '~';
+ is_constructor_name (physname)
+ || is_destructor_name (physname)
+ || method_name[0] == '~';
/* Do not print out artificial methods. */
if (TYPE_FN_FIELD_ARTIFICIAL (f, j))
@@ -1013,6 +1016,7 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
{
int staticp = TYPE_FN_FIELD_STATIC_P (f, j);
struct type *mtype = TYPE_FN_FIELD_TYPE (f, j);
+
cp_type_print_method_args (mtype,
"",
method_name,
@@ -1034,6 +1038,7 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
if (p != NULL)
{
int length = p - demangled_no_class;
+
demangled_no_static = (char *) xmalloc (length + 1);
strncpy (demangled_no_static, demangled_no_class, length);
*(demangled_no_static + length) = '\0';