break;
case kDebugOffset:
id = (int) in.readUI32();
int lineno = (int) in.readUI32();
DebugModule module = (DebugModule) modules.get(id);
LineRecord lr = new LineRecord(lineno, module);
int offset = (int) in.readUI32();
if (module != null)
{
// not corrupted before we add the offset and offset add fails
boolean wasCorrupt = module.corrupt;
if (!module.addOffset(lr, offset) && !wasCorrupt)
handler.error(module.name+":"+lineno+" does not exist for offset "+offset+", module marked for exclusion from debugging");
handler.offset(offset, lr);
}
else
{
lineRecords.add(new Integer(id));
lineRecords.add(lr);
lineRecords.add(new Integer(offset));
}
break;
case kDebugBreakpoint:
handler.breakpoint((int) in.readUI32());
break;
case kDebugRegisters:
{
offset = (int)in.readUI32();
int size = in.readUI8();
RegisterRecord r = new RegisterRecord(offset, size);
for(int i=0; i<size; i++)
{
int nbr = in.readUI8();
String name = in.readString();
r.addRegister(nbr, name);
}
handler.registers(offset, r);
break;
}
case kDebugID:
FlashUUID uuid = new FlashUUID();
in.readFully(uuid.bytes);
handler.uuid(uuid);
break;
case -1:
break;
default:
throw new SwfFormatException("Unexpected tag id " + tag);
}
if (tag == -1)
{
break;
}
}
while (true);
int i = 0, size = lineRecords.size();
while (i < size)
{
int id = ((Integer) lineRecords.get(i)).intValue();
LineRecord lr = (LineRecord) lineRecords.get(i + 1);
int offset = ((Integer) lineRecords.get(i + 2)).intValue();
lr.module = (DebugModule) modules.get(id);
if (lr.module != null)
{