[llvm-commits] [llvm] r160148 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp test/DebugInfo/X86/pr13303.ll

Robinson, Paul Paul.Robinson at am.sony.com
Mon Sep 10 16:12:50 PDT 2012


> Actually this may cause gdb to have a couple of fits which is why I haven't closed the PR yet.
> It only wants is_stmt on things that are going to be good places to break...

I finally got a round tuit... Ran gdb 7.2 test suite on a relatively recent TOT, and again with
this patch taken out.  Losing the patch makes the pass count go from 14000 to 14295.
The fail count also goes up a bit, from 901 to 916.  Hmmm...

Looking at the differences more closely, I see that gbd.base/macscp.exp is the big fish.
With 160148, gdb is able to figure out that Clang doesn't generate macro info and skips this.
Without 160148, it can't figure that out, and it actually tries to run this test, with 300+ test points.
Excluding macscp.exp from the totals, I see:
with 160148: pass 13999, fail 901
without 160148: pass 14118, fail 776.

Most of the remaining differences are because with 160148, setting a breakpoint on a 
function name causes it to break on the first instruction, prior to the prolog.  This has
consequential effects, e.g. parameter values tend to be reported incorrectly, and also
the breakpoint tends to be outside the artificial lexical block wrapped around locals.

The patch _does_ make the "list" command work better (!). But I think that's not
worth all the other trouble it causes.

So, it looks to me like this patch should be reverted, and PR13303 will have to be solved
some other way. (Although it might be worth trying a more recent gdb test suite first.)

Sorry about that, chief!
--paulr

________________________________________
From: Eric Christopher [echristo at apple.com]
Sent: Thursday, July 12, 2012 4:48 PM
To: Robinson, Paul
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [llvm] r160148 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp test/DebugInfo/X86/pr13303.ll

Hrm, so it is. :)

Actually this may cause gdb to have a couple of fits which is why I haven't closed the PR yet. It only wants is_stmt on things that are going to be good places to break...

At least I can commit it and look at tests after.

-eric

On Jul 12, 2012, at 4:36 PM, "Robinson, Paul" <Paul.Robinson at am.sony.com> wrote:

> Actually that's the _start_ of the prolog...
> Thanks!
> --paulr
>
> ________________________________________
> From: llvm-commits-bounces at cs.uiuc.edu [llvm-commits-bounces at cs.uiuc.edu] on behalf of Eric Christopher [echristo at apple.com]
> Sent: Thursday, July 12, 2012 4:30 PM
> To: llvm-commits at cs.uiuc.edu
> Subject: [llvm-commits] [llvm] r160148 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp test/DebugInfo/X86/pr13303.ll
>
> Author: echristo
> Date: Thu Jul 12 18:30:25 2012
> New Revision: 160148
>
> URL: http://llvm.org/viewvc/llvm-project?rev=160148&view=rev
> Log:
> The end of the prologue should be marked with is_stmt.
> Fixes PR13303.
>
> Patch by Paul Robinson!
>
> Added:
>    llvm/trunk/test/DebugInfo/X86/pr13303.ll
> Modified:
>    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=160148&r1=160147&r2=160148&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Jul 12 18:30:25 2012
> @@ -1382,7 +1382,7 @@
>                                        MF->getFunction()->getContext());
>     recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
>                      FnStartDL.getScope(MF->getFunction()->getContext()),
> -                     0);
> +                     DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_IS_STMT : 0);
>   }
> }
>
>
> Added: llvm/trunk/test/DebugInfo/X86/pr13303.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pr13303.ll?rev=160148&view=auto
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/pr13303.ll (added)
> +++ llvm/trunk/test/DebugInfo/X86/pr13303.ll Thu Jul 12 18:30:25 2012
> @@ -0,0 +1,28 @@
> +; RUN: llc %s -o %t -filetype=obj -mtriple=x86_64-unknown-linux-gnu
> +; RUN: llvm-dwarfdump %t | FileCheck %s
> +; PR13303
> +
> +; Check that the prologue ends with is_stmt here.
> +; CHECK: 0x0000000000000000 {{.*}} is_stmt
> +
> +define i32 @main() nounwind uwtable {
> +entry:
> +  %retval = alloca i32, align 4
> +  store i32 0, i32* %retval
> +  ret i32 0, !dbg !10
> +}
> +
> +!llvm.dbg.cu = !{!0}
> +
> +!0 = metadata !{i32 786449, i32 0, i32 12, metadata !"PR13303.c", metadata !"/home/probinson", metadata !"clang version 3.2 (trunk 160143)", i1 true, i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1} ; [ DW_TAG_compile_unit ] [/home/probinson/PR13303.c] [DW_LANG_C99]
> +!1 = metadata !{metadata !2}
> +!2 = metadata !{i32 0}
> +!3 = metadata !{metadata !4}
> +!4 = metadata !{metadata !5}
> +!5 = metadata !{i32 786478, i32 0, metadata !6, metadata !"main", metadata !"main", metadata !"", metadata !6, i32 1, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 0, i1 false, i32 ()* @main, null, null, metadata !1, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [main]
> +!6 = metadata !{i32 786473, metadata !"PR13303.c", metadata !"/home/probinson", null} ; [ DW_TAG_file_type ]
> +!7 = metadata !{i32 786453, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !8, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
> +!8 = metadata !{metadata !9}
> +!9 = metadata !{i32 786468, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
> +!10 = metadata !{i32 1, i32 14, metadata !11, null}
> +!11 = metadata !{i32 786443, metadata !5, i32 1, i32 12, metadata !6, i32 0} ; [ DW_TAG_lexical_block ] [/home/probinson/PR13303.c]
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list