microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
818 stars 218 forks source link

MIEngine: Set MajorVersion from the correct place #1441

Closed intel-rganesh closed 8 months ago

intel-rganesh commented 8 months ago

We were previously setting the MajorGdbVersion when the process exited and this was too late. We need to set this OnStateChanged so we can use this to opt for the latest gdb MI commands. Additionally include Intel GNU gdb example when fetching the GDB version.

Signed-off-by: intel-rganesh rakesh.ganesh@intel.com

gregg-miskelly commented 8 months ago
                    _initializationLog.AddLast(line);

Rather than scraping the initialization log after the fact, I think we should just process the line here. Something like:

if (string.IsNullOrEmpty(_gdbVersion))
{
    TryInitializeGdbVersion(line);
}

Refers to: src/MICore/Debugger.cs:961 in 46756e5. [](commit_id = 46756e52bca7c620c0cbd974b8ec77072ca3632b, deletion_comment = False)