aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf-dump.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-03-30 17:46:48 +0000
committerTom Tromey <tromey@gcc.gnu.org>2005-03-30 17:46:48 +0000
commit2d47d84c921e481eb629a026ec4c0b1b72d577df (patch)
tree76efce2675a663a9cac56d0af86f1de48d742974 /gcc/java/jcf-dump.c
parent2228adb2765400dbc32c2f5f820d69da5cef40b8 (diff)
downloadgcc-2d47d84c921e481eb629a026ec4c0b1b72d577df.zip
gcc-2d47d84c921e481eb629a026ec4c0b1b72d577df.tar.gz
gcc-2d47d84c921e481eb629a026ec4c0b1b72d577df.tar.bz2
jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where inner_class_info_index==0 or outer_class_info_index==0.
* jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where inner_class_info_index==0 or outer_class_info_index==0. From-SVN: r97263
Diffstat (limited to 'gcc/java/jcf-dump.c')
-rw-r--r--gcc/java/jcf-dump.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c
index c3fd9f1..9bd7650 100644
--- a/gcc/java/jcf-dump.c
+++ b/gcc/java/jcf-dump.c
@@ -65,7 +65,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include <getopt.h>
#include <math.h>
-/* Outout file. */
+/* Output file. */
FILE *out;
/* Name of output file, if NULL if stdout. */
char *output_file = NULL;
@@ -320,8 +320,12 @@ utf8_equal_string (JCF *jcf, int index, const char * value)
if (flag_print_class_info) \
{ \
fprintf (out, "\n inner: "); \
- print_constant_terse_with_index (out, jcf, \
- inner_class_info_index, CONSTANT_Class); \
+ if (inner_class_info_index == 0) \
+ fprintf (out, " (no inner info index)"); \
+ else \
+ print_constant_terse_with_index (out, jcf, \
+ inner_class_info_index, \
+ CONSTANT_Class); \
if (inner_name_index == 0) \
fprintf (out, " (anonymous)"); \
else if (verbose || flag_print_constant_pool) \
@@ -334,12 +338,16 @@ utf8_equal_string (JCF *jcf, int index, const char * value)
fprintf (out, ", access flags: 0x%x", inner_class_access_flags); \
print_access_flags (out, inner_class_access_flags, 'c'); \
fprintf (out, ", outer class: "); \
- print_constant_terse_with_index (out, jcf, \
- outer_class_info_index, CONSTANT_Class); \
+ if (outer_class_info_index == 0) \
+ fprintf (out, "(not a member)"); \
+ else \
+ print_constant_terse_with_index (out, jcf, \
+ outer_class_info_index, \
+ CONSTANT_Class); \
} \
} \
- if (flag_print_class_info) \
- fputc ('\n', out); \
+ if (flag_print_class_info) \
+ fputc ('\n', out); \
}
#define HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE(LENGTH) \