[llvm-commits] [llvm] r133561 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp

Jim Grosbach grosbach at apple.com
Tue Jun 21 15:50:09 PDT 2011


Yay! Thanks, Bill. This, together with your other annotation patches, is a huge help reading these things.
-j
On Jun 21, 2011, at 3:40 PM, Bill Wendling wrote:

> Author: void
> Date: Tue Jun 21 17:40:24 2011
> New Revision: 133561
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=133561&view=rev
> Log:
> Add verbose EH table printing to SjLj exception tables.
> 
> Modified:
>    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=133561&r1=133560&r2=133561&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Tue Jun 21 17:40:24 2011
> @@ -527,14 +527,30 @@
>          I = CallSites.begin(), E = CallSites.end(); I != E; ++I, ++idx) {
>       const CallSiteEntry &S = *I;
> 
> +      if (VerboseAsm) {
> +        // Emit comments that decode the call site.
> +        Asm->OutStreamer.AddComment(Twine(">> Call Site ") +
> +                                    llvm::utostr(idx) + " <<");
> +        Asm->OutStreamer.AddComment(Twine("  On exception at call site ") +
> +                                    llvm::utostr(idx));
> +
> +        if (S.Action == 0)
> +          Asm->OutStreamer.AddComment("  Action: cleanup");
> +        else
> +          Asm->OutStreamer.AddComment(Twine("  Action: ") +
> +                                      llvm::utostr((S.Action - 1) / 2 + 1));
> +
> +        Asm->OutStreamer.AddBlankLine();
> +      }
> +
>       // Offset of the landing pad, counted in 16-byte bundles relative to the
>       // @LPStart address.
> -      Asm->EmitULEB128(idx, "Call Site");
> +      Asm->EmitULEB128(idx);
> 
>       // Offset of the first associated action record, relative to the start of
>       // the action table. This value is biased by 1 (1 indicates the start of
>       // the action table), and 0 indicates that there are no actions.
> -      Asm->EmitULEB128(S.Action, "Action");
> +      Asm->EmitULEB128(S.Action);
>     }
>   } else {
>     // DWARF Exception handling
> @@ -586,6 +602,7 @@
>         Asm->OutStreamer.AddComment(Twine("  Call between ") +
>                                     BeginLabel->getName() + " and " +
>                                     EndLabel->getName());
> +
>         if (!S.PadLabel) {
>           Asm->OutStreamer.AddComment("    has no landing pad");
>         } else {
> 
> 
> _______________________________________________
> 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