summaryrefslogtreecommitdiff
path: root/buildscripts/gdb
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2018-04-11 11:56:45 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2018-04-11 11:56:45 -0400
commitb41f62de9f11adfd0074550deda1296c838e2ec9 (patch)
tree8597bac676cf2b09fca4b63272719c67c420aa0b /buildscripts/gdb
parent357da5b0658dbc3516e9c02b5b090d3dcb1f4b49 (diff)
downloadmongo-b41f62de9f11adfd0074550deda1296c838e2ec9.tar.gz
SERVER-23312 Fix buildscripts/gdb/mongo_lock.py
Diffstat (limited to 'buildscripts/gdb')
-rw-r--r--buildscripts/gdb/mongo_lock.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/buildscripts/gdb/mongo_lock.py b/buildscripts/gdb/mongo_lock.py
index 0fb07c0368c..c1d6e785fe0 100644
--- a/buildscripts/gdb/mongo_lock.py
+++ b/buildscripts/gdb/mongo_lock.py
@@ -7,7 +7,6 @@ import sys
import gdb
import gdb.printing
-import mongo
if sys.version_info[0] >= 3:
# GDB only permits converting a gdb.Value instance to its numerical address when using the
@@ -327,7 +326,7 @@ def get_threads_info():
# PTID is a tuple: Process ID (PID), Lightweight Process ID (LWPID), Thread ID (TID)
(_, lwpid, _) = thread.ptid
thread_num = thread.num
- thread_id = mongo.get_thread_id()
+ thread_id = get_thread_id() # pylint: disable=undefined-variable
if not thread_id:
print("Unable to retrieve thread_info for thread %d" % thread_num)
continue
@@ -343,7 +342,8 @@ class MongoDBShowLocks(gdb.Command):
def __init__(self):
"""Initialize MongoDBShowLocks."""
- mongo.register_mongo_command(self, "mongodb-show-locks", gdb.COMMAND_DATA)
+ RegisterMongoCommand.register( # pylint: disable=undefined-variable
+ self, "mongodb-show-locks", gdb.COMMAND_DATA)
def invoke(self, *_):
"""Invoke mongodb_show_locks."""
@@ -359,7 +359,7 @@ class MongoDBShowLocks(gdb.Command):
print("Ignoring GDB error '%s' in mongodb_show_locks" % str(err))
-mongo.MongoDBShowLocks() # type: ignore
+MongoDBShowLocks()
class MongoDBWaitsForGraph(gdb.Command):
@@ -367,7 +367,8 @@ class MongoDBWaitsForGraph(gdb.Command):
def __init__(self):
"""Initialize MongoDBWaitsForGraph."""
- mongo.register_mongo_command(self, "mongodb-waitsfor-graph", gdb.COMMAND_DATA)
+ RegisterMongoCommand.register( # pylint: disable=undefined-variable
+ self, "mongodb-waitsfor-graph", gdb.COMMAND_DATA)
def invoke(self, arg, *_):
"""Invoke mongodb_waitsfor_graph."""