From ae4725e37f5472c0610d9cfb85a1d916d89f164f Mon Sep 17 00:00:00 2001 From: jbj Date: Wed, 13 Jul 2005 09:23:07 +0000 Subject: [PATCH] - fix: java compiled with -O0 confuses debugedit (#161722). CVS patchset: 7873 CVS date: 2005/07/13 09:23:07 --- CHANGES | 1 + tools/debugedit.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ae9bc8c..01ac633 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,7 @@ - updated de.po (#162756). - added CVSId: tag and SVNId: alias (#162807). - added brp-java-gcjcompile build helper. + - fix: java compiled with -O0 confuses debugedit (#161722). 4.4 -> 4.4.1: - force *.py->*.pyo byte code compilation with brp-python-bytecompile. diff --git a/tools/debugedit.c b/tools/debugedit.c index 00f5073..418de99 100644 --- a/tools/debugedit.c +++ b/tools/debugedit.c @@ -712,8 +712,8 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase) } } - if (t->attr[i].attr == DW_AT_comp_dir && - form == DW_FORM_strp && + if (t->attr[i].attr == DW_AT_comp_dir) { + if (form == DW_FORM_strp && debug_sections[DEBUG_STR].data) { char *dir; @@ -738,6 +738,11 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase) ELF_C_SET, ELF_F_DIRTY); } } + else if (form == DW_FORM_string) { + free(comp_dir); + comp_dir = strdup (ptr); + } + } else if ((t->tag == DW_TAG_compile_unit || t->tag == DW_TAG_partial_unit) && t->attr[i].attr == DW_AT_name -- 2.7.4