private String toString(Address pc, DisassembledLine line) { final Address realAddress = line.getAddress(); return createLinePrefix(pc, realAddress, line) + Misc.toHexString(realAddress) + ": " + line.getContents(); }
public Object getValueAt(int rowIndex, int columnIndex) { final Breakpoint bp = breakPoints.get(rowIndex); switch (columnIndex) { case COL_BP_ENABLED: return bp.isEnabled(); case COL_BP_ADDRESS: return Misc.toHexString(bp.getAddress()); case COL_BP_EXPRESSION: return bp.hasCondition() ? bp.getCondition() : UNCONDITIONAL_BREAKPOINT; default: return "<unknown column>"; } }
private DisassembledLine parseDisassembledLine(String text) { // [B] >> 0000: final Pattern pattern = Pattern.compile("^(\\[[B_]{1}\\]){0,1}[ ]*(>>){0,1}[ ]*([0-9a-f]+):(.*?);(.*)"); final Matcher m = pattern.matcher(text); if (!m.matches()) { throw new RuntimeException("Unparseable line '" + text + "'"); } @SuppressWarnings("unused") final String hasBreakpoint = m.group(1); @SuppressWarnings("unused") final String isAtCurrentPC = m.group(2); final Address address = Address.wordAddress(Misc.parseHexString(m.group(3))); final String disassembly = m.group(4); final String instructionWordsHexDump = m.group(5).trim(); final Size instructionSize = Size.words(instructionWordsHexDump.split(" ").length); return new DisassembledLine(address, disassembly, instructionSize); }