mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Adjustment to last commit. No need to make isAttached and isRemote mutually exclusive. CDI-GDB doesn't currently support attaching via gdbserver, but it's certainly possible (DSF-GDB supports it).
This commit is contained in:
parent
2c411b4045
commit
36de03adca
3 changed files with 10 additions and 13 deletions
|
@ -385,7 +385,7 @@ public class MIInferior extends Process {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called early on in the debug session to mark the inferior process as being
|
* Called early on in the debug session to mark the inferior process as being
|
||||||
* under the control of a gdbserver.
|
* under the control of a gdbserver.
|
||||||
*
|
*
|
||||||
* @since 7.0
|
* @since 7.0
|
||||||
*/
|
*/
|
||||||
|
@ -394,8 +394,7 @@ public class MIInferior extends Process {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the inferior process being debugged remotely through gdbserver? This
|
* Is the inferior process being debugged remotely through gdbserver?
|
||||||
* is mutually exclusive with {@link #isAttachedLocalInferior()}.
|
|
||||||
*
|
*
|
||||||
* @since 7.0
|
* @since 7.0
|
||||||
*/
|
*/
|
||||||
|
@ -404,14 +403,12 @@ public class MIInferior extends Process {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is this inferior process being debugged through a local attach session?
|
* Was the inferior process attached to by gdb (as opposed to launched by
|
||||||
* I.e., is it a process running on "this" machine that was not launched by
|
* gdb).
|
||||||
* gdb but which gdb attached to? This is mutually exclusive with
|
*
|
||||||
* {@link #isRemoteInferior()
|
* @since 7.0
|
||||||
*
|
|
||||||
* @since 7.0
|
|
||||||
*/
|
*/
|
||||||
public boolean isAttachedLocalInferior() {
|
public boolean isAttachedInferior() {
|
||||||
return session.isAttachSession();
|
return session.isAttachSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class CygwinMIProcessAdapter extends MIProcessAdapter {
|
||||||
// simulated Cygwin/POSIX SIGINT; a CTRL-C won't do.
|
// simulated Cygwin/POSIX SIGINT; a CTRL-C won't do.
|
||||||
gdbSpawner.interrupt();
|
gdbSpawner.interrupt();
|
||||||
}
|
}
|
||||||
else if (inferior.isAttachedLocalInferior()) {
|
else if (inferior.isAttachedInferior()) {
|
||||||
// Cygwin gdb 6.8 has no support for forwarding an
|
// Cygwin gdb 6.8 has no support for forwarding an
|
||||||
// interrupt request to the local process it has
|
// interrupt request to the local process it has
|
||||||
// attached to. That support has since been added and
|
// attached to. That support has since been added and
|
||||||
|
|
|
@ -123,9 +123,9 @@ public class MIProcessAdapter implements MIProcess {
|
||||||
if (fGDBProcess instanceof Spawner) {
|
if (fGDBProcess instanceof Spawner) {
|
||||||
if (inferior.isRunning()) {
|
if (inferior.isRunning()) {
|
||||||
Spawner gdbSpawner = (Spawner) fGDBProcess;
|
Spawner gdbSpawner = (Spawner) fGDBProcess;
|
||||||
if (inferior.isAttachedLocalInferior()) {
|
if (inferior.isAttachedInferior() && !inferior.isRemoteInferior()) {
|
||||||
// not all gdb versions forward the interrupt to an attached
|
// not all gdb versions forward the interrupt to an attached
|
||||||
// inferior, so interrupt the inferior directly
|
// local inferior, so interrupt the inferior directly
|
||||||
interruptInferior(inferior);
|
interruptInferior(inferior);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue