Comments and debug output
This commit is contained in:
@@ -167,11 +167,13 @@ class Gcd:
|
||||
f.write("# Lengths are informational only, they will be calculated upon reassembly.\n")
|
||||
for tlv in self.struct:
|
||||
if tlv.is_binary:
|
||||
# BINARY block
|
||||
if outfile is None:
|
||||
outfile = "{}_{:04x}_{:x}.bin".format(output_basename, tlv.type_id, tlv.offset)
|
||||
self.write_dump_block(f, str(ctr))
|
||||
self.write_dump_param(f, "from_file", outfile)
|
||||
for item in tlv.dump():
|
||||
print(item[0])
|
||||
self.write_dump_param(f, item[0], item[1], item[2])
|
||||
with open(outfile, "wb") as of:
|
||||
of.write(tlv.value)
|
||||
@@ -185,6 +187,7 @@ class Gcd:
|
||||
# EOF marker
|
||||
pass
|
||||
else:
|
||||
# NON-BINARY block
|
||||
outfile = None
|
||||
tlvinfo = tlv.dump()
|
||||
if len(tlvinfo) > 0:
|
||||
|
||||
Reference in New Issue
Block a user