Initial commit of new StringManager

This commit is contained in:
caheckman 2020-04-17 18:37:40 -04:00
parent 6a15520aa5
commit 0eb48e441f
19 changed files with 740 additions and 236 deletions

View file

@ -6409,14 +6409,8 @@ int4 RulePtrsubCharConstant::applyOp(PcodeOp *op,Funcdata &data)
if (!scope->isReadOnly(symaddr,1,op->getAddr()))
return 0;
// Check if data at the address looks like a string
uint1 buffer[128];
try {
data.getArch()->loader->loadFill(buffer,128,symaddr);
} catch(DataUnavailError &err) {
if (!data.getArch()->stringManager->isString(symaddr, basetype))
return 0;
}
bool isstring = data.getArch()->print->isCharacterConstant(buffer,128,basetype->getSize());
if (!isstring) return 0;
// If we reach here, the PTRSUB should be converted to a (COPY of a) pointer constant.
bool removeCopy = false;