diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2020-10-27 09:47:11 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-28 14:10:43 +0000 |
commit | 2911c96e8ba0021372d1f7fd47282b012403180f (patch) | |
tree | eef278d08d3aa2868b1c49b5513880ed6c5a6904 /src/mongo/bson/bsonobj.cpp | |
parent | 15b66de500c7117999c061b89febb4d169355e53 (diff) | |
download | mongo-2911c96e8ba0021372d1f7fd47282b012403180f.tar.gz |
SERVER-51856 Add Visual Studio Natvis debugger visualizers for BSONObj and BSONElement
Diffstat (limited to 'src/mongo/bson/bsonobj.cpp')
-rw-r--r-- | src/mongo/bson/bsonobj.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/bson/bsonobj.cpp b/src/mongo/bson/bsonobj.cpp index 48a3102b605..f606cb7d13b 100644 --- a/src/mongo/bson/bsonobj.cpp +++ b/src/mongo/bson/bsonobj.cpp @@ -819,4 +819,17 @@ BSONObjIteratorSorted::BSONObjIteratorSorted(const BSONObj& object) BSONArrayIteratorSorted::BSONArrayIteratorSorted(const BSONArray& array) : BSONIteratorSorted(array, ElementFieldCmp(true)) {} +/** + * Types used to represent BSONObj and BSONArray memory in the Visual Studio debugger + */ +#if defined(_MSC_VER) && defined(_DEBUG) +struct BSONObjData { + int32_t size; +} bsonObjDataInstance; + +struct BSONArrayData { + int32_t size; +} bsonObjArrayInstance; +#endif // defined(_MSC_VER) && defined(_DEBUG) + } // namespace mongo |