[SERVER-78225] GDB pretty printer unable to print NamespaceString Created: 20/Jun/23  Updated: 29/Oct/23  Resolved: 22/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Matt Broadstone Assignee: Matt Broadstone
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

SERVER-75529 changed the in-memory layout of NamespaceString, but broke pretty-printing that type in gdb. From a recent discussion:

I’m trying to look at the value of a variable in gdb from a core dump and getting this error:
(gdb) t 59
[Switching to thread 59 (Thread 0x7f57eca84700 (LWP 21446))]
#0 0x00007f581ef9c7e1 in poll () from /lib64/libc.so.6
(gdb) f 22
#22 0x00007f581c94f332 in mongo::repl::OplogApplierImpl::_applyOplogBatch (this=0x55f1a0e93ec0, opCtx=0x55f1a0ef5000, ops=std::vector of length 1, capacity 5000 =

Unknown macro: {...}

) at src/mongo/db/repl/oplog_applier_impl.cpp:555
555 Lock::ParallelBatchWriterMode pbwm(opCtx);
(gdb) p ops
$1 = std::vector of length 1, capacity 5000 =

Unknown macro: {Traceback (most recent call last)}

any ideas?



 Comments   
Comment by Githook User [ 21/Jun/23 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-78225 Fix NamespaceString gdb pretty printer
Branch: master
https://github.com/mongodb/mongo/commit/24f5f5dfd25fa4cc11caa8444af3750c6e293824

Generated at Thu Feb 08 06:37:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.