This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch darwin, debug] make debug section starts explicit.


Hello,
On darwin the order in which we emit sections from the assembler is the same as they are encountered in the source.
Currently, this means that when debug is enabled we have say text and data sections split by debug ones - whereas they would not be otherwise.


In addition, since debug offsets are local to their sections in darwin we need to emit a label at the start of each debug section.

---

I was investigating the possibility of making it such that all debug sections appeared at the end of asm files (and had a solution working a few months ago).
Apart from making it easier to compare asm between debug / non-debug cases, I was also pursuing the possibility of simplifying the object compares (which takes a moderate chunk of the bootstrap wall-clock time since it's done sequentially).


There is not sufficient time to get all the steps of this into stage 1 (even with the extension).

However, the attached patch is the first step towards it - and gets rid of a kludge where we have to emit all the debug sections at the start of an asm file to satisfy the need for start labels.

I cc'd RTH - since we were discussing this in irc (although, I'm sure that there's every reason to have forgotten the conversation, it was some time ago :-) ).

this has been bootstrapped and tested numerous times over the last few months (on *darwin* and x86-64-linux and cris-elf)
... re-tested on darwin and running on x86-64 ...


OK for trunk assuming re-test passes?
Iain


gcc:


* doc/tm.texi (TARGET_ASM_OUTPUT_DWARF_SECTION_START_INFO): Hook
documentation (auto-generated).
* doc/tm.texi.in (TARGET_ASM_OUTPUT_DWARF_SECTION_START_INFO) New.
* target.def (output_dwarf_section_start_info): New hook.
* dwarf2out.c (dwarf2_start_section): New.
(dwarf2out_init): Use dwarf2_start_section().
(output_indirect_string): Only emit the section switch the first time, use dwarf2_start_section ().
(dwarf2out_finish): use dwarf2_start_section ().
* config/darwin-protos.h (darwin_asm_output_dwarf_section_start_info): New.
* config/darwin.c (darwin_asm_output_dwarf_section_start_info): New.
(darwin_file_start): Do not emit dwarf sections.
* config/darwin.h (DEBUG_DCALL_SECTION): New.
(DEBUG_VCALL_SECTION): New.
(TARGET_ASM_OUTPUT_DWARF_SECTION_START_INFO): New.


gcc/testsuite:

* g++.dg/debug/dwarf2/pubnames-1.C: Adjust since darwin no longer emits two section
switches.


Attachment: 166029-debgstart.txt
Description: Text document





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]