From e924b5837f5014cd066bf3841f579035bad72988 Mon Sep 17 00:00:00 2001 From: Abegail Jakop Date: Wed, 14 Jan 2015 12:31:17 -0500 Subject: [PATCH] PR12276: add ifdef when assigning _stp_module.debug_line --- translate.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/translate.cxx b/translate.cxx index 79971a384..6c4c9e214 100644 --- a/translate.cxx +++ b/translate.cxx @@ -7260,15 +7260,18 @@ dump_unwindsym_cxt (Dwfl_Module *m, if (debug_line != NULL) { + c->output << "#if defined(STP_NEED_LINE_DATA)\n"; c->output << ".debug_line = " << "_stp_module_" << stpmod_idx << "_debug_line, \n"; c->output << ".debug_line_len = " << debug_line_len << ", \n"; + c->output << "#else\n"; } - else - { - c->output << ".debug_line = NULL,\n"; - c->output << ".debug_line_len = 0,\n"; - } + + c->output << ".debug_line = NULL,\n"; + c->output << ".debug_line_len = 0,\n"; + + if (debug_line != NULL) + c->output << "#endif /* STP_NEED_LINE_DATA */\n"; c->output << ".sections = _stp_module_" << stpmod_idx << "_sections" << ",\n"; c->output << ".num_sections = sizeof(_stp_module_" << stpmod_idx << "_sections)/" -- 2.43.5