mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 16:56:04 +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
|
||||
Changes in the CDI interface
|
||||
* 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.MIInfoThreads;
|
||||
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.MITargetDetach;
|
||||
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.MIInfo;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -346,10 +346,10 @@ public class Target extends SessionObject implements ICDITarget {
|
|||
public boolean isLittleEndian() throws CDIException {
|
||||
if (fEndian == null) {
|
||||
CommandFactory factory = miSession.getCommandFactory();
|
||||
MIShowEndian endian = new MIShowEndian();
|
||||
MIGDBShowEndian endian = factory.createMIGDBShowEndian();
|
||||
try {
|
||||
miSession.postCommand(endian);
|
||||
MIShowEndianInfo info = endian.getMIShowEndianInfo();
|
||||
MIGDBShowEndianInfo info = endian.getMIShowEndianInfo();
|
||||
if (info == null) {
|
||||
throw new CDIException(CdiResources.getString("cdi.model.Target.Target_not_responding")); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -229,6 +229,10 @@ public class CommandFactory {
|
|||
return new MIGDBShowAddressSize();
|
||||
}
|
||||
|
||||
public MIGDBShowEndian createMIGDBShowEndian() {
|
||||
return new MIGDBShowEndian();
|
||||
}
|
||||
|
||||
public MIStackInfoDepth createMIStackInfoDepth() {
|
||||
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.output.MIInfo;
|
||||
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() {
|
||||
super("show endian"); //$NON-NLS-1$
|
||||
public MIGDBShowEndian() {
|
||||
super(new String[] {"endian"}); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public MIShowEndianInfo getMIShowEndianInfo() throws MIException {
|
||||
return (MIShowEndianInfo)getMIInfo();
|
||||
public MIGDBShowEndianInfo getMIShowEndianInfo() throws MIException {
|
||||
return (MIGDBShowEndianInfo)getMIInfo();
|
||||
}
|
||||
|
||||
public MIInfo getMIInfo() throws MIException {
|
||||
MIInfo info = null;
|
||||
MIOutput out = getMIOutput();
|
||||
if (out != null) {
|
||||
info = new MIShowEndianInfo(out);
|
||||
info = new MIGDBShowEndianInfo(out);
|
||||
if (info.isError()) {
|
||||
throwMIException(info, out);
|
||||
}
|
|
@ -12,17 +12,17 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* show endian
|
||||
&"show endian\n"
|
||||
~"The target endianness is set automatically (currently little endian)\n"
|
||||
^done
|
||||
* -gdb-show endian
|
||||
* ~"The target endianness is set automatically (currently little endian)\n"
|
||||
* ^done
|
||||
* &"show endian\n"
|
||||
*
|
||||
*/
|
||||
public class MIShowEndianInfo extends MIInfo {
|
||||
public class MIGDBShowEndianInfo extends MIInfo {
|
||||
|
||||
boolean littleEndian;
|
||||
|
||||
public MIShowEndianInfo(MIOutput out) {
|
||||
public MIGDBShowEndianInfo(MIOutput out) {
|
||||
super(out);
|
||||
parse();
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public class MIShowEndianInfo extends MIInfo {
|
|||
if (oobs[i] instanceof MIConsoleStreamOutput) {
|
||||
MIStreamRecord cons = (MIStreamRecord) oobs[i];
|
||||
String str = cons.getString();
|
||||
// We are interested in the signal info
|
||||
// We are interested in the stream info
|
||||
parseLine(str);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue