summaryrefslogtreecommitdiff
path: root/buildscripts/gdb
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-11-29 11:52:27 -0500
committerDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-11-30 09:14:54 -0500
commitc900b4bd14011b5e95cff597ad802a2eaa45666b (patch)
tree365c5f85e4bd6e00b527808b006efd145ff29995 /buildscripts/gdb
parentd17de2b958eb660593e2f5a180eff43ebe803b85 (diff)
downloadmongo-c900b4bd14011b5e95cff597ad802a2eaa45666b.tar.gz
SERVER-38313: Update BSON decoding in GDB pretty printing.
Diffstat (limited to 'buildscripts/gdb')
-rw-r--r--buildscripts/gdb/mongo_printers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildscripts/gdb/mongo_printers.py b/buildscripts/gdb/mongo_printers.py
index 6876b69aa6c..95070fd2ee7 100644
--- a/buildscripts/gdb/mongo_printers.py
+++ b/buildscripts/gdb/mongo_printers.py
@@ -121,9 +121,9 @@ class BSONObjPrinter(object):
return
inferior = gdb.selected_inferior()
- buf = bytes(inferior.read_memory(self.ptr, self.size))
+ buf = bson.BSON(bytes(inferior.read_memory(self.ptr, self.size)))
options = CodecOptions(document_class=collections.OrderedDict)
- bsondoc = bson.BSON.decode(buf, codec_options=options)
+ bsondoc = buf.decode(codec_options=options)
for key, val in bsondoc.items():
yield 'key', key