Files
clang-p2996/lldb/include/lldb/Target/PathMappingList.h
Greg Clayton 7e14f91dbd Fixed the SymbolContext::DumpStopContext() to correctly indent and dump
inline contexts when the deepest most block is not inlined.

Added source path remappings to the lldb_private::Target class that allow it
to remap paths found in debug info so we can find source files that are elsewhere
on the current system.

Fixed disassembly by function name to disassemble inline functions that are
inside other functions much better and to show enough context before the
disassembly output so you can tell where things came from.

Added the ability to get more than one address range from a SymbolContext 
class for the case where a block or function has discontiguous address ranges.

llvm-svn: 130044
2011-04-23 02:04:55 +00:00

103 lines
2.5 KiB
C++

//===-- PathMappingList.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_PathMappingList_h_
#define liblldb_PathMappingList_h_
// C Includes
// C++ Includes
#include <map>
#include <vector>
// Other libraries and framework includes
#include "lldb/Core/ConstString.h"
#include "lldb/Core/Error.h"
// Project includes
namespace lldb_private {
class PathMappingList
{
public:
typedef void (*ChangedCallback) (const PathMappingList &path_list,
void *baton);
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
PathMappingList (ChangedCallback callback,
void *callback_baton);
PathMappingList (const PathMappingList &rhs);
virtual
~PathMappingList ();
const PathMappingList &
operator =(const PathMappingList &rhs);
void
Append (const ConstString &path, const ConstString &replacement, bool notify);
void
Clear (bool notify);
void
Dump (Stream *s);
size_t
GetSize ();
bool
GetPathsAtIndex (uint32_t idx, ConstString &path, ConstString &new_path) const;
void
Insert (const ConstString &path,
const ConstString &replacement,
uint32_t insert_idx,
bool notify);
bool
Remove (off_t index, bool notify);
bool
Remove (const ConstString &path, bool notify);
bool
Replace (const ConstString &path,
const ConstString &new_path,
bool notify);
bool
RemapPath (const ConstString &path, ConstString &new_path);
uint32_t
FindIndexForPath (const ConstString &path) const;
protected:
typedef std::pair <ConstString, ConstString> pair;
typedef std::vector <pair> collection;
typedef collection::iterator iterator;
typedef collection::const_iterator const_iterator;
iterator
FindIteratorForPath (const ConstString &path);
const_iterator
FindIteratorForPath (const ConstString &path) const;
collection m_pairs;
ChangedCallback m_callback;
void * m_callback_baton;
};
} // namespace lldb_private
#endif // liblldb_PathMappingList_h_