diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-01 17:03:45 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-01 17:03:45 +0000 |
commit | e08ae8c5be3472cc12a2cb80da60b25da26e4790 (patch) | |
tree | c588f4c9526284348cbb180c1c6da969a4609ac3 | |
parent | 2235fd0e535cde58490b2229f58eb19c2db32753 (diff) | |
download | gcc-e08ae8c5be3472cc12a2cb80da60b25da26e4790.tar.gz |
* jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95748 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/jcf-dump.c | 7 | ||||
-rw-r--r-- | gcc/java/jcf-reader.c | 7 |
3 files changed, 20 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index ce77d68cd26..7be7e7c45bd 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,11 @@ 2005-03-01 Per Bothner <per@bothner.com> + * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45) + if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined. + * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents. + +2005-03-01 Per Bothner <per@bothner.com> + * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro. 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com> diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c index 93d640f05bc..297bfed378c 100644 --- a/gcc/java/jcf-dump.c +++ b/gcc/java/jcf-dump.c @@ -342,6 +342,13 @@ utf8_equal_string (JCF *jcf, int index, const char * value) fputc ('\n', out); \ } +#define HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE(LENGTH) \ +{ int i, n = (LENGTH), c = 0; \ + COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length); \ + fputc ('\n', out); \ + for (i = 0; i < n; i++) { c = JCF_readu(jcf); fputc(c, out); } \ + if (c != '\r' && c != '\n') fputc('\n', out); } + #define PROCESS_OTHER_ATTRIBUTE(JCF, INDEX, LENGTH) \ { COMMON_HANDLE_ATTRIBUTE(JCF, INDEX, LENGTH); \ fputc ('\n', out); JCF_SKIP (JCF, LENGTH); } diff --git a/gcc/java/jcf-reader.c b/gcc/java/jcf-reader.c index 9b3ad161773..8353920d8dd 100644 --- a/gcc/java/jcf-reader.c +++ b/gcc/java/jcf-reader.c @@ -228,6 +228,13 @@ get_attribute (JCF *jcf) } else #endif +#ifdef HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE + if (MATCH_ATTRIBUTE ("SourceDebugExtension")) /* JSR 45 */ + { + HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE (attribute_length); + } + else +#endif { #ifdef PROCESS_OTHER_ATTRIBUTE PROCESS_OTHER_ATTRIBUTE(jcf, attribute_name, attribute_length); |