1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

Make all the stopped event inherited from MIStopped

This commit is contained in:
Alain Magloire 2002-08-27 03:47:59 +00:00
parent 4a84a692d6
commit 7250fe4d1a
9 changed files with 36 additions and 15 deletions

View file

@ -20,13 +20,13 @@ import org.eclipse.cdt.debug.mi.core.command.MIExecStepInstruction;
import org.eclipse.cdt.debug.mi.core.command.MIExecUntil;
import org.eclipse.cdt.debug.mi.core.event.MIBreakpointEvent;
import org.eclipse.cdt.debug.mi.core.event.MIEvent;
import org.eclipse.cdt.debug.mi.core.event.MIGDBExitEvent;
import org.eclipse.cdt.debug.mi.core.event.MIFunctionFinishedEvent;
import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
import org.eclipse.cdt.debug.mi.core.event.MILocationReachedEvent;
import org.eclipse.cdt.debug.mi.core.event.MIRunningEvent;
import org.eclipse.cdt.debug.mi.core.event.MISignalEvent;
import org.eclipse.cdt.debug.mi.core.event.MISteppingRangeEvent;
import org.eclipse.cdt.debug.mi.core.event.MIStoppedEvent;
import org.eclipse.cdt.debug.mi.core.event.MIWatchpointEvent;
import org.eclipse.cdt.debug.mi.core.output.MIAsyncRecord;
import org.eclipse.cdt.debug.mi.core.output.MIConsoleStreamOutput;
@ -212,7 +212,8 @@ MIPlugin.getDefault().debugLog(line);
// HACK: GDB for temporary breakpoints will not send the
// "reason" ??? Fake this as breakpoint-hit
if (e == null) {
e = createEvent("breakpoint-hit", exec);
//e = createEvent("breakpoint-hit", exec);
e = new MIStoppedEvent();
if (e != null) {
list.add(e);
}

View file

@ -24,6 +24,7 @@ import org.eclipse.cdt.debug.mi.core.event.MILocationReachedEvent;
import org.eclipse.cdt.debug.mi.core.event.MIRunningEvent;
import org.eclipse.cdt.debug.mi.core.event.MISignalEvent;
import org.eclipse.cdt.debug.mi.core.event.MISteppingRangeEvent;
import org.eclipse.cdt.debug.mi.core.event.MIStoppedEvent;
import org.eclipse.cdt.debug.mi.core.event.MIThreadExitEvent;
import org.eclipse.cdt.debug.mi.core.event.MIVarChangedEvent;
import org.eclipse.cdt.debug.mi.core.event.MIWatchpointEvent;
@ -42,12 +43,7 @@ public class EventManager extends SessionObject implements ICDIEventManager, Obs
CSession session = getCSession();
ICDIEvent cdiEvent = null;
if ((miEvent instanceof MIBreakpointEvent) ||
(miEvent instanceof MIFunctionFinishedEvent) ||
(miEvent instanceof MILocationReachedEvent) ||
(miEvent instanceof MISignalEvent) ||
(miEvent instanceof MISteppingRangeEvent) ||
(miEvent instanceof MIWatchpointEvent)) {
if (miEvent instanceof MIStoppedEvent) {
processSuspendedEvent(miEvent);
cdiEvent = new SuspendedEvent(session, miEvent);
} else if (miEvent instanceof MIRunningEvent) {

View file

@ -14,10 +14,10 @@ import org.eclipse.cdt.debug.mi.core.output.MITuple;
import org.eclipse.cdt.debug.mi.core.output.MIValue;
/**
* ^done,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048468",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff18c"}],file="hello.c",line="4"}
* ^stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048468",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff18c"}],file="hello.c",line="4"}
*
*/
public class MIBreakpointEvent extends MIEvent {
public class MIBreakpointEvent extends MIStoppedEvent {
int bkptno;
int threadId;

View file

@ -16,7 +16,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIValue;
/**
* *stopped,reason="function-finished",thread-id="0",frame={addr="0x0804855a",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff18c"}],file="hello.c",line="17"},gdb-result-var="$1",return-value="10"
*/
public class MIFunctionFinishedEvent extends MIEvent {
public class MIFunctionFinishedEvent extends MIStoppedEvent {
String gdbResult = "";
String returnValue = "";

View file

@ -16,7 +16,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIValue;
/**
* *stopped,reason="location-reached",thread-id="0",frame={addr="0x0804858e",func="main2",args=[],file="hello.c",line="27"}
*/
public class MILocationReachedEvent extends MIEvent {
public class MILocationReachedEvent extends MIStoppedEvent {
int threadId;
MIFrame frame;

View file

@ -17,7 +17,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIValue;
* *stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",thread-id="0",frame={addr="0x400e18e1",func="__libc_nanosleep",args=[],file="__libc_nanosleep",line="-1"}
*
*/
public class MISignalEvent extends MIEvent {
public class MISignalEvent extends MIStoppedEvent {
String sigName = "";
String sigMeaning = "";

View file

@ -17,7 +17,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIValue;
*
* *stopped,reason="end-stepping-range",thread-id="0",frame={addr="0x08048538",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff18c"}],file="hello.c",line="13"}
*/
public class MISteppingRangeEvent extends MIEvent {
public class MISteppingRangeEvent extends MIStoppedEvent {
int threadId;
MIFrame frame;

View file

@ -0,0 +1,24 @@
/*
* (c) Copyright QNX Software Systems Ltd. 2002.
* All Rights Reserved.
*
*/
package org.eclipse.cdt.debug.mi.core.event;
import org.eclipse.cdt.debug.mi.core.output.MIConst;
import org.eclipse.cdt.debug.mi.core.output.MIExecAsyncOutput;
import org.eclipse.cdt.debug.mi.core.output.MIFrame;
import org.eclipse.cdt.debug.mi.core.output.MIResult;
import org.eclipse.cdt.debug.mi.core.output.MIResultRecord;
import org.eclipse.cdt.debug.mi.core.output.MITuple;
import org.eclipse.cdt.debug.mi.core.output.MIValue;
/**
* *stopped
*
*/
public class MIStoppedEvent extends MIEvent {
public MIStoppedEvent() {
}
}

View file

@ -17,7 +17,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIValue;
* *stopped,reason="watchpoint-trigger",wpt={number="2",exp="i"},value={old="0",new="1"},thread-id="0",frame={addr="0x08048534",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff18c"}],file="hello.c",line="10"}
*
*/
public class MIWatchpointEvent extends MIEvent {
public class MIWatchpointEvent extends MIStoppedEvent {
int number;
String exp = "";