diff options
| author | Bill Wendling <isanbard@gmail.com> | 2011-06-21 22:40:24 +0000 | 
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2011-06-21 22:40:24 +0000 | 
| commit | ddec6838a976334b7affc7a412b68046cde54c7c (patch) | |
| tree | 7b9449ebc8e45f362231fa7fbd1b67453a159601 | |
| parent | 0ab7767b3726f13dca31251d2c06bc64ec285330 (diff) | |
| download | bcm5719-llvm-ddec6838a976334b7affc7a412b68046cde54c7c.tar.gz bcm5719-llvm-ddec6838a976334b7affc7a412b68046cde54c7c.zip | |
Add verbose EH table printing to SjLj exception tables.
llvm-svn: 133561
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp | 21 | 
1 files changed, 19 insertions, 2 deletions
| diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp index b2efad30ff9..1f992faaadb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -527,14 +527,30 @@ void DwarfException::EmitExceptionTable() {           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 @@ void DwarfException::EmitExceptionTable() {          Asm->OutStreamer.AddComment(Twine("  Call between ") +                                      BeginLabel->getName() + " and " +                                      EndLabel->getName()); +          if (!S.PadLabel) {            Asm->OutStreamer.AddComment("    has no landing pad");          } else { | 

