mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
2005-04-28 Alain Magloire
Added command -gdb-show endian * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java * mi/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java + mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowEndian.java - mi/org/eclipse/cdt/debug/mi/core/command/MIShowEndian.java + mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowEndianInfo.java - mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowEndian.java
This commit is contained in:
parent
ec99d51b38
commit
3c46b1d4bc
5 changed files with 31 additions and 18 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2005-04-28 Alain Magloire
|
||||||
|
Added command -gdb-show endian
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
|
||||||
|
* mi/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
|
||||||
|
+ mi/org/eclipse/cdt/debug/mi/core/command/MIGDBShowEndian.java
|
||||||
|
- mi/org/eclipse/cdt/debug/mi/core/command/MIShowEndian.java
|
||||||
|
+ mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowEndianInfo.java
|
||||||
|
- mi/org/eclipse/cdt/debug/mi/core/output/MIGDBShowEndian.java
|
||||||
|
|
||||||
2005-04-27 Alain Magloire
|
2005-04-27 Alain Magloire
|
||||||
Changes in the CDI interface
|
Changes in the CDI interface
|
||||||
* cdi/org/eclipse/cdt/debug/core/cdi/model/BreakpointManager.java
|
* cdi/org/eclipse/cdt/debug/core/cdi/model/BreakpointManager.java
|
||||||
|
|
|
@ -65,7 +65,7 @@ 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.command.MIExecUntil;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIInfoThreads;
|
import org.eclipse.cdt.debug.mi.core.command.MIInfoThreads;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIJump;
|
import org.eclipse.cdt.debug.mi.core.command.MIJump;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIShowEndian;
|
import org.eclipse.cdt.debug.mi.core.command.MIGDBShowEndian;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MISignal;
|
import org.eclipse.cdt.debug.mi.core.command.MISignal;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MITargetDetach;
|
import org.eclipse.cdt.debug.mi.core.command.MITargetDetach;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.MIThreadSelect;
|
import org.eclipse.cdt.debug.mi.core.command.MIThreadSelect;
|
||||||
|
@ -76,7 +76,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIDataEvaluateExpressionInfo;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIFrame;
|
import org.eclipse.cdt.debug.mi.core.output.MIFrame;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIInfoThreadsInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIInfoThreadsInfo;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIShowEndianInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowEndianInfo;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIThreadSelectInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIThreadSelectInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -346,10 +346,10 @@ public class Target extends SessionObject implements ICDITarget {
|
||||||
public boolean isLittleEndian() throws CDIException {
|
public boolean isLittleEndian() throws CDIException {
|
||||||
if (fEndian == null) {
|
if (fEndian == null) {
|
||||||
CommandFactory factory = miSession.getCommandFactory();
|
CommandFactory factory = miSession.getCommandFactory();
|
||||||
MIShowEndian endian = new MIShowEndian();
|
MIGDBShowEndian endian = factory.createMIGDBShowEndian();
|
||||||
try {
|
try {
|
||||||
miSession.postCommand(endian);
|
miSession.postCommand(endian);
|
||||||
MIShowEndianInfo info = endian.getMIShowEndianInfo();
|
MIGDBShowEndianInfo info = endian.getMIShowEndianInfo();
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
|
throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,6 +229,10 @@ public class CommandFactory {
|
||||||
return new MIGDBShowAddressSize();
|
return new MIGDBShowAddressSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MIGDBShowEndian createMIGDBShowEndian() {
|
||||||
|
return new MIGDBShowEndian();
|
||||||
|
}
|
||||||
|
|
||||||
public MIStackInfoDepth createMIStackInfoDepth() {
|
public MIStackInfoDepth createMIStackInfoDepth() {
|
||||||
return new MIStackInfoDepth();
|
return new MIStackInfoDepth();
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,23 +14,23 @@ package org.eclipse.cdt.debug.mi.core.command;
|
||||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
|
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIShowEndianInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowEndianInfo;
|
||||||
|
|
||||||
public class MIShowEndian extends CLICommand {
|
public class MIGDBShowEndian extends MIGDBShow {
|
||||||
|
|
||||||
public MIShowEndian() {
|
public MIGDBShowEndian() {
|
||||||
super("show endian"); //$NON-NLS-1$
|
super(new String[] {"endian"}); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public MIShowEndianInfo getMIShowEndianInfo() throws MIException {
|
public MIGDBShowEndianInfo getMIShowEndianInfo() throws MIException {
|
||||||
return (MIShowEndianInfo)getMIInfo();
|
return (MIGDBShowEndianInfo)getMIInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MIInfo getMIInfo() throws MIException {
|
public MIInfo getMIInfo() throws MIException {
|
||||||
MIInfo info = null;
|
MIInfo info = null;
|
||||||
MIOutput out = getMIOutput();
|
MIOutput out = getMIOutput();
|
||||||
if (out != null) {
|
if (out != null) {
|
||||||
info = new MIShowEndianInfo(out);
|
info = new MIGDBShowEndianInfo(out);
|
||||||
if (info.isError()) {
|
if (info.isError()) {
|
||||||
throwMIException(info, out);
|
throwMIException(info, out);
|
||||||
}
|
}
|
|
@ -12,17 +12,17 @@
|
||||||
package org.eclipse.cdt.debug.mi.core.output;
|
package org.eclipse.cdt.debug.mi.core.output;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* show endian
|
* -gdb-show endian
|
||||||
&"show endian\n"
|
* ~"The target endianness is set automatically (currently little endian)\n"
|
||||||
~"The target endianness is set automatically (currently little endian)\n"
|
* ^done
|
||||||
^done
|
* &"show endian\n"
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MIShowEndianInfo extends MIInfo {
|
public class MIGDBShowEndianInfo extends MIInfo {
|
||||||
|
|
||||||
boolean littleEndian;
|
boolean littleEndian;
|
||||||
|
|
||||||
public MIShowEndianInfo(MIOutput out) {
|
public MIGDBShowEndianInfo(MIOutput out) {
|
||||||
super(out);
|
super(out);
|
||||||
parse();
|
parse();
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ public class MIShowEndianInfo extends MIInfo {
|
||||||
if (oobs[i] instanceof MIConsoleStreamOutput) {
|
if (oobs[i] instanceof MIConsoleStreamOutput) {
|
||||||
MIStreamRecord cons = (MIStreamRecord) oobs[i];
|
MIStreamRecord cons = (MIStreamRecord) oobs[i];
|
||||||
String str = cons.getString();
|
String str = cons.getString();
|
||||||
// We are interested in the signal info
|
// We are interested in the stream info
|
||||||
parseLine(str);
|
parseLine(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue