Debugger - wide line support for AS3

This commit is contained in:
Jindra Petřík
2015-12-05 13:26:56 +01:00
parent 0391d0b22e
commit e2c299afa0
3 changed files with 16 additions and 9 deletions

Binary file not shown.

View File

@@ -3341,7 +3341,12 @@ public final class SWF implements SWFContainerItem, Timelined {
Set<Integer> bplines = breakpoints.get(name);
for (int bpline : bplines) {
if (lineToOffset.containsKey(bpline)) {
items.add(new SWD.DebugBreakpoint(moduleId, bpline));
try {
SWD.DebugBreakpoint dbp = new SWD.DebugBreakpoint(moduleId, bpline);
items.add(dbp);
} catch (IllegalArgumentException iex) {
Logger.getLogger(SWF.class.getName()).log(Level.WARNING, "Cannot generate breakpoint to SWD: {0}", iex.getMessage());
}
}
}
}

View File

@@ -477,20 +477,22 @@ public class DebuggerHandler implements DebugConnectionListener {
commands.setSwfLoadNotify();
commands.setGetterTimeout(1500);
commands.setSetterTimeout(5000);
/*
//TODO:
con.wideLines = commands.getOption("wide_line_player", "false").equals("true");
if (con.wideLines) {
commands.setOption("wide_line_debugger", "on");
}*/
boolean isAS3 = (Main.getMainFrame().getPanel().getCurrentSwf().isAS3());
//Widelines - only AS3, it hangs in AS1/2 and SWD does not support UI32 lines
if (isAS3) {
con.wideLines = commands.getOption("wide_line_player", "false").equals("true");
if (con.wideLines) {
commands.setOption("wide_line_debugger", "on");
}
}
commands.squelch(true);
swfs = commands.getSwfInfo(1);
con.sendMessage(new OutGetSwf(con, 0), InGetSwf.class);
InGetSwd iswd = con.sendMessage(new OutGetSwd(con, 0), InGetSwd.class);
boolean isAS3 = (Main.getMainFrame().getPanel().getCurrentSwf().isAS3());
InSetBreakpoint isb = con.getMessage(InSetBreakpoint.class);
synchronized (this) {
for (int i = 0; i < isb.files.size(); i++) {