私は以下のメソッドを呼び出すことができます。 Cの文字列を返します。WinDBGでC++メソッドインスタンスを呼び出して結果を出力する
GDBでは、この呼び出しを使用して結果を出力します。 kCurrentScope
インスタンスが利用できるように、呼び出す前に適切なスレッドとフレームを設定する必要があることに注意してください。
printf "%s\n", mongo::mozjs::kCurrentScope->buildStackString().c_str()
CDB/WinDbgの中でこれを行う方法はありますか?
0:002> x mongo!mongo::mozjs::kCurrentScope
000000bb`46c318f0 mongo!mongo::mozjs::kCurrentScope = 0x000000bb`4b7088a0
興味深いことに、Windowsではこの機能が表示されません。それは関数がインライン化されていることが考えられ
0:002> x mongo!*buildStackString*
00007ff7`c387db40 mongo!JS::BuildStackString (struct JSContext *, class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>, unsigned int64)
00007ff7`c3b266cc mongo!`JS::BuildStackString'::`1'::dtor$9 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
00007ff7`c3b266c0 mongo!`JS::BuildStackString'::`1'::dtor$8 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
00007ff7`c3b266b4 mongo!`JS::BuildStackString'::`1'::dtor$1 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
00007ff7`c3b26680 mongo!`JS::BuildStackString'::`1'::dtor$0 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
00007ff7`c3b266e4 mongo!`JS::BuildStackString'::`1'::dtor$3 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
00007ff7`c3b266d8 mongo!`JS::BuildStackString'::`1'::dtor$2 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
00007ff7`c3b266fc mongo!`JS::BuildStackString'::`1'::dtor$5 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
00007ff7`c3b266f0 mongo!`JS::BuildStackString'::`1'::dtor$4 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
00007ff7`c3b26698 mongo!`JS::BuildStackString'::`1'::dtor$7 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
00007ff7`c3b2668c mongo!`JS::BuildStackString'::`1'::dtor$6 (class JS::Handle<JSObject *>, class JS::MutableHandle<JSString *>)
0:002> .call mongo!mongo::mozjs::buildStackString(kCurrentScope)
Couldn't resolve error at 'mongo!mongo::mozjs::buildStackString(kCurrentScope)'
0:002> .call mongo!mongo::mozjs::buildStackString(mongo!mongo::mozjs::kCurrentScope)
Couldn't resolve error at 'mongo!mongo::mozjs::buildStackString(mongo!mongo::mozjs::kCurrentScope)'
を試すことができ、シンボルの検索
として定義されますすべての発信者と体は未使用として最適化されていますか? –
インライン化されていないようです。シンボルから伝える方法はありますか? –