mirror of https://github.com/mongodb/mongo
SERVER-41168 Port mongodb-specific debugging commands in gdb to lldb
This commit is contained in:
parent
277229505f
commit
cd8fc73729
|
|
@ -3,3 +3,4 @@
|
|||
# settings set target.load-cwd-lldbinit true
|
||||
#
|
||||
command script import buildscripts/lldb/lldb_printers.py
|
||||
command script import buildscripts/lldb/lldb_commands.py
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import lldb
|
||||
|
||||
def __lldb_init_module(debugger, dict):
|
||||
############################
|
||||
# register custom commands #
|
||||
############################
|
||||
debugger.HandleCommand("command script add -f lldb_commands.PrintGlobalServiceContext mongodb-service-context")
|
||||
debugger.HandleCommand("command script add -f lldb_commands.PrintGlobalServiceContext mongodb-dump-locks")
|
||||
debugger.HandleCommand("command script alias mongodb-help help")
|
||||
|
||||
|
||||
#######################
|
||||
# Command Definitions #
|
||||
#######################
|
||||
|
||||
def PrintGlobalServiceContext(debugger, *args):
|
||||
"""
|
||||
Provides the same convenience command available in GDB
|
||||
integrations to print the globalServiceContext.
|
||||
"""
|
||||
debugger.HandleCommand("print *globalServiceContext")
|
||||
|
||||
|
||||
def MongoDBDumpLocks(debugger, *args):
|
||||
"""Dump locks in the mongod process."""
|
||||
debugger.HandleCommand("call globalLockManager.dump()")
|
||||
Loading…
Reference in New Issue