From 6f1595d35751ecf3261cb65fb71c1f243630c250 Mon Sep 17 00:00:00 2001 From: Douglas B Rupp Date: Wed, 29 Jul 2009 05:02:10 +0000 Subject: [PATCH] dwarf2out.c (DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET): New macro set for VMS_DEBUGGGING_INFO. * dwarf2out.c (DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET): New macro set for VMS_DEBUGGGING_INFO. (AT_string_form): Use it. From-SVN: r150196 --- gcc/ChangeLog | 6 ++++++ gcc/dwarf2out.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9c2de322fd04..b4911a6543a7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-07-28 Douglas B Rupp + + * dwarf2out.c (DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET): + New macro set for VMS_DEBUGGGING_INFO. + (AT_string_form): Use it. + 2009-07-28 DJ Delorie * config/mep/mep.c (vtext_section): New. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 168ca0cc6b43..488439fcfbee 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -100,8 +100,14 @@ static rtx last_var_location_insn; /* Define this macro to be a nonzero value if the directory specifications which are output in the debug info should end with a separator. */ #define DWARF2_DIR_SHOULD_END_WITH_SEPARATOR 1 +/* Define this macro to evaluate to a nonzero value if GCC should refrain + from generating indirect strings in DWARF2 debug information, for instance + if your target is stuck with an old version of GDB that is unable to + process them properly or uses VMS Debug. */ +#define DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET 1 #else #define DWARF2_DIR_SHOULD_END_WITH_SEPARATOR 0 +#define DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET 0 #endif #ifndef DWARF2_FRAME_INFO @@ -6705,8 +6711,9 @@ AT_string_form (dw_attr_ref a) /* If we cannot expect the linker to merge strings in .debug_str section, only put it into .debug_str if it is worth even in this single module. */ - if ((debug_str_section->common.flags & SECTION_MERGE) == 0 - && (len - DWARF_OFFSET_SIZE) * node->refcount <= len) + if (DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET + || ((debug_str_section->common.flags & SECTION_MERGE) == 0 + && (len - DWARF_OFFSET_SIZE) * node->refcount <= len)) return node->form = DW_FORM_string; ASM_GENERATE_INTERNAL_LABEL (label, "LASF", dw2_string_counter); -- 2.43.5