Files
clang-p2996/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
Greg Clayton 57abc5d6a6 <rdar://problem/13854277>
<rdar://problem/13594769>

Main changes in this patch include:
- cleanup plug-in interface and use ConstStrings for plug-in names
- Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp
- Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging

The plug-in interface changes:

Modified the lldb_private::PluginInterface class that all plug-ins inherit from:

Changed:

virtual const char * GetPluginName() = 0;

To: 

virtual ConstString GetPluginName() = 0;

Removed:

virtual const char * GetShortPluginName() = 0;

- Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names. 
- Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc.

llvm-svn: 181631
2013-05-10 21:47:16 +00:00

90 lines
2.3 KiB
C++

//===-- LogChannelDWARF.h --------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef SymbolFileDWARF_LogChannelDWARF_h_
#define SymbolFileDWARF_LogChannelDWARF_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Core/Log.h"
#define DWARF_LOG_VERBOSE (1u << 0)
#define DWARF_LOG_DEBUG_INFO (1u << 1)
#define DWARF_LOG_DEBUG_LINE (1u << 2)
#define DWARF_LOG_DEBUG_PUBNAMES (1u << 3)
#define DWARF_LOG_DEBUG_PUBTYPES (1u << 4)
#define DWARF_LOG_DEBUG_ARANGES (1u << 5)
#define DWARF_LOG_LOOKUPS (1u << 6)
#define DWARF_LOG_TYPE_COMPLETION (1u << 7)
#define DWARF_LOG_DEBUG_MAP (1u << 8)
#define DWARF_LOG_ALL (UINT32_MAX)
#define DWARF_LOG_DEFAULT (DWARF_LOG_DEBUG_INFO)
class LogChannelDWARF : public lldb_private::LogChannel
{
public:
LogChannelDWARF ();
virtual
~LogChannelDWARF ();
static void
Initialize();
static void
Terminate();
static lldb_private::ConstString
GetPluginNameStatic();
static const char *
GetPluginDescriptionStatic();
static lldb_private::LogChannel *
CreateInstance ();
virtual lldb_private::ConstString
GetPluginName();
virtual uint32_t
GetPluginVersion();
virtual void
Disable (const char** categories, lldb_private::Stream *feedback_strm);
void
Delete ();
virtual bool
Enable (lldb::StreamSP &log_stream_sp,
uint32_t log_options,
lldb_private::Stream *feedback_strm, // Feedback stream for argument errors etc
const char **categories); // The categories to enable within this logging stream, if empty, enable default set
virtual void
ListCategories (lldb_private::Stream *strm);
static lldb_private::Log *
GetLog ();
static lldb_private::Log *
GetLogIfAll (uint32_t mask);
static lldb_private::Log *
GetLogIfAny (uint32_t mask);
static void
LogIf (uint32_t mask, const char *format, ...);
};
#endif // SymbolFileDWARF_LogChannelDWARF_h_