In VS2019 what Conditions can I use in Function Breakpoints in native code?

JamesBurgess 21 Reputation points
2021-02-26T18:54:31.067+00:00

When I set a breakpoint on a kernel32 function it works but I'm wonder what I can type into Conditions expression box:
72545-image.png

Specifically what I'd like to do would be to compare the string which I know is at the stack register plus 4 bytes (esp+4) since that'll be the file path name. Is that possible? If not what can I type in there for this kind of breakpoint?

Cheers,
-James

PS
I know I can do this in windbg, I'm looking to do this in VS2019

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,479 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
959 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 113.8K Reputation points
    2021-02-26T20:12:01.827+00:00

    For the specific part of your question, try entering this expression:

    wcsicmp(*(wchar_t**)(esp+4), L"known path…") == 0


0 additional answers

Sort by: Most helpful