8000 Remove old debugging struct · python/cpython@56976b3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 56976b3

Browse files
committed
Remove old debugging struct
1 parent be88965 commit 56976b3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Tools/jit/build.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ def __init__(self, path: pathlib.Path, reader: str, dumper: str, symbol_prefix:
225225
self.reader = reader
226226
self.dumper = dumper
227227
self.data_size = 0
228-
self.data = []
229228
self.code_size = 0
230229

231230
async def parse(self):
@@ -268,8 +267,7 @@ async def parse(self):
268267
holes.append(newhole)
269268
offset = got-self.data_size-padding
270269
comment = "#"
271-
assert self.body[got-self.data_size-padding:got-padding] == bytes(self.data), breakpoint()
272-
assert self.data_size == got - padding - offset, breakpoint()
270+
assert self.data_size == got - padding - offset, (self.path, self.data_size, got, padding, offset)
273271
if self.data_size:
274272
disassembly.append(f"{offset:x}: " + f"{comment} {str(bytes(self.body[offset:offset + self.data_size])).removeprefix('b')}".expandtabs())
275273
disassembly.append(f"{offset:x}: " + f"{' '.join(f'{byte:02x}' for byte in self.body[offset:offset + self.data_size])}".expandtabs())
@@ -755,18 +753,15 @@ def _handle_section(self, section: MachOSection) -> None:
755753
flags = {flag["Name"] for flag in section["Attributes"]["Flags"]}
756754
if flags & {"SomeInstructions"}:
757755
assert not self.data_size
758-
assert not self.data
759756
self.code_size += len(section_data["Bytes"]) + (section["Address"] - len(self.body))
760757
self.body.extend([0] * (section["Address"] - len(self.body)))
761758
before = self.body_offsets[section["Index"]] = section["Address"]
762759
self.body.extend(section_data["Bytes"])
763760
else:
764761
self.data_size += section["Address"] - len(self.body)
765-
self.data.extend([0] * (section["Address"] - len(self.body)))
766762
self.body.extend([0] * (section["Address"] - len(self.body)))
767763
before = self.body_offsets[section["Index"]] = section["Address"]
768764
self.data_size += len(section_data["Bytes"])
769-
self.data.extend(section_data["Bytes"])
770765
self.body.extend(section_data["Bytes"])
771766
name = section["Name"]["Value"]
772767
# assert name.startswith("_") # XXX

0 commit comments

Comments
 (0)
0