_._,_._,_ Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77806) | | Mute This Topic | New Topic _._,_._,_
|
#!/usr/bin/python3 import gdb
from gdb.printing import register_pretty_printer from gdb.printing import RegexpCollectionPrettyPrinter class CHAR16_PrettyPrinter(object): def __init__(self, val): self.val = val def to_string(self): if int(self.val) < 0x20: return f"L'\\x{int(self.val):02x}'" else: return f"L'{chr(self.val):s}'" def build_pretty_printer(): pp = RegexpCollectionPrettyPrinter("EFI") pp.add_printer('CHAR16', '^CHAR16$', CHAR16_PrettyPrinter) return pp register_pretty_printer(None, build_pretty_printer(), replace=True)
CHAR16.c
Description: Binary data
CHAR16.sh
Description: Binary data