aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-10-19 02:08:34 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2023-10-21 10:55:41 -0400
commit2e6e39a7004dae626ad3088cbf1e652f157e6db8 (patch)
tree5f166132424d3da5d6e372ce836f7dbdc2e75987 /tools
parentc880644d929ff8e403494ff7e6e347b4857db263 (diff)
downloadzig-2e6e39a7004dae626ad3088cbf1e652f157e6db8.tar.gz
zig-2e6e39a7004dae626ad3088cbf1e652f157e6db8.zip
x86_64: fix bugs and disable erroring tests
Diffstat (limited to 'tools')
-rw-r--r--tools/lldb_pretty_printers.py27
1 files changed, 19 insertions, 8 deletions
diff --git a/tools/lldb_pretty_printers.py b/tools/lldb_pretty_printers.py
index acd158b7b5..975edb7d0e 100644
--- a/tools/lldb_pretty_printers.py
+++ b/tools/lldb_pretty_printers.py
@@ -355,17 +355,28 @@ class Module_Decl__Module_Decl_Index_SynthProvider:
def __init__(self, value, _=None): self.value = value
def update(self):
try:
- for frame in self.value.thread:
- mod = frame.FindVariable('mod') or frame.FindVariable('module')
- if mod: break
- else: return
- self.ptr = mod.GetChildMemberWithName('allocated_decls').GetChildAtIndex(self.value.unsigned).address_of.Clone('decl')
+ ip = InternPool_Find(self.value.thread)
+ if not ip: return
+ self.ptr = ip.GetChildMemberWithName('allocated_decls').GetChildAtIndex(self.value.unsigned).address_of.Clone('decl')
except: pass
def has_children(self): return True
def num_children(self): return 1
def get_child_index(self, name): return 0 if name == 'decl' else -1
def get_child_at_index(self, index): return self.ptr if index == 0 else None
+class Module_Namespace__Module_Namespace_Index_SynthProvider:
+ def __init__(self, value, _=None): self.value = value
+ def update(self):
+ try:
+ ip = InternPool_Find(self.value.thread)
+ if not ip: return
+ self.ptr = ip.GetChildMemberWithName('allocated_namespaces').GetChildAtIndex(self.value.unsigned).address_of.Clone('namespace')
+ except: pass
+ def has_children(self): return True
+ def num_children(self): return 1
+ def get_child_index(self, name): return 0 if name == 'namespace' else -1
+ def get_child_at_index(self, index): return self.ptr if index == 0 else None
+
class TagOrPayloadPtr_SynthProvider:
def __init__(self, value, _=None): self.value = value
def update(self):
@@ -440,10 +451,9 @@ class InternPool_Index_SynthProvider:
for encoding_field in encoding_type.fields:
if encoding_field.name == 'data':
if encoding_field.type.IsPointerType():
- data_type = encoding_field.type.GetPointeeType()
extra_index = data.unsigned
- self.data = extra.GetChildAtIndex(extra_index).Cast(data_type).Clone('data')
- extra_index += data_type.num_fields
+ self.data = extra.GetChildAtIndex(extra_index).address_of.Cast(encoding_field.type).deref.Clone('data')
+ extra_index += encoding_field.type.GetPointeeType().num_fields
else:
self.data = data.Cast(encoding_field.type).Clone('data')
elif encoding_field.name == 'trailing':
@@ -700,6 +710,7 @@ def __lldb_init_module(debugger, _=None):
add(debugger, category='zig.stage2', regex=True, type=MultiArrayList_Entry('Air\\.Inst'), identifier='TagAndPayload', synth=True, inline_children=True, summary=True)
add(debugger, category='zig.stage2', regex=True, type='^Air\\.Inst\\.Data\\.Data__struct_[1-9][0-9]*$', inline_children=True, summary=True)
add(debugger, category='zig.stage2', type='Module.Decl::Module.Decl.Index', synth=True)
+ add(debugger, category='zig.stage2', type='Module.Namespace::Module.Namespace.Index', synth=True)
add(debugger, category='zig.stage2', type='Module.LazySrcLoc', identifier='zig_TaggedUnion', synth=True)
add(debugger, category='zig.stage2', type='InternPool.Index', synth=True)
add(debugger, category='zig.stage2', type='InternPool.NullTerminatedString', summary=True)