authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-09-11 16:20:56-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-10-09 07:48:09-04:00
logd354daf143525cda701e46473d7d2785ae4c05ab
treeffbcae91c392c870b7bb66ebf482ae5791326490
parent65f6623ba483fd9f2da027ca5a308e3cb80f0a9e

lldb: disable pretty printers on self-hosted backends


1 files changed, 8 insertions(+), 5 deletions(-)

tools/lldb_pretty_printers.py+8-5
...@@ -1,7 +1,7 @@...@@ -1,7 +1,7 @@
1# pretty printing for the zig language, zig standard library, and zig stage 2 compiler.1# pretty printing for the zig language, zig standard library, and zig stage 2 compiler.
2# put commands in ~/.lldbinit to run them automatically when starting lldb2# put commands in ~/.lldbinit to run them automatically when starting lldb
3# `command script import /path/to/zig/tools/lldb_pretty_printers.py` to import this file3# `command script import /path/to/zig/tools/lldb_pretty_printers.py` to import this file
4# `type category enable zig` to enable pretty printing for the zig language4# `type category enable zig.lang` to enable pretty printing for the zig language
5# `type category enable zig.std` to enable pretty printing for the zig standard library5# `type category enable zig.std` to enable pretty printing for the zig standard library
6# `type category enable zig.stage2` to enable pretty printing for the zig stage 2 compiler6# `type category enable zig.stage2` to enable pretty printing for the zig stage 2 compiler
7import lldb7import lldb
...@@ -688,11 +688,14 @@ def add(debugger, *, category, regex=False, type, identifier=None, synth=False,...@@ -688,11 +688,14 @@ def add(debugger, *, category, regex=False, type, identifier=None, synth=False,
688def MultiArrayList_Entry(type): return '^multi_array_list\\.MultiArrayList\\(%s\\)\\.Entry__struct_[1-9][0-9]*$' % type688def MultiArrayList_Entry(type): return '^multi_array_list\\.MultiArrayList\\(%s\\)\\.Entry__struct_[1-9][0-9]*$' % type
689689
690def __lldb_init_module(debugger, _=None):690def __lldb_init_module(debugger, _=None):
691 # Initialize Zig Categories
692 debugger.HandleCommand('type category define --language c99 zig.lang zig.std')
693
691 # Initialize Zig Language694 # Initialize Zig Language
692 add(debugger, category='zig', regex=True, type='^\\[\\]', identifier='zig_Slice', synth=True, expand=True, summary='len=${svar%#}')695 add(debugger, category='zig.lang', regex=True, type='^\\[\\]', identifier='zig_Slice', synth=True, expand=True, summary='len=${svar%#}')
693 add(debugger, category='zig', type='[]u8', identifier='zig_String', summary=True)696 add(debugger, category='zig.lang', type='[]u8', identifier='zig_String', summary=True)
694 add(debugger, category='zig', regex=True, type='^\\?', identifier='zig_Optional', synth=True, summary=True)697 add(debugger, category='zig.lang', regex=True, type='^\\?', identifier='zig_Optional', synth=True, summary=True)
695 add(debugger, category='zig', regex=True, type='^(error{.*}|anyerror)!', identifier='zig_ErrorUnion', synth=True, inline_children=True, summary=True)698 add(debugger, category='zig.lang', regex=True, type='^(error{.*}|anyerror)!', identifier='zig_ErrorUnion', synth=True, inline_children=True, summary=True)
696699
697 # Initialize Zig Standard Library700 # Initialize Zig Standard Library
698 add(debugger, category='zig.std', type='mem.Allocator', summary='${var.ptr}')701 add(debugger, category='zig.std', type='mem.Allocator', summary='${var.ptr}')