aboutsummaryrefslogtreecommitdiff
path: root/binutils/prdbg.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-01-11 16:47:10 +0000
committerIan Lance Taylor <ian@airs.com>1996-01-11 16:47:10 +0000
commit36302909f2b0b51c792b8c775ac53c6d404f7d25 (patch)
tree072564bdccc3dd2764b1b1d50295fc7173fae00f /binutils/prdbg.c
parent761f377fecdc962ad40882e3a65df6cb12906af6 (diff)
downloadfsf-binutils-gdb-36302909f2b0b51c792b8c775ac53c6d404f7d25.zip
fsf-binutils-gdb-36302909f2b0b51c792b8c775ac53c6d404f7d25.tar.gz
fsf-binutils-gdb-36302909f2b0b51c792b8c775ac53c6d404f7d25.tar.bz2
* debug.c (debug_make_undefined_tagged_type): Make sure we are
given a kind of type we can handle. (debug_write_type): Handle undefined enums and structs. (debug_write_class_type): Handle undefined classes. * prdbg.c (pr_enum_type): Handle an undefined enum. Also comment changes to debug.h.
Diffstat (limited to 'binutils/prdbg.c')
-rw-r--r--binutils/prdbg.c42
1 files changed, 25 insertions, 17 deletions
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index c41d60c..133973c 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -519,30 +519,38 @@ pr_enum_type (p, tag, names, values)
if (! append_type (info, "{ "))
return false;
- val = 0;
- for (i = 0; names[i] != NULL; i++)
+ if (names == NULL)
{
- if (i > 0)
+ if (! append_type (info, "/* undefined */"))
+ return false;
+ }
+ else
+ {
+ val = 0;
+ for (i = 0; names[i] != NULL; i++)
{
- if (! append_type (info, ", "))
+ if (i > 0)
+ {
+ if (! append_type (info, ", "))
+ return false;
+ }
+
+ if (! append_type (info, names[i]))
return false;
- }
- if (! append_type (info, names[i]))
- return false;
+ if (values[i] != val)
+ {
+ char ab[20];
- if (values[i] != val)
- {
- char ab[20];
+ print_vma (values[i], ab, false, false);
+ if (! append_type (info, " = ")
+ || ! append_type (info, ab))
+ return false;
+ val = values[i];
+ }
- print_vma (values[i], ab, false, false);
- if (! append_type (info, " = ")
- || ! append_type (info, ab))
- return false;
- val = values[i];
+ ++val;
}
-
- ++val;
}
return append_type (info, " }");