mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Cleanup.
This commit is contained in:
parent
ca76e63e63
commit
f8dc875327
15 changed files with 34 additions and 17 deletions
|
@ -1,3 +1,21 @@
|
||||||
|
2003-11-26 Mikhail Khodjaiants
|
||||||
|
Cleanup.
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/GDBServerDebugger.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/cdi/event/ResumedEvent.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/command/MIBreakAfter.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/event/MIFunctionFinishedEvent.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/event/MIInferiorSignalExitEvent.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/event/MISignalEvent.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/event/MIWatchpointTriggerEvent.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/output/MIGDBShowDirectoriesInfo.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/output/MIGDBShowSolibSearchPathInfo.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/output/MIList.java
|
||||||
|
|
||||||
2003-11-25 Alain Magloire
|
2003-11-25 Alain Magloire
|
||||||
|
|
||||||
Process the suspend event even if there is not threads
|
Process the suspend event even if there is not threads
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class CygwinGDBDebugger extends GDBDebugger {
|
||||||
if (p.size() > 0) {
|
if (p.size() > 0) {
|
||||||
String[] oldPaths = manager.getSharedLibraryPaths();
|
String[] oldPaths = manager.getSharedLibraryPaths();
|
||||||
String[] paths = new String[oldPaths.length + p.size()];
|
String[] paths = new String[oldPaths.length + p.size()];
|
||||||
System.arraycopy((String[]) p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
System.arraycopy(p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
||||||
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
||||||
manager.setSharedLibraryPaths(paths);
|
manager.setSharedLibraryPaths(paths);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class GDBDebugger implements ICDebugger {
|
||||||
if (p.size() > 0) {
|
if (p.size() > 0) {
|
||||||
String[] oldPaths = manager.getSharedLibraryPaths();
|
String[] oldPaths = manager.getSharedLibraryPaths();
|
||||||
String[] paths = new String[oldPaths.length + p.size()];
|
String[] paths = new String[oldPaths.length + p.size()];
|
||||||
System.arraycopy((String[])p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
System.arraycopy(p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
||||||
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
||||||
manager.setSharedLibraryPaths(paths);
|
manager.setSharedLibraryPaths(paths);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class GDBServerDebugger implements ICDebugger {
|
||||||
Session session = null;
|
Session session = null;
|
||||||
boolean failed = false;
|
boolean failed = false;
|
||||||
try {
|
try {
|
||||||
String gdb = config.getAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb");
|
||||||
File cwd = exe.getProject().getLocation().toFile();
|
File cwd = exe.getProject().getLocation().toFile();
|
||||||
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit");
|
||||||
if (config.getAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, false)) {
|
if (config.getAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, false)) {
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
}
|
}
|
||||||
|
|
||||||
public Breakpoint getBreakpoint(int number) {
|
public Breakpoint getBreakpoint(int number) {
|
||||||
Breakpoint[] bkpts = (Breakpoint[]) breakList.toArray(new Breakpoint[0]);;
|
Breakpoint[] bkpts = (Breakpoint[]) breakList.toArray(new Breakpoint[0]);
|
||||||
for (int i = 0; i < bkpts.length; i++) {
|
for (int i = 0; i < bkpts.length; i++) {
|
||||||
MIBreakpoint miBreak = bkpts[i].getMIBreakpoint();
|
MIBreakpoint miBreak = bkpts[i].getMIBreakpoint();
|
||||||
if (miBreak.getNumber() == number) {
|
if (miBreak.getNumber() == number) {
|
||||||
|
@ -126,7 +126,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteBreakpoint (int no) {
|
public void deleteBreakpoint (int no) {
|
||||||
Breakpoint[] points = (Breakpoint[]) breakList.toArray(new Breakpoint[0]);;
|
Breakpoint[] points = (Breakpoint[]) breakList.toArray(new Breakpoint[0]);
|
||||||
for (int i = 0; i < points.length; i++) {
|
for (int i = 0; i < points.length; i++) {
|
||||||
if (points[i].getMIBreakpoint().getNumber() == no) {
|
if (points[i].getMIBreakpoint().getNumber() == no) {
|
||||||
breakList.remove(points[i]);
|
breakList.remove(points[i]);
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class ResumedEvent implements ICDIResumedEvent {
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent#getType()
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent#getType()
|
||||||
*/
|
*/
|
||||||
public int getType() {
|
public int getType() {
|
||||||
MIRunningEvent running = (MIRunningEvent)event;
|
MIRunningEvent running = event;
|
||||||
int type = running.getType();
|
int type = running.getType();
|
||||||
int cdiType = 0;
|
int cdiType = 0;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
|
@ -292,7 +292,7 @@ public class Target implements ICDITarget {
|
||||||
Thread th = null;
|
Thread th = null;
|
||||||
if (currentThreads != null) {
|
if (currentThreads != null) {
|
||||||
for (int i = 0; i < currentThreads.length; i++) {
|
for (int i = 0; i < currentThreads.length; i++) {
|
||||||
Thread cthread = (Thread)currentThreads[i];
|
Thread cthread = currentThreads[i];
|
||||||
if (cthread.getId() == tid) {
|
if (cthread.getId() == tid) {
|
||||||
th = cthread;
|
th = cthread;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -22,7 +22,7 @@ public class MIBreakAfter extends MICommand
|
||||||
{
|
{
|
||||||
public MIBreakAfter(int brknum, int count) {
|
public MIBreakAfter(int brknum, int count) {
|
||||||
super("-break-after",new String[]{Integer.toString(brknum),
|
super("-break-after",new String[]{Integer.toString(brknum),
|
||||||
Integer.toString(count)});;
|
Integer.toString(count)});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class MIFunctionFinishedEvent extends MIStoppedEvent {
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
buffer.append("gdb-result-var=" + gdbResult + "\n");;
|
buffer.append("gdb-result-var=" + gdbResult + "\n");
|
||||||
buffer.append("return-value=" + returnValue + "\n");
|
buffer.append("return-value=" + returnValue + "\n");
|
||||||
buffer.append("thread-id=").append(getThreadId()).append('\n');
|
buffer.append("thread-id=").append(getThreadId()).append('\n');
|
||||||
MIFrame f = getFrame();
|
MIFrame f = getFrame();
|
||||||
|
|
|
@ -47,8 +47,8 @@ public class MIInferiorSignalExitEvent extends MIDestroyedEvent {
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
buffer.append("signal-name=" + sigName + "\n");;
|
buffer.append("signal-name=" + sigName + "\n");
|
||||||
buffer.append("signal-meaning=" + sigMeaning + "\n");;
|
buffer.append("signal-meaning=" + sigMeaning + "\n");
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@ public class MISignalEvent extends MIStoppedEvent {
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
buffer.append("signal-name=" + sigName + "\n");;
|
buffer.append("signal-name=" + sigName + "\n");
|
||||||
buffer.append("signal-meaning=" + sigMeaning + "\n");;
|
buffer.append("signal-meaning=" + sigMeaning + "\n");
|
||||||
buffer.append("thread-id=").append(getThreadId()).append('\n');
|
buffer.append("thread-id=").append(getThreadId()).append('\n');
|
||||||
MIFrame f = getFrame();
|
MIFrame f = getFrame();
|
||||||
if (f != null) {
|
if (f != null) {
|
||||||
|
|
|
@ -55,7 +55,6 @@ public class MIWatchpointTriggerEvent extends MIStoppedEvent {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
buffer.append("number=").append(number).append('\n');
|
buffer.append("number=").append(number).append('\n');
|
||||||
buffer.append("expression=" + exp + "\n");
|
buffer.append("expression=" + exp + "\n");
|
||||||
;
|
|
||||||
buffer.append("old=" + oldValue + "\n");
|
buffer.append("old=" + oldValue + "\n");
|
||||||
buffer.append("new=" + newValue + "\n");
|
buffer.append("new=" + newValue + "\n");
|
||||||
buffer.append("thread-id=").append(getThreadId()).append('\n');
|
buffer.append("thread-id=").append(getThreadId()).append('\n');
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class MIGDBShowDirectoriesInfo extends MIInfo {
|
||||||
int count = st.countTokens();
|
int count = st.countTokens();
|
||||||
dirs = new String[count];
|
dirs = new String[count];
|
||||||
for (int i = 0; st.hasMoreTokens() && i < count; i++) {
|
for (int i = 0; st.hasMoreTokens() && i < count; i++) {
|
||||||
dirs[i] = (String)st.nextToken();
|
dirs[i] = st.nextToken();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class MIGDBShowSolibSearchPathInfo extends MIGDBShowInfo {
|
||||||
int count = st.countTokens();
|
int count = st.countTokens();
|
||||||
dirs = new String[count];
|
dirs = new String[count];
|
||||||
for (int i = 0; st.hasMoreTokens() && i < count; i++) {
|
for (int i = 0; st.hasMoreTokens() && i < count; i++) {
|
||||||
dirs[i] = (String)st.nextToken();
|
dirs[i] = st.nextToken();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class MIList extends MIValue {
|
||||||
final static MIResult[] nullResults = new MIResult[0];
|
final static MIResult[] nullResults = new MIResult[0];
|
||||||
final static MIValue[] nullValues = new MIValue[0];
|
final static MIValue[] nullValues = new MIValue[0];
|
||||||
|
|
||||||
MIResult[] results = nullResults;;
|
MIResult[] results = nullResults;
|
||||||
MIValue[] values = nullValues;
|
MIValue[] values = nullValues;
|
||||||
|
|
||||||
public MIResult[] getMIResults() {
|
public MIResult[] getMIResults() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue