mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 13:25:45 +02:00
Bug 305385: Disabled use of 'info program' because the output is inconsistent.
This commit is contained in:
parent
d46eb7e4b7
commit
c901f78d28
2 changed files with 46 additions and 34 deletions
|
@ -302,7 +302,14 @@ public class GDBProcesses extends MIProcesses {
|
||||||
*/
|
*/
|
||||||
@DsfServiceEventHandler
|
@DsfServiceEventHandler
|
||||||
public void eventDispatched(MIStoppedEvent e) {
|
public void eventDispatched(MIStoppedEvent e) {
|
||||||
// Get the PID of the inferior through gdb (if we don't have it already)
|
|
||||||
fGdb.getInferiorProcess().update();
|
// Post-poned because 'info program' yields different result on different platforms.
|
||||||
|
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=305385#c20
|
||||||
|
//
|
||||||
|
// // Get the PID of the inferior through gdb (if we don't have it already)
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// fGdb.getInferiorProcess().update();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,6 @@ import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
|
||||||
import org.eclipse.cdt.dsf.mi.service.IMICommandControl;
|
import org.eclipse.cdt.dsf.mi.service.IMICommandControl;
|
||||||
import org.eclipse.cdt.dsf.mi.service.MIProcesses.ContainerExitedDMEvent;
|
import org.eclipse.cdt.dsf.mi.service.MIProcesses.ContainerExitedDMEvent;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.commands.CLICommand;
|
import org.eclipse.cdt.dsf.mi.service.command.commands.CLICommand;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.output.CLIInfoProgramInfo;
|
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.output.MIConst;
|
import org.eclipse.cdt.dsf.mi.service.command.output.MIConst;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.output.MIExecAsyncOutput;
|
import org.eclipse.cdt.dsf.mi.service.command.output.MIExecAsyncOutput;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.output.MIGDBShowExitCodeInfo;
|
import org.eclipse.cdt.dsf.mi.service.command.output.MIGDBShowExitCodeInfo;
|
||||||
|
@ -525,35 +524,41 @@ public class MIInferiorProcess extends Process
|
||||||
else if ("error".equals(state)) { setState(State.STOPPED); }//$NON-NLS-1$
|
else if ("error".equals(state)) { setState(State.STOPPED); }//$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
//
|
||||||
* @since 3.0
|
// Post-poned because 'info program' yields different result on different platforms.
|
||||||
*/
|
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=305385#c20
|
||||||
@ConfinedToDsfExecutor("fSession#getExecutor")
|
//
|
||||||
public void update() {
|
// /**
|
||||||
// If we don't already know the PID of the inferior, ask GDB for it.
|
// * @since 3.0
|
||||||
if (getPid() == null && fContainerDMContext != null && !fGiveUpOnPidQuery) {
|
// */
|
||||||
getCommandControlService().queueCommand(
|
// @ConfinedToDsfExecutor("fSession#getExecutor")
|
||||||
fCommandFactory.createCLIInfoProgram(fContainerDMContext),
|
// public void update() {
|
||||||
new DataRequestMonitor<CLIInfoProgramInfo>(fSession.getExecutor(), null) {
|
// // If we don't already know the PID of the inferior, ask GDB for it.
|
||||||
@Override
|
// if (getPid() == null && fContainerDMContext != null && !fGiveUpOnPidQuery) {
|
||||||
protected void handleSuccess() {
|
// getCommandControlService().queueCommand(
|
||||||
if (getPid() == null) { // check again
|
// fCommandFactory.createCLIInfoProgram(fContainerDMContext),
|
||||||
Long pid = getData().getPID();
|
// new DataRequestMonitor<CLIInfoProgramInfo>(fSession.getExecutor(), null) {
|
||||||
if (pid != null) {
|
// @Override
|
||||||
setPid(Long.toString(pid));
|
// protected void handleSuccess() {
|
||||||
}
|
// if (getPid() == null) { // check again
|
||||||
else {
|
// Long pid = getData().getPID();
|
||||||
// We made the 'program info' request to
|
// if (pid != null) {
|
||||||
// GDB, it gave us an answer, but it either
|
// setPid(Long.toString(pid));
|
||||||
// doesn't provide the process PID or we
|
// }
|
||||||
// can't make it out. No point in trying
|
// else {
|
||||||
// again.
|
// // We made the 'program info' request to
|
||||||
fGiveUpOnPidQuery = true;
|
// // GDB, it gave us an answer, but it either
|
||||||
assert false; // investigate why this is happening
|
// // doesn't provide the process PID or we
|
||||||
}
|
// // can't make it out. No point in trying
|
||||||
}
|
// // again.
|
||||||
}
|
// fGiveUpOnPidQuery = true;
|
||||||
});
|
// assert false; // investigate why this is happening
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue