"It's not just the ABI: the parsing is very different too. A good C++ REPL in a debugger has to understand not only standard C++ expressions (which is a tremendous task itself), but also:
"
All true (I maintained c++ support in GDB for years, so i'm sadly aware of most of these issues), but parsing is a user interface issue (IE "What is the user asking me about"), rather than a "how do i actually access the value the user asked me about". You assume, strongly, that the user wants to use the same expressions that exist in their program. Let's assume this is true for a second: Good solutions for this already exist (libclang, etc) in most languages to abstract the "what is the user asking about" part, no good solutions exist for a lot of languages to abstract the "how do i access to the value of that in this implementation"
(This is an "in practice problem". In theory, you could pretty easily extend DWARF to tell me how to call functions in C++, for example).
" Using some kind of "agent" embedded in debugged programs as a necessary part of debugging is unacceptable, since you're frequently debugging core files and minidumps and you can't exactly put a question to a corpse."
First, i'm going to challenge this. It may be true in what you do.
However, at least in the development environment in which i function, in C++, debuggers are a tool of last resort (i literally have per-line command logs of what developers where i work do with the debugger).
The number of times they are run on core files is < 5%.
This is >25k developers.
Given the vast majority are not debugging core files, ISTM to make more sense to have an architecture targeted at serving these 95% super well, and then handle the 5% of cases differently
(I expect, when you are that screwed, that you may need a different set of tools to be effective anyway, since core files are post-mortem debugging).
Second, you make the strange assumption an agent can't read or work with core files, and needs a live process?
"The debugger needs to understand how to do all of this itself."
You assert this rather than show this.
What stops an agent from having an interface to read from memory (most in fact, do), and the callback lets the debugger give it memory from the core dump or the host?
This is in fact, what already happens in remote debugging of core dumps ....