mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-01 00:35:43 +00:00
utils: Teach lldbDataFormatters to load automatically
Add an __lldb_init_module function so that importing the lldbDataFormatters script automatically adds the formatters. llvm-svn: 209712
This commit is contained in:
parent
371ff7e9ac
commit
f9df51410b
@ -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…
x
Reference in New Issue
Block a user