[Bug debug/24444] [4.1 regression] invalid register in debug info
--- Comment #9 from drow at gcc dot gnu dot org 2005-11-15 20:58 --- Subject: Re: [4.1 regression] invalid register in debug info On Thu, Oct 20, 2005 at 08:35:59AM -, rth at gcc dot gnu dot org wrote: Well, the ideal fix is to make use of the dwarf3 DW_OP_call_frame_cfa directive, and let the debugger get the CFA information from the ia64 unwind info. Similarly for the arm eabi unwind info. Note that this may be a good solution for ia64, but it really is not for ARM. ARM unwind information is only usable by the debugger in very few cases, because everything interesting is handled by a personality routine; it's only if you use one of the standard table formats (which GCC does) that the debugger can decode it. But we do still emit .debug_frame for ARM, and the debugger does use that. So presumably that's plenty to use DW_OP_call_frame_cfa. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2
[Bug debug/24444] [4.1 regression] invalid register in debug info
--- Comment #6 from wilson at gcc dot gnu dot org 2005-10-31 23:39 --- Subject: Bug 2 Author: wilson Date: Mon Oct 31 23:39:29 2005 New Revision: 106299 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=106299 Log: Restore old AT_frame_base code for targets that don't use dwarf2 unwind info. Partial fix. PR debug/2 * dwarf2out.c (convert_cfa_to_loc_list): Put inside DWARF2_UNWIND_INFO ifdef. Put ifdefs around call in gen_subprogram_die. (compute_frame_pointer_to_cfa_displacement): Likewise. (gen_subprogram_die): Restore old code for when DWARF2_UNWIND_INFO is not defined. Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2
[Bug debug/24444] [4.1 regression] invalid register in debug info
--- Comment #7 from wilson at gcc dot gnu dot org 2005-10-31 23:46 --- This is partially fixed. The debug info is correct enough to make the gdb testsuite happy, but we are lacking correct info for the frame_base in the prologue and epilogue. That used to be computed by code in var-tracking.c, but that code was removed. As Richard mentioned, we can probably get full frame base info back by using a hook. I have left that for a later patch. Since the remaining problem is not serious, I am changing the target milestone to 4.2. -- wilson at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |wilson at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2005-10-19 23:34:35 |2005-10-31 23:46:00 date|| Target Milestone|4.1.0 |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2
[Bug debug/24444] [4.1 regression] invalid register in debug info
--- Comment #8 from wilson at gcc dot gnu dot org 2005-11-01 01:16 --- I see that we are using the priority field now, so let's put the 4.1 target milestone back and set priority to p4 to indicate this is a regression, but not a serious one blocking the release. -- wilson at gcc dot gnu dot org changed: What|Removed |Added Priority|P2 |P4 Target Milestone|4.2.0 |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2
[Bug debug/24444] [4.1 regression] invalid register in debug info
--- Comment #5 from mmitchel at gcc dot gnu dot org 2005-10-31 06:32 --- I guess I'll leave this as P2, but I really do think we should find a fix before the next release, for the affected targets. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2
[Bug debug/24444] [4.1 regression] invalid register in debug info
--- Comment #4 from rth at gcc dot gnu dot org 2005-10-20 08:35 --- Well, the ideal fix is to make use of the dwarf3 DW_OP_call_frame_cfa directive, and let the debugger get the CFA information from the ia64 unwind info. Similarly for the arm eabi unwind info. I'm not sure what a good short-term fix is. Perhaps, as you suggest, putting some code back for TARGET_UNWIND_INFO targets. On the other hand, both ia64 and arm are ACCUMULATE_OUTGOING_ARGS targets, which means that they don't *need* all that tracking info to find the CFA. For any function that gcc generates, the CFA starts as SP+OFFSET1 and changes exactly once to either SP+OFFSET2 or FP+OFFSET3. Which means that we could fairly easily acquire this info (plus a label of the transition point) from a target hook. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2
[Bug debug/24444] [4.1 regression] invalid register in debug info
-- wilson at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2
[Bug debug/24444] [4.1 regression] invalid register in debug info
--- Comment #1 from schwab at suse dot de 2005-10-19 17:03 --- Created an attachment (id=10025) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10025action=view) Testcase -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2
[Bug debug/24444] [4.1 regression] invalid register in debug info
--- Comment #2 from wilson at gcc dot gnu dot org 2005-10-19 23:34 --- This was broken by Richard Henderson's patch that added the convert_cfa_to_loc_list function. The thread for the patch starts here. It was finally installed Sept 7. http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01176.html The flaw with the patch is that Richard modified dwarf2out.c to use the dwarf unwind info unconditionally. However, it is only available for targets that define DWARF2_UNWIND_INFO. For all other targets, we now get incorrect debug info. IA-64 of course has its own unwind info, IA-64 unwind info, as defined by the IA-64 ABI, and does not need or want to use dwarf unwind info. I haven't yet tried to comprehend Richard's patch. It is a big one. Hence, I do not yet have a suggested fix. I suspect the fix may be as simple as putting a #ifdef DWARF2_UNWIND_INFO test in gen_subprogram_die around the convert_cfa_to_loc_list call, and putting the old code back in the #else case. Worst case, we need to write equivalent code that knows how to convert IA-64 unwind info into a location list. However, given that gdb already knows how to use libunwind, and any other self-respecting IA-64 debugger should also already be using the IA-64 unwind info, it isn't clear to me that we need to do anything in gcc here. We can not make the same assumption about dwarf2 unwind info, as this isn't part of the ABI for most targets, so Richard's patch does make sense there. -- wilson at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2005-10-19 23:34:35 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2
[Bug debug/24444] [4.1 regression] invalid register in debug info
--- Comment #3 from wilson at gcc dot gnu dot org 2005-10-20 05:09 --- It looks a little more complicated than I hoped, as Richard deleted code in var-tracking.c that was used by the old code in dwarf2out.c that we need for IA-64 and other non-DWARF2_UNWIND_INFO targets. -- wilson at gcc dot gnu dot org changed: What|Removed |Added CC||rth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2