Say, I am writing my own debugger. Since this debugger will only be used to debug some specific applications, I want it to understand the program semantics better than a generic debugger can. In order to do this, I want to annotate variables and functions in my program with certain custom debug information that I can later query from the debugger.
Is there any way I can achieve this using GCC or Clang, on Linux OS with DWARF 4 debug system?
Optionally, is there a way to achieve it with MSVC on Windows OS, or with Clang on MacOS too?