Trouble calling member function in debugger

时光毁灭记忆、已成空白 提交于 2019-12-11 04:59:49

问题


I'm trying to call a member function of a variable from within the watch window of VS 2010. I keep getting the error, "member function not present". I've searched google and SO and arrived at these attempts:

{,,Dll}var.member()
var.{,,Dll}member()
var.{,,Dll}namespace::class::member()
{,,Dll}member(&var)
{,,Dll}namespace::class::member(&var)

None work. The errors are, respectedly:

"symbol 'var' not found"
"missing operand"
"missing operand"
"symbol 'var' not found"
"symbol 'var' not found"

However, var in the watch window works fine.

The function does exist. I can call it from code. I just can't seem to use it in a watch expression. If I could I think I could answer my somewhat related question: Viewing a pimpl from DLL in debugger

Yes, symbols are loaded. I can watch this:

{,,Dll}namespace::class::member

It results in a type I would expect.

Any ideas?

Edit: oh, and the var is of a type exported from 'Dll.dll' and imported by the current process I'm trying to debug (unit tests).

来源:https://stackoverflow.com/questions/16844804/trouble-calling-member-function-in-debugger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!