Go to the documentation of this file.
50 #include "tce_config.h"
67 "outputfile",
"Name of the output file.",
"o");
71 "linenumbers",
"Print line numbers",
"n");
75 "flat",
"The instructions only with file line numbers "
76 "matching instruction indices",
"F");
80 "stdout",
"Print to standard output",
"s");
109 std::cout <<
"tcedisasm - OpenASIP TTA parallel disassembler "
118 int main(
int argc,
char *argv[]) {
127 std::cerr <<
"Error: Illegal commandline: "
135 std::cerr <<
"Error: Illegal number of parameters." << endl << endl;
188 std::ostream* output = &std::cout;
192 options.outputFile() : inputFileName +
".S";
193 if (!
options.printToStdout()) {
199 std::fstream::trunc | std::fstream::out);
204 std::fstream::trunc | std::fstream::out);
205 if (file.is_open()) {
215 *output <<
"CODE " << first <<
" ;" << endl << endl;
222 std::cerr <<
"Disassebly failed because of exception: " <<
227 for (
int i = 0; i <
program->dataMemoryCount(); i++) {
234 *output <<
"DATA " << aSpace.
name() <<
" "
243 std::map<Word, const TTAProgram::DataDefinition*> definitions;
249 std::map<Word, const TTAProgram::DataDefinition*>::iterator iter =
252 for (; iter != definitions.end(); iter++) {
254 *output << endl <<
"DA " << std::dec << def->
size();
256 for (
int mau = 0; mau < def->
size(); mau++) {
257 *output << endl <<
"1:0x" << std::hex << def->
MAU(mau);
260 *output <<
" ;" << endl;
268 for (TTAProgram::Program::InstructionVector::const_iterator i =
269 instr.begin(); i != instr.end(); ++i) {
virtual void printHelp() const
virtual TCEString name() const
void setSourceFile(const std::string &fileName)
virtual Address startAddress() const
static std::string outputFileName(const std::string &adfFile)
TTAMachine::Machine * machine
the architecture definition of the estimated processor
virtual Word startAddress() const
virtual int numberOfArguments() const
const TTAMachine::AddressSpace & addressSpace() const
static UniversalMachine & instance()
int dataDefinitionCount() const
virtual bool isFlagOn() const
std::vector< Instruction * > InstructionVector
Vector for instructions.
static bool fileIsCreatable(const std::string fileName)
virtual ~DisasmCmdLineOptions()
void addOption(CmdLineOptionParser *opt)
static bool fileIsWritable(const std::string fileName)
virtual bool isInitialized() const
InstructionAddress location() const
int main(int argc, char *argv[])
static bool createFile(const std::string &file)
std::string errorMessage() const
void parse(char *argv[], int argc)
static MachInfoCmdLineOptions options
virtual std::string String(int index=0) const
void printVersion() const
static std::string disassemble(const TTAProgram::Move &move)
static bool fileExists(const std::string fileName)
DataDefinition & dataDefinition(Address address) const
TTAMachine::Machine * readMachine()
find Finds info of the inner loops in the program
CmdLineOptionParser * findOption(std::string name) const
virtual std::string argument(int index) const
static std::string TCEVersionString()
static Binary * readBinary(BinaryStream &stream)
virtual MinimumAddressableUnit MAU(int index) const