diff options
author | rupp <rupp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-28 18:07:32 +0000 |
---|---|---|
committer | rupp <rupp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-28 18:07:32 +0000 |
commit | 7bf5f48b7973c571c0a7d6da4480efe76fe14281 (patch) | |
tree | d6658380e81e5559b53e792938550ac9057bf0da /gcc | |
parent | a37c5284503d2e933740605acc65a9212838ed34 (diff) | |
download | ppe42-gcc-7bf5f48b7973c571c0a7d6da4480efe76fe14281.tar.gz ppe42-gcc-7bf5f48b7973c571c0a7d6da4480efe76fe14281.zip |
* dwarf2out.c (output_file_names): Test new macro
DWARF2_DIR_SHOULD_END_WITH_SEPARATOR.
(add_comp_dir_attribute): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150173 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 30 |
2 files changed, 34 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cd29b148d6e..f337538a52b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-07-28 Douglas B Rupp <rupp@gnat.com> + + * dwarf2out.c (output_file_names): Test new macro + DWARF2_DIR_SHOULD_END_WITH_SEPARATOR. + (add_comp_dir_attribute): Likewise. + 2009-07-28 Kai Tietz <kai.tietz@onevision.com> * config/i386/mingw-w64.h (LINK_SPEC): Add diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index d3ed637e379..168ca0cc6b4 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -96,6 +96,14 @@ static void dwarf2out_source_line (unsigned int, const char *, int, bool); static rtx last_var_location_insn; #endif +#ifdef VMS_DEBUGGING_INFO +/* 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 +#else +#define DWARF2_DIR_SHOULD_END_WITH_SEPARATOR 0 +#endif + #ifndef DWARF2_FRAME_INFO # ifdef DWARF2_DEBUGGING_INFO # define DWARF2_FRAME_INFO \ @@ -9601,7 +9609,9 @@ output_file_names (void) idx = 1; idx_offset = dirs[0].length > 0 ? 1 : 0; for (i = 1 - idx_offset; i < ndirs; i++) - dw2_asm_output_nstring (dirs[i].path, dirs[i].length - 1, + dw2_asm_output_nstring (dirs[i].path, + dirs[i].length + - !DWARF2_DIR_SHOULD_END_WITH_SEPARATOR, "Directory Entry: 0x%x", i + idx_offset); dw2_asm_output_data (1, 0, "End directory table"); @@ -12883,7 +12893,23 @@ static void add_comp_dir_attribute (dw_die_ref die) { const char *wd = get_src_pwd (); - if (wd != NULL) + char *wd1; + + if (wd == NULL) + return; + + if (DWARF2_DIR_SHOULD_END_WITH_SEPARATOR) + { + int wdlen; + + wdlen = strlen (wd); + wd1 = GGC_NEWVEC (char, wdlen + 2); + strcpy (wd1, wd); + wd1 [wdlen] = DIR_SEPARATOR; + wd1 [wdlen + 1] = 0; + wd = wd1; + } + add_AT_string (die, DW_AT_comp_dir, remap_debug_filename (wd)); } |