Dropped -x/--device from dbg*.py scripts
This hasn't really proven useful. At one point showing the cksums in dbgrbyd.py was useful, but this is now possible and easier with dbgblock.py -x/--cksum.
This commit is contained in:
@@ -926,14 +926,6 @@ def main(disk, roots=None, *,
|
|||||||
else ''))
|
else ''))
|
||||||
prbyd = rbyd
|
prbyd = rbyd
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
print('%9s %*s%*s %04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
t_width, '',
|
|
||||||
2*w_width+1, '',
|
|
||||||
tag, w if i == 0 else 0, len(data)))
|
|
||||||
|
|
||||||
# show on-disk encoding of tags/data
|
# show on-disk encoding of tags/data
|
||||||
if args.get('raw'):
|
if args.get('raw'):
|
||||||
for o, line in enumerate(xxd(rbyd.data[j:j+d])):
|
for o, line in enumerate(xxd(rbyd.data[j:j+d])):
|
||||||
@@ -1050,10 +1042,6 @@ if __name__ == "__main__":
|
|||||||
'-r', '--raw',
|
'-r', '--raw',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show the raw data including tag encodings.")
|
help="Show the raw data including tag encodings.")
|
||||||
parser.add_argument(
|
|
||||||
'-x', '--device',
|
|
||||||
action='store_true',
|
|
||||||
help="Show the device-side representation of tags.")
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-T', '--no-truncate',
|
'-T', '--no-truncate',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|||||||
@@ -1460,15 +1460,6 @@ def dbg_fstruct(f, block_size, mdir, rid, tag, j, d, data, *,
|
|||||||
else ''))
|
else ''))
|
||||||
prbyd = rbyd
|
prbyd = rbyd
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
print('%11s %*s %*s%s%04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
m_width, '',
|
|
||||||
t_width, '',
|
|
||||||
'%*s ' % (2*w_width+1, ''),
|
|
||||||
tag, w if i == 0 else 0, len(data)))
|
|
||||||
|
|
||||||
# show on-disk encoding of tags/data
|
# show on-disk encoding of tags/data
|
||||||
if args.get('raw'):
|
if args.get('raw'):
|
||||||
for o, line in enumerate(xxd(rbyd.data[j:j+d])):
|
for o, line in enumerate(xxd(rbyd.data[j:j+d])):
|
||||||
@@ -1522,16 +1513,6 @@ def dbg_fstruct(f, block_size, mdir, rid, tag, j, d, data, *,
|
|||||||
'\x1b[m' if color and notes else ''))
|
'\x1b[m' if color and notes else ''))
|
||||||
prbyd = rbyd
|
prbyd = rbyd
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
_, j, d, data_ = bptr
|
|
||||||
print('%11s %*s %*s%s%04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
m_width, '',
|
|
||||||
t_width, '',
|
|
||||||
'%*s ' % (2*w_width+1, ''),
|
|
||||||
tag, w, len(data_)))
|
|
||||||
|
|
||||||
# show on-disk encoding of tags/bptr/data
|
# show on-disk encoding of tags/bptr/data
|
||||||
if args.get('raw'):
|
if args.get('raw'):
|
||||||
_, j, d, data_ = bptr
|
_, j, d, data_ = bptr
|
||||||
@@ -1911,13 +1892,6 @@ def main(disk, mroots=None, *,
|
|||||||
if not args.get('raw')
|
if not args.get('raw')
|
||||||
and not args.get('no_truncate') else ''))
|
and not args.get('no_truncate') else ''))
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
print('%11s %*s %04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
2*w_width+1, '',
|
|
||||||
tag, 0, len(data)))
|
|
||||||
|
|
||||||
# show on-disk encoding
|
# show on-disk encoding
|
||||||
if args.get('raw') or args.get('no_truncate'):
|
if args.get('raw') or args.get('no_truncate'):
|
||||||
for o, line in enumerate(xxd(data)):
|
for o, line in enumerate(xxd(data)):
|
||||||
@@ -1937,13 +1911,6 @@ def main(disk, mroots=None, *,
|
|||||||
if not args.get('raw')
|
if not args.get('raw')
|
||||||
and not args.get('no_truncate') else ''))
|
and not args.get('no_truncate') else ''))
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
print('%11s %*s %04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
2*w_width+1, '',
|
|
||||||
tag, 0, len(data)))
|
|
||||||
|
|
||||||
# show on-disk encoding
|
# show on-disk encoding
|
||||||
if args.get('raw') or args.get('no_truncate'):
|
if args.get('raw') or args.get('no_truncate'):
|
||||||
for o, line in enumerate(xxd(data)):
|
for o, line in enumerate(xxd(data)):
|
||||||
@@ -1967,13 +1934,6 @@ def main(disk, mroots=None, *,
|
|||||||
and not args.get('no_truncate') else '',
|
and not args.get('no_truncate') else '',
|
||||||
'\x1b[m' if color else ''))
|
'\x1b[m' if color else ''))
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
print('%11s %*s %04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
2*w_width+1, '',
|
|
||||||
tag, 0, len(data)))
|
|
||||||
|
|
||||||
# show on-disk encoding
|
# show on-disk encoding
|
||||||
if args.get('raw'):
|
if args.get('raw'):
|
||||||
for o, line in enumerate(xxd(mdir.data[j:j+d])):
|
for o, line in enumerate(xxd(mdir.data[j:j+d])):
|
||||||
@@ -2097,13 +2057,6 @@ def main(disk, mroots=None, *,
|
|||||||
and not args.get('no_truncate')
|
and not args.get('no_truncate')
|
||||||
else ''))
|
else ''))
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
print('%11s %*s %04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
2*w_width+1, '',
|
|
||||||
tag_, w_, len(data)))
|
|
||||||
|
|
||||||
# show on-disk encoding
|
# show on-disk encoding
|
||||||
if args.get('raw'):
|
if args.get('raw'):
|
||||||
for o, line in enumerate(xxd(mdir.data[j:j+d])):
|
for o, line in enumerate(xxd(mdir.data[j:j+d])):
|
||||||
@@ -2236,10 +2189,6 @@ if __name__ == "__main__":
|
|||||||
'-r', '--raw',
|
'-r', '--raw',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show the raw data including tag encodings.")
|
help="Show the raw data including tag encodings.")
|
||||||
parser.add_argument(
|
|
||||||
'-x', '--device',
|
|
||||||
action='store_true',
|
|
||||||
help="Show the device-side representation of tags.")
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-T', '--no-truncate',
|
'-T', '--no-truncate',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|||||||
@@ -1416,14 +1416,6 @@ def main(disk, mroots=None, *,
|
|||||||
and not args.get('no_truncate')
|
and not args.get('no_truncate')
|
||||||
else '')))
|
else '')))
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
print('%11s %*s%*s %04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
t_width, '',
|
|
||||||
2*w_width+1, '',
|
|
||||||
tag, w, len(data)));
|
|
||||||
|
|
||||||
# show on-disk encoding of tags
|
# show on-disk encoding of tags
|
||||||
if args.get('raw'):
|
if args.get('raw'):
|
||||||
for o, line in enumerate(xxd(mdir.data[j:j+d])):
|
for o, line in enumerate(xxd(mdir.data[j:j+d])):
|
||||||
@@ -1471,14 +1463,6 @@ def main(disk, mroots=None, *,
|
|||||||
else ''))
|
else ''))
|
||||||
prbyd = rbyd
|
prbyd = rbyd
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
print('%11s %*s%*s %04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
t_width, '',
|
|
||||||
2*w_width+1, '',
|
|
||||||
tag, w if i == 0 else 0, len(data)));
|
|
||||||
|
|
||||||
# show on-disk encoding of tags/data
|
# show on-disk encoding of tags/data
|
||||||
if args.get('raw'):
|
if args.get('raw'):
|
||||||
for o, line in enumerate(xxd(rbyd.data[j:j+d])):
|
for o, line in enumerate(xxd(rbyd.data[j:j+d])):
|
||||||
@@ -1701,10 +1685,6 @@ if __name__ == "__main__":
|
|||||||
'-r', '--raw',
|
'-r', '--raw',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show the raw data including tag encodings.")
|
help="Show the raw data including tag encodings.")
|
||||||
parser.add_argument(
|
|
||||||
'-x', '--device',
|
|
||||||
action='store_true',
|
|
||||||
help="Show the device-side representation of tags.")
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-T', '--no-truncate',
|
'-T', '--no-truncate',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|||||||
@@ -577,19 +577,6 @@ def dbg_log(data, block_size, rev, eoff, weight, *,
|
|||||||
' %s' % jumprepr(j)
|
' %s' % jumprepr(j)
|
||||||
if args.get('jumps') and not notes else ''))
|
if args.get('jumps') and not notes else ''))
|
||||||
|
|
||||||
# show in-device representation, including some extra
|
|
||||||
# cksum/parity info
|
|
||||||
if args.get('device'):
|
|
||||||
print('%s%8s %*s%*s %-*s %08x %x%s' % (
|
|
||||||
'\x1b[90m' if color and j >= eoff else '',
|
|
||||||
'',
|
|
||||||
lifetime_width, '',
|
|
||||||
2*w_width+1, '',
|
|
||||||
21+w_width, '%04x %08x %07x' % (tag, w, size),
|
|
||||||
cksum,
|
|
||||||
popc(cksum) & 1,
|
|
||||||
'\x1b[m' if color and j >= eoff else ''))
|
|
||||||
|
|
||||||
# show on-disk encoding of tags
|
# show on-disk encoding of tags
|
||||||
if args.get('raw'):
|
if args.get('raw'):
|
||||||
for o, line in enumerate(xxd(data[j:j+d])):
|
for o, line in enumerate(xxd(data[j:j+d])):
|
||||||
@@ -851,14 +838,6 @@ def dbg_tree(data, block_size, rev, trunk, weight, *,
|
|||||||
if not args.get('raw') and not args.get('no_truncate')
|
if not args.get('raw') and not args.get('no_truncate')
|
||||||
and not tag & TAG_ALT else ''))
|
and not tag & TAG_ALT else ''))
|
||||||
|
|
||||||
# show in-device representation
|
|
||||||
if args.get('device'):
|
|
||||||
print('%8s %*s%*s %04x %08x %07x' % (
|
|
||||||
'',
|
|
||||||
t_width, '',
|
|
||||||
2*w_width+1, '',
|
|
||||||
tag, w, size))
|
|
||||||
|
|
||||||
# show on-disk encoding of tags
|
# show on-disk encoding of tags
|
||||||
if args.get('raw'):
|
if args.get('raw'):
|
||||||
for o, line in enumerate(xxd(data[j:j+d])):
|
for o, line in enumerate(xxd(data[j:j+d])):
|
||||||
@@ -1081,10 +1060,6 @@ if __name__ == "__main__":
|
|||||||
'-r', '--raw',
|
'-r', '--raw',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show the raw data including tag encodings.")
|
help="Show the raw data including tag encodings.")
|
||||||
parser.add_argument(
|
|
||||||
'-x', '--device',
|
|
||||||
action='store_true',
|
|
||||||
help="Show the device-side representation of tags.")
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-T', '--no-truncate',
|
'-T', '--no-truncate',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|||||||
Reference in New Issue
Block a user