llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Cannot call a function in the debugee on Windows.

Open llvmbot opened this issue 11 years ago • 13 comments

Bugzilla Link 21765
Version unspecified
OS Windows NT
Blocks llvm/llvm-project#22140
Reporter LLVM Bugzilla Contributor
CC @amccarth-google,@stella.stamenova

Extended Description

This can be reproduced via the following command line:

d:\src\llvm\build\ninja>D:\python_src\Python-2.7.8\PCbuild\python_d.exe D:\src\llvm\tools\lldb\test/dotest.py -t -q --arch=i686 --executable D:/src/llvm/build/ninja/bin/lldb.exe -s D:/src/llvm/build/ninja/lldb-test-traces -u CXXFLAGS -u CFLAGS -C D:\src\llvm\build\ninja\bin\clang.exe -p TestCallWithTimeout.py D:\src\llvm\tools\lldb\test\expression_command\timeout

At some point during the run of the test, the test tries to call a function that exists in the debugee. Parsing this expression fails and it says it cannot find the symbol in the target.

llvmbot avatar Dec 05 '14 21:12 llvmbot

mentioned in issue llvm/llvm-project#22140

llvmbot avatar Nov 26 '21 19:11 llvmbot

This is the full list of tests that are marked as failing because of this bug right now:

TestCallWithTimeout.py TestFormatters.py TestFunctionTypes.py TestCallOverriddenMethod.py TestCallStdStringFunction.py TestTargetAPI.py TestNameLookup.py TestSymbolAPI.py TestDisasmAPI.py TestCPPStaticMembers.py TestXValuePrinting.py TestIRInterpreter.py TestExpressionInSyscall.py

Several that had been marked are now passing. It is possible that some of them are false positives, but there's a large number of unexpectedly passing tests on Windows now, so I am bulk un-xfailing them, so that we can make the Buildbot green.

stella.stamenova avatar Dec 19 '18 19:12 stella.stamenova

Oh well, was worth a try. Thanks for checking

llvmbot avatar May 17 '18 18:05 llvmbot

All of these tests are still failing with the patch

stella.stamenova avatar May 17 '18 18:05 stella.stamenova

Can you try the patch here:

llvm/llvm-bugzilla-archive#37485

And see if it fixes the issue? This bug just came through today, I expect it will fix some kind of issues with the test suite, but it's hard to know what without trying it.

llvmbot avatar May 17 '18 17:05 llvmbot

TestCallOverriddenMethod TestExprsBug35310

are also failing because of this bug

stella.stamenova avatar May 17 '18 17:05 stella.stamenova

The test is passing for the wrong reasons, so maybe this is still an issue. Needs more investigation.

amccarth-google avatar Feb 27 '18 00:02 amccarth-google

The test that references this bug is passing, and the bug this one supposedly blocks is fixed, so I think this is fixed. I'm about to un-XFAIL the test (TestCallStdSTringFunction.test), at which point I'll close this one.

amccarth-google avatar Feb 26 '18 21:02 amccarth-google

This is also affecting the following test suites.

TestCPPStaticMethods.py TestCStrings.py TestExprHelpExamples.py TestExprs.py TestFormatters.py TestFunctionTypes.py TestNestedPersistentTypes.py TestPersistentTypes.py TestPrintfAfterUp.py TestSetValues.py

llvmbot avatar Aug 20 '15 22:08 llvmbot

Assigning to majnemer as it might be a mangling issue, which he has some expertise in.

You can put the breakpoint in all overloads of SBFrame::EvaluateExpression in SBFrame.cpp to step through the failing method.

llvmbot avatar Dec 05 '14 22:12 llvmbot

assigned to @amccarth-google

llvmbot avatar Dec 05 '14 21:12 llvmbot

Looks like maybe one instance of this got fixed by some ABI changes I made recently... un-xfail: 40501f1b4139e472094ac0d4102923d2730515a1 Probably causal change: 4769976c49be468d7629d513080e6959a25adcfe

dwblaikie avatar Oct 04 '22 22:10 dwblaikie

Some tests are working now, just needed to use a Windows specific function call.

Having fixed those, tests marked with this issue are:

$ grep -r pr21765
lldb/test/API/python_api/function_symbol/TestDisasmAPI.py:    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
lldb/test/API/python_api/function_symbol/TestSymbolAPI.py:    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
lldb/test/API/python_api/name_lookup/TestNameLookup.py:    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
lldb/test/API/python_api/target/TestTargetAPI.py:    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
lldb/test/API/lang/c/function_types/TestFunctionTypes.py:    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py:    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")

Though their failures seem more like lookup issues than function calling problems.

DavidSpickett avatar Jul 03 '25 10:07 DavidSpickett