diff options
author | David Edelsohn <dje.gcc@gmail.com> | 2017-06-02 14:27:15 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2017-06-02 10:27:15 -0400 |
commit | e3bd1c68738bd4e67ece407d6aa95811b44f77f9 (patch) | |
tree | 8158a1a05d73fa6ac1dfc1cccee479d39c6e67f5 /gcc | |
parent | ab82e126e749c99f77a0fa7230ee104fe47660d9 (diff) | |
download | gcc-e3bd1c68738bd4e67ece407d6aa95811b44f77f9.zip gcc-e3bd1c68738bd4e67ece407d6aa95811b44f77f9.tar.gz gcc-e3bd1c68738bd4e67ece407d6aa95811b44f77f9.tar.bz2 |
dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
* dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
(dl_section_ref): New.
(dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
On AIX, append an expression to subtract the size of the
section length to dl_section_ref.
From-SVN: r248831
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 15 |
2 files changed, 21 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c75984..3d945d6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-06-02 David Edelsohn <dje.gcc@gmail.com> + + * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New. + (dl_section_ref): New. + (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref. + On AIX, append an expression to subtract the size of the + section length to dl_section_ref. + 2017-06-02 Will Schmidt <will_schmidt@vnet.ibm.com> * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 036d0a8..ff1293f 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -189,6 +189,10 @@ static GTY(()) section *debug_frame_section; #define DWARF_INITIAL_LENGTH_SIZE (DWARF_OFFSET_SIZE == 4 ? 4 : 12) #endif +#ifndef DWARF_INITIAL_LENGTH_SIZE_STR +#define DWARF_INITIAL_LENGTH_SIZE_STR (DWARF_OFFSET_SIZE == 4 ? "-4" : "-12") +#endif + /* Round SIZE up to the nearest BOUNDARY. */ #define DWARF_ROUND(SIZE,BOUNDARY) \ ((((SIZE) + (BOUNDARY) - 1) / (BOUNDARY)) * (BOUNDARY)) @@ -29670,6 +29674,7 @@ dwarf2out_finish (const char *) comdat_type_node *ctnode; dw_die_ref main_comp_unit_die; unsigned char checksum[16]; + char dl_section_ref[MAX_ARTIFICIAL_LABEL_BYTES]; /* Flush out any latecomers to the limbo party. */ flush_limbo_die_list (); @@ -29787,9 +29792,15 @@ dwarf2out_finish (const char *) } } + /* AIX Assembler inserts the length, so adjust the reference to match the + offset expected by debuggers. */ + strcpy (dl_section_ref, debug_line_section_label); + if (XCOFF_DEBUGGING_INFO) + strcat (dl_section_ref, DWARF_INITIAL_LENGTH_SIZE_STR); + if (debug_info_level >= DINFO_LEVEL_TERSE) add_AT_lineptr (main_comp_unit_die, DW_AT_stmt_list, - debug_line_section_label); + dl_section_ref); if (have_macinfo) add_AT_macptr (comp_unit_die (), @@ -29865,7 +29876,7 @@ dwarf2out_finish (const char *) if (debug_info_level >= DINFO_LEVEL_TERSE) add_AT_lineptr (ctnode->root_die, DW_AT_stmt_list, (!dwarf_split_debug_info - ? debug_line_section_label + ? dl_section_ref : debug_skeleton_line_section_label)); output_comdat_type_unit (ctnode); |