[LLVMdev] Enable debug for MSP430
Iain Sandoe
iain at codesourcery.com
Wed Sep 3 07:32:48 PDT 2014
Hi Gents,
For those of us with out-of-tree backends which are not 32bit, the msp430 backend is a useful vehicle for examining changes and testing out ideas.
So I was wondering about enabling debug output on the MSP430 backend so that I can illustrate a few issues to Adrian and you on the variable pieces side. (there doesn't appear to be any specific person claiming the msp430 code right now).
I have a question tho.
the following patch :
diff --git a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
index df1aa1a..844db93 100644
--- a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
+++ b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
@@ -24,4 +24,6 @@ MSP430MCAsmInfo::MSP430MCAsmInfo(StringRef TT) {
AlignmentIsInBytes = false;
UsesELFSectionDirectiveForBSS = true;
+
+ SupportsDebugInformation = true;
}
does, indeed enable debug - but NOT .debug_frame (and IIRC some of the variable range info goes missing).
it needs:
diff --git a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
index df1aa1a..e7e0550 100644
--- a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
+++ b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
@@ -24,4 +24,7 @@ MSP430MCAsmInfo::MSP430MCAsmInfo(StringRef TT) {
AlignmentIsInBytes = false;
UsesELFSectionDirectiveForBSS = true;
+
+ SupportsDebugInformation = true;
+ ExceptionsType = ExceptionHandling::DwarfCFI;
}
to make the debug_frame stuff happen.
Is that intentional?
(it's not a big deal, just a bit non-intuitive for backends which have no exception support).
cheers
Iain
More information about the llvm-dev
mailing list