Eclipse CDT 플러그인과 통합하려고하는 gcc/gdb의 사용자 정의 빌드가 있습니다. 나는 사용자 정의 Eclipse 툴체인을 만들었으며 성공적으로 빌드 할 수있다.사용자 정의 Eclipse 디버그 구성
지금 내가하려는 것은 원격 디버깅을 활성화하는 것이지만 지금은 성공하지 못합니다.
AbstractCLaunchDelegate를 확장하는 실행 구성 하위 클래스를 만들었습니다. 발사 방법에서 나는 다음과 같은 코드가 있습니다
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException
{
// Get path to binary
IPath exePath = CDebugUtils.verifyProgramPath(configuration);
ICProject project = CDebugUtils.verifyCProject(configuration);
IBinaryObject exeFile = verifyBinary(project, exePath);
// If debugging
if(mode.equals("debug"))
{
// Get debug configuration
ICDebugConfiguration config = getDebugConfig(configuration);
// Get debugger instance
ICDIDebugger2 debugger = (ICDIDebugger2)config.createDebugger();
// Create session
ICDISession session = debugger2.createSession(launch, exePath.toFile(), monitor);
// Note: Copied from LocalCDILaunchDelegate
boolean stopInMain = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
String stopSymbol = null;
if (stopInMain)
stopSymbol = launch.getLaunchConfiguration().getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
ICDITarget[] targets = session.getTargets();
for(int i = 0; i < targets.length; i++) {
Process process = targets[i].getProcess();
IProcess iprocess = null;
if (process != null) {
iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(exePath.toOSString()), getDefaultProcessMap());
}
// Note: Failing here with SIGILL
CDIDebugModel.newDebugTarget(launch, project.getProject(), targets[i], renderTargetLabel(config), iprocess, exeFile, true, false, stopSymbol, true);
}
}
}
내 문제는() CDIDebugModel.newDebugTarget를 호출 할 때 내가 GDB에서 다시 SIGILL 오류를 얻고 있다는 것입니다. 이 줄을 나가면 디버거 세션이 만들어 지지만 중단 점이 나타나지 않습니다.
Eclipse에서 만든 (및 실패한) 것과 동일한 이진 파일을 사용하여 명령 프롬프트에서 수동으로 디버깅하려고하면 아무런 문제가 없습니다. 내가 발견 한 유일한 차이점은 "continue [BinaryName]"명령을 실행하기 전에 동일한 SIGILL 오류가 발생하지 않는다는 것입니다.
아이디어가 있으십니까?
덕분에, 앨런