cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
34 lines
1.7 KiB
OpenEdge ABL
34 lines
1.7 KiB
OpenEdge ABL
STRING_EXTENSION_OUTSIDE(SBInstruction)
|
|
|
|
%extend lldb::SBInstruction {
|
|
#ifdef SWIGPYTHON
|
|
%pythoncode %{
|
|
def __hex__(self):
|
|
""" Returns the address of the instruction. """
|
|
return self.GetAddress()
|
|
|
|
def __len__(self):
|
|
""" Returns the size of the instruction. """
|
|
return self.GetByteSize()
|
|
|
|
def __mnemonic_property__ (self):
|
|
return self.GetMnemonic (target)
|
|
def __operands_property__ (self):
|
|
return self.GetOperands (target)
|
|
def __comment_property__ (self):
|
|
return self.GetComment (target)
|
|
def __file_addr_property__ (self):
|
|
return self.GetAddress ().GetFileAddress()
|
|
def __load_adrr_property__ (self):
|
|
return self.GetComment (target)
|
|
|
|
mnemonic = property(__mnemonic_property__, None, doc='''A read only property that returns the mnemonic for this instruction as a string.''')
|
|
operands = property(__operands_property__, None, doc='''A read only property that returns the operands for this instruction as a string.''')
|
|
comment = property(__comment_property__, None, doc='''A read only property that returns the comment for this instruction as a string.''')
|
|
addr = property(GetAddress, None, doc='''A read only property that returns an lldb object that represents the address (lldb.SBAddress) for this instruction.''')
|
|
size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes for this instruction as an integer.''')
|
|
is_branch = property(DoesBranch, None, doc='''A read only property that returns a boolean value that indicates if this instruction is a branch instruction.''')
|
|
%}
|
|
#endif
|
|
}
|