summaryrefslogtreecommitdiffstats
path: root/src/coff/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/coff/base')
-rw-r--r--src/coff/base/cdb_parser.cpp6
-rw-r--r--src/coff/base/coff.cpp8
-rw-r--r--src/coff/base/coff_archive.cpp14
-rw-r--r--src/coff/base/coff_object.cpp44
-rw-r--r--src/coff/base/text_coff.cpp4
5 files changed, 38 insertions, 38 deletions
diff --git a/src/coff/base/cdb_parser.cpp b/src/coff/base/cdb_parser.cpp
index 87d9d97..eb7495b 100644
--- a/src/coff/base/cdb_parser.cpp
+++ b/src/coff/base/cdb_parser.cpp
@@ -101,7 +101,7 @@ CDB::Object::~Object()
void CDB::Object::log(Log::LineType type, const TQString &message)
{
- _log.log(type, message + " " + i18n("at line #%1, column #%2").arg(_line+1).arg(_col+1));
+ _log.log(type, message + " " + i18n("at line #%1, column #%2").tqarg(_line+1).tqarg(_col+1));
}
void CDB::Object::logMalformed(const TQString &detail)
@@ -125,7 +125,7 @@ bool CDB::Object::readAndCheckChar(char c)
char r;
if ( !readChar(r) ) return false;
if ( r!=c ) {
- logMalformed(i18n("was expecting '%1'").arg(c));
+ logMalformed(i18n("was expecting '%1'").tqarg(c));
return false;
}
return true;
@@ -197,7 +197,7 @@ bool CDB::Object::readBool(bool &b)
if ( c=='0' ) b = false;
else if ( c=='1' ) b = true;
else {
- logMalformed(i18n("was expecting a bool ('%1')").arg(c));
+ logMalformed(i18n("was expecting a bool ('%1')").tqarg(c));
return false;
}
return true;
diff --git a/src/coff/base/coff.cpp b/src/coff/base/coff.cpp
index e85b53d..83100a4 100644
--- a/src/coff/base/coff.cpp
+++ b/src/coff/base/coff.cpp
@@ -52,7 +52,7 @@ CoffType Coff::identify(const TQByteArray &data, uint &offset, Log::Base &log, F
}
}
if ( !getULong(data, offset, 2, log, magic) ) return CoffType::Nb_Types;
- log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").arg(toHexLabel(magic, 4)));
+ log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").tqarg(toHexLabel(magic, 4)));
format = Format::Nb_Types;
FOR_EACH(Format, f) if ( magic==f.data().magic ) format = f;
return CoffType::Object;
@@ -64,7 +64,7 @@ bool Coff::getULong(const TQByteArray &data, uint &offset, uint nbBytes, Log::Ba
bool ok;
v = ::getULong(data, offset, nbBytes, &ok);
if ( !ok ) {
- log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").arg(offset).arg(nbBytes).arg(data.count()));
+ log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").tqarg(offset).tqarg(nbBytes).tqarg(data.count()));
return false;
}
offset += nbBytes;
@@ -74,7 +74,7 @@ bool Coff::getULong(const TQByteArray &data, uint &offset, uint nbBytes, Log::Ba
bool Coff::getString(const TQByteArray &data, uint &offset, uint nbChars, Log::Base &log, TQString &name)
{
if ( !checkAvailable(data, offset, nbChars) ) {
- log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").arg(offset).arg(nbChars).arg(data.count()));
+ log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").tqarg(offset).tqarg(nbChars).tqarg(data.count()));
return false;
}
name = TQString::fromAscii(data.data()+offset, nbChars);
@@ -90,7 +90,7 @@ bool Coff::Base::initParse(CoffType type, TQByteArray &data, uint &offset, Log::
data = file.readAll();
if ( log.hasError() ) return false;
if ( identify(data, offset, log, _format, _magic)!=type ) {
- log.log(Log::LineType::Error, i18n("Could not recognize file (magic number is %1).").arg(toHexLabel(_magic, 4)));
+ log.log(Log::LineType::Error, i18n("Could not recognize file (magic number is %1).").tqarg(toHexLabel(_magic, 4)));
return false;
}
return true;
diff --git a/src/coff/base/coff_archive.cpp b/src/coff/base/coff_archive.cpp
index e7d4c14..abf48af 100644
--- a/src/coff/base/coff_archive.cpp
+++ b/src/coff/base/coff_archive.cpp
@@ -16,7 +16,7 @@ Coff::Member::Member(const TQByteArray &data, uint &offset, Log::Base &log)
if ( !getString(data, offset, 256, log, s) ) return;
int i = s.find('/');
if ( i==-1 ) {
- log.log(Log::LineType::Error, i18n("Member name not terminated by '/' (\"%1\").").arg(s));
+ log.log(Log::LineType::Error, i18n("Member name not terminated by '/' (\"%1\").").tqarg(s));
return;
}
_name = s.mid(0, i);
@@ -24,20 +24,20 @@ Coff::Member::Member(const TQByteArray &data, uint &offset, Log::Base &log)
if ( !getString(data, offset, 10, log, s) ) return;
i = s.find('l');
if ( i==-1 ) {
- log.log(Log::LineType::Error, i18n("File size not terminated by 'l' (\"%1\").").arg(s));
+ log.log(Log::LineType::Error, i18n("File size not terminated by 'l' (\"%1\").").tqarg(s));
return;
}
bool ok;
_nbBytes = s.mid(0, i).toUInt(&ok);
if ( !ok ) {
- log.log(Log::LineType::Error, i18n("Wrong format for file size \"%1\".").arg(s));
+ log.log(Log::LineType::Error, i18n("Wrong format for file size \"%1\".").tqarg(s));
return;
}
TQ_UINT32 v;
if ( !getULong(data, offset, 2, log, v) ) return;
- log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").arg(toHexLabel(v, 4)));
+ log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").tqarg(toHexLabel(v, 4)));
// if ( v!=0x600A ) {
-// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").arg(toHexLabel(v, 4)));
+// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").tqarg(toHexLabel(v, 4)));
// return;
// }
offset += _nbBytes;
@@ -89,7 +89,7 @@ bool Coff::Archive::readSymbols(const TQByteArray &data, uint offset, Log::Base
TQ_UINT32 start;
if ( !getULong(data, offset, 4, log, start) ) return false;
if ( !_offsets.contains(start) ) {
- log.log(Log::LineType::Error, i18n("Unknown file member offset: %1").arg(toHexLabel(start, 8)));
+ log.log(Log::LineType::Error, i18n("Unknown file member offset: %1").tqarg(toHexLabel(start, 8)));
return false;
}
members[i] = _offsets[start];
@@ -115,7 +115,7 @@ Log::KeyList Coff::Archive::membersInformation() const
Log::KeyList keys(i18n("File Members:"));
TQMap<TQString, Member *>::const_iterator it;
for (it=members().begin(); it!=members().end(); ++it)
- keys.append(it.key(), i18n("size: %1 bytes").arg(it.data()->nbBytes()));
+ keys.append(it.key(), i18n("size: %1 bytes").tqarg(it.data()->nbBytes()));
return keys;
}
diff --git a/src/coff/base/coff_object.cpp b/src/coff/base/coff_object.cpp
index ee49a95..6a9a182 100644
--- a/src/coff/base/coff_object.cpp
+++ b/src/coff/base/coff_object.cpp
@@ -212,7 +212,7 @@ Coff::Symbol::Symbol(const Object &object, const TQByteArray &data, uint start,
else if ( _name==".ident" ) auxType = AuxSymbolType::Identifier;
else if ( _sclass==SymbolClass::Filename ) auxType = AuxSymbolType::File;
else if ( _sclass==SymbolClass::Section ) auxType = AuxSymbolType::Section;
- if ( auxType!=AuxSymbolType::Nb_Types && nbAux==0 ) log.log(Log::LineType::Warning, i18n("Symbol without needed auxilliary symbol (type=%1)").arg(auxType.type()));
+ if ( auxType!=AuxSymbolType::Nb_Types && nbAux==0 ) log.log(Log::LineType::Warning, i18n("Symbol without needed auxilliary symbol (type=%1)").tqarg(auxType.type()));
Q_ASSERT( (offset-start)==object.size(SymbolSize) );
_aux.resize(nbAux);
for (uint i=0; i<nbAux; i++) {
@@ -245,14 +245,14 @@ Coff::Relocation::Relocation(const Object &object, const Section &section,
TQ_UINT32 v;
if ( !getULong(data, offset, 4, log, v) ) return;
_address = v;
- if ( _address>section.size() ) log.log(Log::LineType::Warning, i18n("Relocation address beyong section size: %1/%2").arg(v).arg(section.size()));
+ if ( _address>section.size() ) log.log(Log::LineType::Warning, i18n("Relocation address beyong section size: %1/%2").tqarg(v).tqarg(section.size()));
if ( !getULong(data, offset, 4, log, v) ) return;
if ( v>=object.nbSymbols() ) {
- log.log(Log::LineType::Error, i18n("Relocation has unknown symbol: %1").arg(v));
+ log.log(Log::LineType::Error, i18n("Relocation has unknown symbol: %1").tqarg(v));
return;
}
if ( object.symbol(v)->isAuxSymbol() ) {
- log.log(Log::LineType::Error, i18n("Relocation is an auxiliary symbol: %1").arg(v));
+ log.log(Log::LineType::Error, i18n("Relocation is an auxiliary symbol: %1").tqarg(v));
return;
}
_symbol = static_cast<const Symbol *>(object.symbol(v));
@@ -283,11 +283,11 @@ Coff::CodeLine::CodeLine(const Object &object, const Section &section,
//qDebug("code line %i: %s", _line, toHexLabel(_address, nbChars(_address)).latin1());
} else {
if ( tmp>=object.nbSymbols() ) {
- log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").arg(tmp));
+ log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").tqarg(tmp));
return;
}
if ( object.symbol(tmp)->isAuxSymbol() ) {
- log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").arg(tmp));
+ log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").tqarg(tmp));
return;
}
_symbol = static_cast<const Symbol *>(object.symbol(tmp));
@@ -296,11 +296,11 @@ Coff::CodeLine::CodeLine(const Object &object, const Section &section,
}
} else {
if ( tmp>=object.nbSymbols() ) {
- log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").arg(tmp));
+ log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").tqarg(tmp));
return;
}
if ( object.symbol(tmp)->isAuxSymbol() ) {
- log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").arg(tmp));
+ log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").tqarg(tmp));
return;
}
_symbol = static_cast<const Symbol *>(object.symbol(tmp));
@@ -318,7 +318,7 @@ Coff::CodeLine::CodeLine(const Object &object, const Section &section,
}
// if ( _symbol && _symbol->_class!=Symbol::CFile )
// log.log(Log::LineType::Warning, i18n("Line without file symbol associated (%1:%2 %3).")
-// .arg(_section._name).arg(toHexLabel(_address, nbChars(_address))).arg(_symbol->_class));
+// .tqarg(_section._name).tqarg(toHexLabel(_address, nbChars(_address))).tqarg(_symbol->_class));
}
//----------------------------------------------------------------------------
@@ -343,7 +343,7 @@ Coff::Section::Section(const Device::Data &device, const Object &object,
_address = v;
if ( !getULong(data, offset, 4, log, v) ) return;
//if ( _address!=v ) log.log(Log::LineType::Warning, i18n("Virtual address (%1) does not match physical address (%2) in %3.")
- // .arg(toHexLabel(v, 4)).arg(toHexLabel(_address, 4)).arg(_name));
+ // .tqarg(toHexLabel(v, 4)).tqarg(toHexLabel(_address, 4)).tqarg(_name));
if ( !getULong(data, offset, 4, log, v) ) return;
_size = v;
if ( !getULong(data, offset, 4, log, v) ) return;
@@ -451,25 +451,25 @@ bool Coff::Object::parse(Log::Base &log)
uint offset = 0;
if ( !initParse(CoffType::Object, data, offset, log) ) return false;
if ( _format==Format::Nb_Types ) {
- log.log(Log::LineType::Error, i18n("COFF format not supported: magic number is %1.").arg(toHexLabel(_magic, 4)));
+ log.log(Log::LineType::Error, i18n("COFF format not supported: magic number is %1.").tqarg(toHexLabel(_magic, 4)));
return false;
}
- log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").arg(toHexLabel(_magic, 4)));
+ log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").tqarg(toHexLabel(_magic, 4)));
if ( !parseHeader(data, offset, log) ) return false;
// optionnal header
Q_ASSERT( offset==size(HeaderSize) );
if ( !getULong(data, offset, 2, log, _optHeaderMagic) ) return false;
- log.log(Log::DebugLevel::Extra, TQString("COFF optionnal header format: %1").arg(toHexLabel(_optHeaderMagic, 4)));
+ log.log(Log::DebugLevel::Extra, TQString("COFF optionnal header format: %1").tqarg(toHexLabel(_optHeaderMagic, 4)));
_optHeaderFormat = OptHeaderFormat::Nb_Types;
uint i = 0;
for (; OPT_HEADER_DATA[i].optHeaderFormat!=OptHeaderFormat::Nb_Types; i++) if ( _optHeaderMagic==OPT_HEADER_DATA[i].magic ) break;
_optHeaderFormat = OPT_HEADER_DATA[i].optHeaderFormat;
if ( _optHeaderFormat==OptHeaderFormat::Nb_Types ) {
- log.log(Log::LineType::Warning, i18n("Optional header format not supported: magic number is %1.").arg(toHexLabel(_optHeaderMagic, 4)));
+ log.log(Log::LineType::Warning, i18n("Optional header format not supported: magic number is %1.").tqarg(toHexLabel(_optHeaderMagic, 4)));
offset += size(OptHeaderSize)-2;
} else if ( !OPT_HEADER_DATA[i].parsed ) {
- log.log(Log::DebugLevel::Normal, TQString("Optional header not parsed: magic number is %1.").arg(toHexLabel(_optHeaderMagic, 4)));
+ log.log(Log::DebugLevel::Normal, TQString("Optional header not parsed: magic number is %1.").tqarg(toHexLabel(_optHeaderMagic, 4)));
offset += size(OptHeaderSize)-2;
} else if ( !parseOptionnalHeader(data, offset, log) ) return false;
@@ -535,7 +535,7 @@ bool Coff::Object::parseHeader(const TQByteArray &data, uint &offset, Log::Base
_nbSymbols = v;
if ( !getULong(data, offset, 2, log, v) ) return false;
if ( v!=size(OptHeaderSize) ) {
- log.log(Log::LineType::Error, i18n("Optionnal header size is not %1: %2").arg(size(OptHeaderSize)).arg(v));
+ log.log(Log::LineType::Error, i18n("Optionnal header size is not %1: %2").tqarg(size(OptHeaderSize)).tqarg(v));
return false;
}
if ( !getULong(data, offset, 2, log, v) ) return false;
@@ -561,23 +561,23 @@ bool Coff::Object::parseOptionnalHeader(const TQByteArray &data, uint &offset, L
// #### at least for C18 compiler, it can be compiled for generic processor: in such case
// the pic type will be 18C452 in non-extended mode and 18F4620 for extended mode...
TQString name = Coff::findId(v);
- log.log(Log::DebugLevel::Normal, TQString("Device name: \"%1\"").arg(name));
+ log.log(Log::DebugLevel::Normal, TQString("Device name: \"%1\"").tqarg(name));
if ( name.isEmpty() ) {
- log.log(Log::DebugLevel::Normal, TQString("Unknown processor type: %1").arg(toHexLabel(v, 4)));
- log.log(Log::LineType::Error, i18n("Could not determine processor (%1).").arg(toHexLabel(v, 4)));
+ log.log(Log::DebugLevel::Normal, TQString("Unknown processor type: %1").tqarg(toHexLabel(v, 4)));
+ log.log(Log::LineType::Error, i18n("Could not determine processor (%1).").tqarg(toHexLabel(v, 4)));
return false;
} else if ( _device==0 ) _device = Device::lister().data(name);
- else if ( name!=_device->name() ) log.log(Log::DebugLevel::Normal, TQString("Different processor name: %1").arg(name));
+ else if ( name!=_device->name() ) log.log(Log::DebugLevel::Normal, TQString("Different processor name: %1").tqarg(name));
if ( !getULong(data, offset, 4, log, v) ) return false;
const Pic::Data *pdata = static_cast<const Pic::Data *>(_device);
if (pdata) {
uint nbBits = pdata->nbBitsWord(Pic::MemoryRangeType::Code) / pdata->addressIncrement(Pic::MemoryRangeType::Code);
- if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Rom width is not %1: %2").arg(nbBits).arg(v));
+ if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Rom width is not %1: %2").tqarg(nbBits).tqarg(v));
}
if ( !getULong(data, offset, 4, log, v) ) return false;
if (pdata) {
uint nbBits = pdata->registersData().nbBits();
- if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Ram width is not %1: %2").arg(nbBits).arg(v));
+ if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Ram width is not %1: %2").tqarg(nbBits).tqarg(v));
}
}
return true;
diff --git a/src/coff/base/text_coff.cpp b/src/coff/base/text_coff.cpp
index 1ddeb30..52dd503 100644
--- a/src/coff/base/text_coff.cpp
+++ b/src/coff/base/text_coff.cpp
@@ -249,12 +249,12 @@ TQString Coff::TextObject::disassembly() const
Log::KeyList Coff::TextObject::information() const
{
Log::KeyList keys;
- keys.append(i18n("Format:"), i18n("%1 (magic id: %2)").arg(format().label()).arg(toHexLabel(format().data().magic, 4)));
+ keys.append(i18n("Format:"), i18n("%1 (magic id: %2)").tqarg(format().label()).tqarg(toHexLabel(format().data().magic, 4)));
TQString name = (format()==Format::PIC30 || device()==0 ? "?" : device()->name());
keys.append(i18n("Device:"), name);
OptHeaderFormat ohf = optHeaderFormat();
TQString label = (ohf==OptHeaderFormat::Nb_Types ? i18n("Unknown") : ohf.label());
- keys.append(i18n("Option header:"), i18n("%1 (magic id: %2)").arg(label).arg(toHexLabel(optHeaderMagic(), 4)));
+ keys.append(i18n("Option header:"), i18n("%1 (magic id: %2)").tqarg(label).tqarg(toHexLabel(optHeaderMagic(), 4)));
keys.append(i18n("No. of sections:"), TQString::number(nbSections()));
keys.append(i18n("No. of symbols:"), TQString::number(nbSymbols()));
keys.append(i18n("No. of variables:"), TQString::number(variables().count()));