All pastes #2074096 Raw Edit

Someone

public text v1 · immutable
#2074096 ·published 2011-06-03 12:34 UTC
rendered paste body
(gdb) f 0
#0  mongo::mutex::scoped_lock::scoped_lock (this=0x7fffffffdfc0, m=...) at /usr/include/mongo/client/../util/concurrency/mutex.h:206
206                 scoped_lock( mongo::mutex &m ) : _l( m.boost() ) {
(gdb) l
201             class scoped_lock : boost::noncopyable {
202     #if defined(_DEBUG)
203                 mongo::mutex *mut;
204     #endif
205             public:
206                 scoped_lock( mongo::mutex &m ) : _l( m.boost() ) {
207     #if defined(_DEBUG)
208                     mut = &m;
209                     mutexDebugger.entering(mut->_name);
210     #endif
(gdb) p m
$20 = (mongo::mutex &) @0x7ffff65d3c90: {
  <boost::noncopyable_::noncopyable> = {<No data fields>}, 
  members of mongo::mutex: 
  _m = 0x7ffff6325aff
}
(gdb) p &m
$21 = (mongo::mutex *) 0x7ffff65d3c90
(gdb) f 1
#1  0x00007ffff629fb83 in mongo::Security::getNonce (this=0x7ffff65d3c38) at db/nonce.cpp:55
55              scoped_lock lk(m);
(gdb) l
50      #endif
51          }
52
53          nonce Security::getNonce() {
54              static mongo::mutex m("getNonce");
55              scoped_lock lk(m);
56              
57              if ( ! _initialized )
58                  init();
59
(gdb) p m
$22 = {
  <boost::noncopyable_::noncopyable> = {<No data fields>}, 
  members of mongo::mutex: 
  _name = 0x7ffff6325aff "getNonce", 
  _m = 0x660360
}
(gdb) p &m
$23 = (mongo::mutex *) 0x7ffff65d3c90