This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3.4/3.5 PATCH: Switch to DWARF-2 debugging on Solaris/x86 >= 7
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 3 May 2004 12:29:09 +0200
- Subject: Re: 3.4/3.5 PATCH: Switch to DWARF-2 debugging on Solaris/x86 >= 7
- References: <16512.15857.547190.417299@xayide.TechFak.Uni-Bielefeld.DE> <200404212255.14440.ebotcazou@libertysurf.fr> <16526.24433.485783.877853@xayide.TechFak.Uni-Bielefeld.DE>
> For the native as, the HAVE_AS_DWARF2_DEBUG_LINE test fails and the macro
> is undefined. Btw., the failure happens both because as doesn't
> understand the `.file 1 "conftest.s"' (instead of `.file "conftest.s"')
> syntax and due to lack of .loc support. Therefore, gcc emits the
> .debug_line section itself.
Redundancy can't hurt :-)
> With gas, the test succeeds and gcc let's gas emit that section. The ld
> error linking libgcc_s.so.1 happens e.g. for _muldi3.o:
Aaargh!! The test doesn't succeed for me, even with gas 2.14. Let's take a
look at configure.ac:
gcc_GAS_CHECK_FEATURE([dwarf2 debug_line support],
gcc_cv_as_dwarf2_debug_line,
[elf,2,11,0],, [$conftest_s],
[# ??? This fails with non-gnu grep. Maybe use objdump?
if grep debug_line conftest.o > /dev/null 2>&1; then
gcc_cv_as_dwarf2_debug_line=yes
fi])
Indeed, grep is Sun's on the box.
Now I'm a bit worried: does your problem occur on the 3.4 branch or does it
somehow relate to the var-tracking stuff? Could you file a PR for it?
Meanwhile, the ASM_DEBUG_SPEC is correctly emitted:
*asm_debug:
%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}
so I've checked in the patch.
Thanks.
--
Eric Botcazou