From c4cef86b3ba6eef9761fab157340944b0d735a99 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Tue, 16 Mar 2004 16:00:40 -0800 Subject: [PATCH] jcf-jump.c (options): New --print-constants option. * jcf-jump.c (options): New --print-constants option. * gcj.texi (Invoking jcf-dump): Document --print-constants. From-SVN: r79558 --- gcc/java/ChangeLog | 3 +++ gcc/java/gcj.texi | 5 +++++ gcc/java/jcf-dump.c | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 0ea4ce1247b..2f48c3527be 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,8 @@ 2004-03-16 Per Bothner + * jcf-jump.c (options): New --print-constants option. + * gcj.texi (Invoking jcf-dump): Document --print-constants. + * jcf-dump.c (flag_print_constant_pool): Default to off. (print_constant_terse_with_index): New helper function. (various places): Check flag_print_constant_pool where missing. diff --git a/gcc/java/gcj.texi b/gcc/java/gcj.texi index 374bdf8bcc9..21c12ee6cc9 100644 --- a/gcc/java/gcj.texi +++ b/gcc/java/gcj.texi @@ -760,6 +760,10 @@ or file name. @item -c Disassemble method bodies. By default method bodies are not printed. +@item --print-constants +Print the constant pool. When printing a reference to a constant +also print its index in the constant pool. + @item --javap Generate output in @code{javap} format. The implementation of this feature is very incomplete. @@ -778,6 +782,7 @@ Print version number, then exit. @item -v, --verbose Print extra information while running. +Implies @code{--print-constants}. @end table @c man end diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c index c28a3f43c4c..3d5f0c513d9 100644 --- a/gcc/java/jcf-dump.c +++ b/gcc/java/jcf-dump.c @@ -874,7 +874,8 @@ static const struct option options[] = { "verbose", no_argument, NULL, 'v' }, { "version", no_argument, NULL, OPT_VERSION }, { "javap", no_argument, NULL, OPT_JAVAP }, - { "print-main", no_argument, &flag_print_main, 1 }, + { "print-main", no_argument, &flag_print_main, 1 }, + { "print-constants", no_argument, &flag_print_constant_pool, 1 }, { NULL, no_argument, NULL, 0 } };