Add and sort "sections" in debug lines. This always stepping through

code in sections other than ".text", including weak sections like ctors and
dtors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28909 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Laskey
2006-06-23 12:51:53 +00:00
parent 52b510b4c4
commit 89d67faf30
6 changed files with 132 additions and 114 deletions

View File

@ -26,10 +26,6 @@ namespace llvm {
class GlobalVariable;
class AsmPrinter : public MachineFunctionPass {
/// CurrentSection - The current section we are emitting to. This is
/// controlled and used by the SwitchSection method.
std::string CurrentSection;
/// FunctionNumber - This provides a unique ID for each function emitted in
/// this translation unit. It is autoincremented by SetupMachineFunction,
/// and can be accessed with getFunctionNumber() and
@ -134,6 +130,10 @@ namespace llvm {
//===--- Section Switching Directives ---------------------------------===//
/// CurrentSection - The current section we are emitting to. This is
/// controlled and used by the SwitchSection method.
std::string CurrentSection;
/// SwitchToSectionDirective - This is the directive used when we want to
/// emit a global to an arbitrary section. The section name is emited after
/// this.

View File

@ -47,6 +47,7 @@ class MachineMove;
class Module;
class MRegisterInfo;
class SubprogramDesc;
class SourceLineInfo;
class TargetData;
class Type;
class TypeDesc;
@ -110,11 +111,6 @@ protected:
///
bool shouldEmit;
/// IsNormalText - Flag to indicate if routine is not special case text
/// (coalesced.)
// FIXME - should be able to debug coalesced functions.
bool IsNormalText;
/// SubprogramCount - The running count of functions being compiled.
///
unsigned SubprogramCount;
@ -144,10 +140,13 @@ protected:
/// descriptors to debug information entries.
std::map<DebugInfoDesc *, DIE *> DescToDieMap;
/// TypeToDieMap - Type to DIEType map.
/// SectionMap - Provides a unique id per text section.
///
// FIXME - Should not be needed.
std::map<Type *, DIE *> TypeToDieMap;
UniqueVector<std::string> SectionMap;
/// SectionSourceLines - Tracks line numbers per text section.
///
std::vector<std::vector<SourceLineInfo *> > SectionSourceLines;
//===--------------------------------------------------------------------===//
// Properties to be set by the derived class ctor, used to configure the
@ -483,7 +482,7 @@ public:
/// BeginFunction - Gather pre-function debug information. Assumes being
/// emitted immediately after the function entry point.
void BeginFunction(MachineFunction *MF, bool IsNormalText);
void BeginFunction(MachineFunction *MF);
/// EndFunction - Gather and emit post-function debug information.
///

View File

@ -1031,9 +1031,9 @@ public:
return SourceFiles;
}
/// getSourceLines - Return a vector of source lines. Vector index + 1
/// equals label ID.
const std::vector<SourceLineInfo *> &getSourceLines() const {
/// getSourceLines - Return a vector of source lines.
///
std::vector<SourceLineInfo *> &getSourceLines() {
return Lines;
}