mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
utils: Teach lldbDataFormatters to load automatically
Add an __lldb_init_module function so that importing the lldbDataFormatters script automatically adds the formatters. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209712 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4cbbe0d97e
commit
e8dee1a67b
@ -1,10 +1,18 @@
|
||||
"""
|
||||
Load into LLDB with:
|
||||
script import lldbDataFormatters
|
||||
type synthetic add -x "^llvm::SmallVectorImpl<.+>$" -l lldbDataFormatters.SmallVectorSynthProvider
|
||||
type synthetic add -x "^llvm::SmallVector<.+,.+>$" -l lldbDataFormatters.SmallVectorSynthProvider
|
||||
LLDB Formatters for LLVM data types.
|
||||
|
||||
Load into LLDB with 'command script import /path/to/lldbDataFormatters.py'
|
||||
"""
|
||||
|
||||
def __lldb_init_module(debugger, internal_dict):
|
||||
debugger.HandleCommand('type category define -e llvm -l c++')
|
||||
debugger.HandleCommand('type synthetic add -w llvm '
|
||||
'-l lldbDataFormatters.SmallVectorSynthProvider '
|
||||
'-x "^llvm::SmallVectorImpl<.+>$"')
|
||||
debugger.HandleCommand('type synthetic add -w llvm '
|
||||
'-l lldbDataFormatters.SmallVectorSynthProvider '
|
||||
'-x "^llvm::SmallVector<.+,.+>$"')
|
||||
|
||||
# Pretty printer for llvm::SmallVector/llvm::SmallVectorImpl
|
||||
class SmallVectorSynthProvider:
|
||||
def __init__(self, valobj, dict):
|
||||
|
Loading…
Reference in New Issue
Block a user