GP-869: Implement ConPTY-based GDB pty

This commit is contained in:
d-millar 2022-01-07 18:46:54 +00:00 committed by Dan
parent 073c726885
commit f2a34dc2e1
33 changed files with 1922 additions and 208 deletions

View file

@ -73,6 +73,27 @@ public class GdbDebuggerProgramLaunchOpinion implements DebuggerProgramLaunchOpi
}
}
protected class InVmGdbConPtyDebuggerProgramLaunchOffer
extends AbstractGdbDebuggerProgramLaunchOffer {
private static final String FACTORY_CLS_NAME =
"agent.gdb.GdbInJvmConPtyDebuggerModelFactory";
public InVmGdbConPtyDebuggerProgramLaunchOffer(Program program, PluginTool tool,
DebuggerModelFactory factory) {
super(program, tool, factory);
}
@Override
public String getConfigName() {
return "IN-VM GDB (Windows)";
}
@Override
public String getMenuTitle() {
return "in GDB locally IN-VM (Windows)";
}
}
protected class GadpGdbDebuggerProgramLaunchOffer
extends AbstractGdbDebuggerProgramLaunchOffer {
private static final String FACTORY_CLS_NAME =
@ -143,6 +164,9 @@ public class GdbDebuggerProgramLaunchOpinion implements DebuggerProgramLaunchOpi
else if (clsName.equals(SshGdbDebuggerProgramLaunchOffer.FACTORY_CLS_NAME)) {
offers.add(new SshGdbDebuggerProgramLaunchOffer(program, tool, factory));
}
else if (clsName.equals(InVmGdbConPtyDebuggerProgramLaunchOffer.FACTORY_CLS_NAME)) {
offers.add(new InVmGdbConPtyDebuggerProgramLaunchOffer(program, tool, factory));
}
}
return offers;
}

View file

@ -30,7 +30,7 @@ public class GdbX86DebuggerMappingOpinion implements DebuggerMappingOpinion {
protected static final LanguageID LANG_ID_X86 = new LanguageID("x86:LE:32:default");
protected static final LanguageID LANG_ID_X86_64 = new LanguageID("x86:LE:64:default");
protected static final CompilerSpecID COMP_ID_GCC = new CompilerSpecID("gcc");
protected static final CompilerSpecID COMP_ID_VS = new CompilerSpecID("Visual Studio");
protected static final CompilerSpecID COMP_ID_VS = new CompilerSpecID("windows");
protected static class GdbI386X86_64RegisterMapper extends DefaultDebuggerRegisterMapper {
public GdbI386X86_64RegisterMapper(CompilerSpec cSpec,
@ -120,7 +120,7 @@ public class GdbX86DebuggerMappingOpinion implements DebuggerMappingOpinion {
return Set.of(new GdbI386LinuxOffer(process));
}
}
else if (os.contains("Cygwin")) {
else if (os.contains("Cygwin") || os.contains("Windows")) {
if (is64Bit) {
return Set.of(new GdbI386X86_64WindowsOffer(process));
}