X-Git-Url: http://sigrok.org/gitweb/?p=sigrok-util.git;a=blobdiff_plain;f=firmware%2Fsaleae-logic16%2Fsigrok-fwextract-saleae-logic16;fp=firmware%2Fsaleae-logic16%2Fsigrok-fwextract-saleae-logic16;h=62d66a1843febc805f033d66fa5344e77c0c2959;hp=45f98277c879a46d3d02fa1094a9551e64b6ab26;hb=08a979afc74f56b6b23a129a89406a2949ccaefe;hpb=1b0c6828974e6c18763600aeb09034d5686f21f1 diff --git a/firmware/saleae-logic16/sigrok-fwextract-saleae-logic16 b/firmware/saleae-logic16/sigrok-fwextract-saleae-logic16 index 45f9827..62d66a1 100755 --- a/firmware/saleae-logic16/sigrok-fwextract-saleae-logic16 +++ b/firmware/saleae-logic16/sigrok-fwextract-saleae-logic16 @@ -24,7 +24,7 @@ import parseelf class searcher: - def reset(this, offs = 0): + def reset(this, offs=0): if offs < 0 or offs > this.length: raise Exception('Reset past end of section') this.address = this.baseaddr + offs @@ -103,7 +103,7 @@ def parse_hex_file_lines_constructor_32(text, basic_string_plt, got_plt, lines): text.skip(6) straddr += got_plt else: - raise Exception('Expected lea offs32(%ebx),%eax @ '+ + raise Exception('Expected lea offs32(%ebx),%eax @ ' + ('0x%x' % text.address)) if text.peek(4) == b'\x89\x44\x24\x04': # mov %eax,0x4(%esp) text.skip(4) @@ -117,7 +117,7 @@ def parse_hex_file_lines_constructor_32(text, basic_string_plt, got_plt, lines): offs = struct.unpack(' (len(lines) << 2) or (offs & 3) != 0: raise Exception('Invalid offset %d' % offs) @@ -130,10 +130,10 @@ def parse_hex_file_lines_constructor_32(text, basic_string_plt, got_plt, lines): offs = struct.unpack(' (len(lines) << 3) or (offs & 7) != 0: raise Exception('Invalid offset %d' % offs) @@ -179,10 +179,10 @@ def parse_hex_file_lines_constructor_64(text, basic_string_plt, lines): offs = struct.unpack('") @@ -311,4 +311,3 @@ try: extract_bitstream(elf, '33') except Exception as e: print("Error: %s" % str(e)) -