0

I have activated the Control Flow Guard option (/guard:cf) to compile C++ programs in debug mode with Visual Studio 2017.

When I step inside a function with the debugger, Visual Studio shows the following page:

Not Found

This is quite anoying. I would like to get rid of this page. Do you know where I can find or download the source of guard_dispatch.asm?

In the following VC path, I see some assembly files like memcpy.asm but there is no guard_dispatch.asm: C:\dev\vs150\VC\Tools\MSVC\14.16.27023\crt\src\i386


If I look the callstack, the debugger stops in _guard_dispatch_icall_nop ():

callstack

I've tried to define natstepfilter rule to don't step into this function but it doesn't help:

    <?xml version="1.0" encoding="utf-8"?>
    <StepFilter xmlns="http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010">
    <Function><Name>_guard_dispatch_icall_nop</Name><Action>NoStepInto</Action></Function>
    </StepFilter>


I've tried also to uncheck the checkbox at DEBUG / Options / Debugging / General / Enable address-level debugging / Show disassembly if source is not available but it doesn't help.


Any ideas how to get ride of this page?

Daniel Laügt
  • 1,097
  • 1
  • 12
  • 17
  • Will the problem occur in VS2022? This is probably due to code error . [memcpy.asm not found error](https://stackoverflow.com/questions/31701195/memcpy-asm-not-found-error). Can you provide a minimal reproducible example? – Minxin Yu - MSFT Jul 03 '23 at 09:07
  • Thanks @MinxinYu-MSFT for your interest. I haven't found a way to build a minimal reproducible example. My case is about an indirect call with loading a library dynamically with LoadLibrary (), getting an interface pointer and calling a virtual function. I was not able to have this guard_dispatch.asm page... However, by trying to build this minimal example, I have found a solution to my issue. I'm posting my result as an answer. – Daniel Laügt Jul 04 '23 at 09:12
  • Glad to know your problem has been solved! You could accept it as an answer to close the thread. – Minxin Yu - MSFT Jul 04 '23 at 09:19

1 Answers1

0

After experimenting various things during a day, I have found one solution to this issue. The page guard_dispatch.asm not found doesn't appear if the code is compiled with the option /JMC (Just My Code). From UI, this option can be set through: Configuration Properties / C/C++ / General / Support Just My Code Debugging.

Daniel Laügt
  • 1,097
  • 1
  • 12
  • 17