codekingpro commited on
Commit
dd9b9d9
·
verified ·
1 Parent(s): f1136c6

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/components +7 -0
  2. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/gdb_load_rust_pretty_printers.py +16 -0
  3. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/gdb_lookup.py +121 -0
  4. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/gdb_providers.py +497 -0
  5. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/intrinsic.natvis +372 -0
  6. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/liballoc.natvis +190 -0
  7. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/libcore.natvis +133 -0
  8. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/libstd.natvis +120 -0
  9. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/lldb_commands +81 -0
  10. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/lldb_lookup.py +142 -0
  11. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/lldb_providers.py +1403 -0
  12. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/rust_types.py +128 -0
  13. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-cargo-x86_64-pc-windows-msvc +45 -0
  14. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-clippy-preview-x86_64-pc-windows-msvc +7 -0
  15. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rust-analyzer-preview-x86_64-pc-windows-msvc +5 -0
  16. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rust-src +0 -0
  17. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rust-std-x86_64-pc-windows-msvc +45 -0
  18. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rustc-x86_64-pc-windows-msvc +56 -0
  19. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rustfmt-preview-x86_64-pc-windows-msvc +7 -0
  20. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/multirust-channel-manifest.toml +0 -0
  21. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/multirust-config.toml +36 -0
  22. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/rust-installer-version +1 -0
  23. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/library/Cargo.lock +522 -0
  24. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/library/Cargo.toml +87 -0
  25. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/.clang-format +2 -0
  26. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/CMakeLists.txt +356 -0
  27. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/LICENSE.TXT +311 -0
  28. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/README_RUST_SGX.md +22 -0
  29. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/cmake/config-ix.cmake +73 -0
  30. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/docs/BuildingLibunwind.rst +138 -0
  31. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/docs/CMakeLists.txt +7 -0
  32. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/docs/conf.py +252 -0
  33. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/docs/index.rst +101 -0
  34. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libcfg_if-66ccf9e220034f42.rlib +0 -0
  35. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libcfg_if-66ccf9e220034f42.rmeta +0 -0
  36. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libhashbrown-d671ea03f4f2cb7f.rlib +0 -0
  37. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_abort-59292eecd8b1d16e.rlib +0 -0
  38. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_abort-59292eecd8b1d16e.rmeta +0 -0
  39. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_unwind-2405f2c51aa3033f.rlib +0 -0
  40. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_unwind-2405f2c51aa3033f.rmeta +0 -0
  41. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libprofiler_builtins-adc74bbcd604917d.rmeta +0 -0
  42. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_demangle-eda3326d6d941958.rmeta +0 -0
  43. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_literal_escaper-26a66b580b06d1b8.rlib +0 -0
  44. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_alloc-fd50af2c77fb0ff8.rlib +0 -0
  45. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_alloc-fd50af2c77fb0ff8.rmeta +0 -0
  46. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_core-70fce068d6af51d0.rlib +0 -0
  47. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_core-70fce068d6af51d0.rmeta +0 -0
  48. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_std-444efa70010dce55.rlib +0 -0
  49. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_std-444efa70010dce55.rmeta +0 -0
  50. rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libstd_detect-9997abfbe12e9a5a.rlib +0 -0
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/components ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ cargo-x86_64-pc-windows-msvc
2
+ rust-std-x86_64-pc-windows-msvc
3
+ rustc-x86_64-pc-windows-msvc
4
+ rust-src
5
+ rust-analyzer-preview-x86_64-pc-windows-msvc
6
+ rustfmt-preview-x86_64-pc-windows-msvc
7
+ clippy-preview-x86_64-pc-windows-msvc
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/gdb_load_rust_pretty_printers.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Add this folder to the python sys path; GDB Python-interpreter will now find modules in this path
2
+ import sys
3
+ from os import path
4
+
5
+ self_dir = path.dirname(path.realpath(__file__))
6
+ sys.path.append(self_dir)
7
+
8
+ # ruff: noqa: E402
9
+ import gdb
10
+ import gdb_lookup
11
+
12
+ # current_objfile can be none; even with `gdb foo-app`; sourcing this file after gdb init now works
13
+ try:
14
+ gdb_lookup.register_printers(gdb.current_objfile())
15
+ except Exception:
16
+ gdb_lookup.register_printers(gdb.selected_inferior().progspace)
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/gdb_lookup.py ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gdb
2
+ import gdb.printing
3
+ import re
4
+
5
+ from gdb_providers import *
6
+ from rust_types import *
7
+
8
+
9
+ _gdb_version_matched = re.search("([0-9]+)\\.([0-9]+)", gdb.VERSION)
10
+ gdb_version = (
11
+ [int(num) for num in _gdb_version_matched.groups()] if _gdb_version_matched else []
12
+ )
13
+
14
+
15
+ def register_printers(objfile):
16
+ objfile.pretty_printers.append(printer)
17
+
18
+
19
+ # BACKCOMPAT: rust 1.35
20
+ def is_hashbrown_hashmap(hash_map):
21
+ return len(hash_map.type.fields()) == 1
22
+
23
+
24
+ def classify_rust_type(type):
25
+ type_class = type.code
26
+ if type_class == gdb.TYPE_CODE_STRUCT:
27
+ return classify_struct(type.tag, type.fields())
28
+ if type_class == gdb.TYPE_CODE_UNION:
29
+ return classify_union(type.fields())
30
+
31
+ return RustType.OTHER
32
+
33
+
34
+ def check_enum_discriminant(valobj):
35
+ content = valobj[valobj.type.fields()[0]]
36
+ fields = content.type.fields()
37
+ if len(fields) > 1:
38
+ discriminant = int(content[fields[0]]) + 1
39
+ if discriminant > len(fields):
40
+ # invalid discriminant
41
+ return False
42
+ return True
43
+
44
+
45
+ # Helper for enum printing that checks the discriminant. Only used in
46
+ # older gdb.
47
+ def enum_provider(valobj):
48
+ if check_enum_discriminant(valobj):
49
+ return EnumProvider(valobj)
50
+ return None
51
+
52
+
53
+ # Helper to handle both old and new hash maps.
54
+ def hashmap_provider(valobj):
55
+ if is_hashbrown_hashmap(valobj):
56
+ return StdHashMapProvider(valobj)
57
+ else:
58
+ return StdOldHashMapProvider(valobj)
59
+
60
+
61
+ # Helper to handle both old and new hash sets.
62
+ def hashset_provider(valobj):
63
+ hash_map = valobj[valobj.type.fields()[0]]
64
+ if is_hashbrown_hashmap(hash_map):
65
+ return StdHashMapProvider(valobj, show_values=False)
66
+ else:
67
+ return StdOldHashMapProvider(hash_map, show_values=False)
68
+
69
+
70
+ class PrintByRustType(gdb.printing.SubPrettyPrinter):
71
+ def __init__(self, name, provider):
72
+ super(PrintByRustType, self).__init__(name)
73
+ self.provider = provider
74
+
75
+ def __call__(self, val):
76
+ if self.enabled:
77
+ return self.provider(val)
78
+ return None
79
+
80
+
81
+ class RustPrettyPrinter(gdb.printing.PrettyPrinter):
82
+ def __init__(self, name):
83
+ super(RustPrettyPrinter, self).__init__(name, [])
84
+ self.type_map = {}
85
+
86
+ def add(self, rust_type, provider):
87
+ # Just use the rust_type as the name.
88
+ printer = PrintByRustType(rust_type, provider)
89
+ self.type_map[rust_type] = printer
90
+ self.subprinters.append(printer)
91
+
92
+ def __call__(self, valobj):
93
+ rust_type = classify_rust_type(valobj.type)
94
+ if rust_type in self.type_map:
95
+ return self.type_map[rust_type](valobj)
96
+ return None
97
+
98
+
99
+ printer = RustPrettyPrinter("rust")
100
+ # use enum provider only for GDB <7.12
101
+ if gdb_version[0] < 7 or (gdb_version[0] == 7 and gdb_version[1] < 12):
102
+ printer.add(RustType.ENUM, enum_provider)
103
+ printer.add(RustType.STD_STRING, StdStringProvider)
104
+ printer.add(RustType.STD_OS_STRING, StdOsStringProvider)
105
+ printer.add(RustType.STD_STR, StdStrProvider)
106
+ printer.add(RustType.STD_SLICE, StdSliceProvider)
107
+ printer.add(RustType.STD_VEC, StdVecProvider)
108
+ printer.add(RustType.STD_VEC_DEQUE, StdVecDequeProvider)
109
+ printer.add(RustType.STD_BTREE_SET, StdBTreeSetProvider)
110
+ printer.add(RustType.STD_BTREE_MAP, StdBTreeMapProvider)
111
+ printer.add(RustType.STD_HASH_MAP, hashmap_provider)
112
+ printer.add(RustType.STD_HASH_SET, hashset_provider)
113
+ printer.add(RustType.STD_RC, StdRcProvider)
114
+ printer.add(RustType.STD_ARC, lambda valobj: StdRcProvider(valobj, is_atomic=True))
115
+
116
+ printer.add(RustType.STD_CELL, StdCellProvider)
117
+ printer.add(RustType.STD_REF, StdRefProvider)
118
+ printer.add(RustType.STD_REF_MUT, StdRefProvider)
119
+ printer.add(RustType.STD_REF_CELL, StdRefCellProvider)
120
+
121
+ printer.add(RustType.STD_NONZERO_NUMBER, StdNonZeroNumberProvider)
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/gdb_providers.py ADDED
@@ -0,0 +1,497 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from sys import version_info
2
+
3
+ import gdb
4
+
5
+ if version_info[0] >= 3:
6
+ xrange = range
7
+
8
+ ZERO_FIELD = "__0"
9
+ FIRST_FIELD = "__1"
10
+
11
+
12
+ def unwrap_unique_or_non_null(unique_or_nonnull):
13
+ # BACKCOMPAT: rust 1.32
14
+ # https://github.com/rust-lang/rust/commit/7a0911528058e87d22ea305695f4047572c5e067
15
+ # BACKCOMPAT: rust 1.60
16
+ # https://github.com/rust-lang/rust/commit/2a91eeac1a2d27dd3de1bf55515d765da20fd86f
17
+ ptr = unique_or_nonnull["pointer"]
18
+ return ptr if ptr.type.code == gdb.TYPE_CODE_PTR else ptr[ptr.type.fields()[0]]
19
+
20
+
21
+ # GDB 14 has a tag class that indicates that extension methods are ok
22
+ # to call. Use of this tag only requires that printers hide local
23
+ # attributes and methods by prefixing them with "_".
24
+ if hasattr(gdb, "ValuePrinter"):
25
+ printer_base = gdb.ValuePrinter
26
+ else:
27
+ printer_base = object
28
+
29
+
30
+ class EnumProvider(printer_base):
31
+ def __init__(self, valobj):
32
+ content = valobj[valobj.type.fields()[0]]
33
+ fields = content.type.fields()
34
+ self._empty = len(fields) == 0
35
+ if not self._empty:
36
+ if len(fields) == 1:
37
+ discriminant = 0
38
+ else:
39
+ discriminant = int(content[fields[0]]) + 1
40
+ self._active_variant = content[fields[discriminant]]
41
+ self._name = fields[discriminant].name
42
+ self._full_name = "{}::{}".format(valobj.type.name, self._name)
43
+ else:
44
+ self._full_name = valobj.type.name
45
+
46
+ def to_string(self):
47
+ return self._full_name
48
+
49
+ def children(self):
50
+ if not self._empty:
51
+ yield self._name, self._active_variant
52
+
53
+
54
+ class StdStringProvider(printer_base):
55
+ def __init__(self, valobj):
56
+ self._valobj = valobj
57
+ vec = valobj["vec"]
58
+ self._length = int(vec["len"])
59
+ self._data_ptr = unwrap_unique_or_non_null(vec["buf"]["inner"]["ptr"])
60
+
61
+ def to_string(self):
62
+ return self._data_ptr.lazy_string(encoding="utf-8", length=self._length)
63
+
64
+ @staticmethod
65
+ def display_hint():
66
+ return "string"
67
+
68
+
69
+ class StdOsStringProvider(printer_base):
70
+ def __init__(self, valobj):
71
+ self._valobj = valobj
72
+ buf = self._valobj["inner"]["inner"]
73
+ is_windows = "Wtf8Buf" in buf.type.name
74
+ vec = buf["bytes"] if is_windows else buf
75
+
76
+ self._length = int(vec["len"])
77
+ self._data_ptr = unwrap_unique_or_non_null(vec["buf"]["inner"]["ptr"])
78
+
79
+ def to_string(self):
80
+ return self._data_ptr.lazy_string(encoding="utf-8", length=self._length)
81
+
82
+ def display_hint(self):
83
+ return "string"
84
+
85
+
86
+ class StdStrProvider(printer_base):
87
+ def __init__(self, valobj):
88
+ self._valobj = valobj
89
+ self._length = int(valobj["length"])
90
+ self._data_ptr = valobj["data_ptr"]
91
+
92
+ def to_string(self):
93
+ return self._data_ptr.lazy_string(encoding="utf-8", length=self._length)
94
+
95
+ @staticmethod
96
+ def display_hint():
97
+ return "string"
98
+
99
+
100
+ def _enumerate_array_elements(element_ptrs):
101
+ for i, element_ptr in enumerate(element_ptrs):
102
+ key = "[{}]".format(i)
103
+ element = element_ptr.dereference()
104
+
105
+ try:
106
+ # rust-lang/rust#64343: passing deref expr to `str` allows
107
+ # catching exception on garbage pointer
108
+ str(element)
109
+ except RuntimeError:
110
+ yield key, "inaccessible"
111
+
112
+ break
113
+
114
+ yield key, element
115
+
116
+
117
+ class StdSliceProvider(printer_base):
118
+ def __init__(self, valobj):
119
+ self._valobj = valobj
120
+ self._length = int(valobj["length"])
121
+ self._data_ptr = valobj["data_ptr"]
122
+
123
+ def to_string(self):
124
+ return "{}(size={})".format(self._valobj.type, self._length)
125
+
126
+ def children(self):
127
+ return _enumerate_array_elements(
128
+ self._data_ptr + index for index in xrange(self._length)
129
+ )
130
+
131
+ def num_children(self):
132
+ return self._length
133
+
134
+ @staticmethod
135
+ def display_hint():
136
+ return "array"
137
+
138
+
139
+ class StdVecProvider(printer_base):
140
+ def __init__(self, valobj):
141
+ self._valobj = valobj
142
+ self._length = int(valobj["len"])
143
+ self._data_ptr = unwrap_unique_or_non_null(valobj["buf"]["inner"]["ptr"])
144
+ ptr_ty = gdb.Type.pointer(valobj.type.template_argument(0))
145
+ self._data_ptr = self._data_ptr.reinterpret_cast(ptr_ty)
146
+
147
+ def to_string(self):
148
+ return "Vec(size={})".format(self._length)
149
+
150
+ def children(self):
151
+ return _enumerate_array_elements(
152
+ self._data_ptr + index for index in xrange(self._length)
153
+ )
154
+
155
+ def num_children(self):
156
+ return self._length
157
+
158
+ @staticmethod
159
+ def display_hint():
160
+ return "array"
161
+
162
+
163
+ class StdVecDequeProvider(printer_base):
164
+ def __init__(self, valobj):
165
+ self._valobj = valobj
166
+ self._head = int(valobj["head"])
167
+ self._size = int(valobj["len"])
168
+ # BACKCOMPAT: rust 1.75
169
+ cap = valobj["buf"]["inner"]["cap"]
170
+ if cap.type.code != gdb.TYPE_CODE_INT:
171
+ cap = cap[ZERO_FIELD]
172
+ self._cap = int(cap)
173
+ self._data_ptr = unwrap_unique_or_non_null(valobj["buf"]["inner"]["ptr"])
174
+ ptr_ty = gdb.Type.pointer(valobj.type.template_argument(0))
175
+ self._data_ptr = self._data_ptr.reinterpret_cast(ptr_ty)
176
+
177
+ def to_string(self):
178
+ return "VecDeque(size={})".format(self._size)
179
+
180
+ def children(self):
181
+ return _enumerate_array_elements(
182
+ (self._data_ptr + ((self._head + index) % self._cap))
183
+ for index in xrange(self._size)
184
+ )
185
+
186
+ def num_children(self):
187
+ return self._size
188
+
189
+ @staticmethod
190
+ def display_hint():
191
+ return "array"
192
+
193
+
194
+ class StdRcProvider(printer_base):
195
+ def __init__(self, valobj, is_atomic=False):
196
+ self._valobj = valobj
197
+ self._is_atomic = is_atomic
198
+ self._ptr = unwrap_unique_or_non_null(valobj["ptr"])
199
+ self._value = self._ptr["data" if is_atomic else "value"]
200
+ self._strong = self._ptr["strong"]["v" if is_atomic else "value"]["value"]
201
+ self._weak = self._ptr["weak"]["v" if is_atomic else "value"]["value"] - 1
202
+
203
+ def to_string(self):
204
+ if self._is_atomic:
205
+ return "Arc(strong={}, weak={})".format(int(self._strong), int(self._weak))
206
+ else:
207
+ return "Rc(strong={}, weak={})".format(int(self._strong), int(self._weak))
208
+
209
+ def children(self):
210
+ yield "value", self._value
211
+ yield "strong", self._strong
212
+ yield "weak", self._weak
213
+
214
+
215
+ class StdCellProvider(printer_base):
216
+ def __init__(self, valobj):
217
+ self._value = valobj["value"]["value"]
218
+
219
+ def to_string(self):
220
+ return "Cell"
221
+
222
+ def children(self):
223
+ yield "value", self._value
224
+
225
+
226
+ class StdRefProvider(printer_base):
227
+ def __init__(self, valobj):
228
+ self._value = valobj["value"].dereference()
229
+ self._borrow = valobj["borrow"]["borrow"]["value"]["value"]
230
+
231
+ def to_string(self):
232
+ borrow = int(self._borrow)
233
+ if borrow >= 0:
234
+ return "Ref(borrow={})".format(borrow)
235
+ else:
236
+ return "Ref(borrow_mut={})".format(-borrow)
237
+
238
+ def children(self):
239
+ yield "*value", self._value
240
+ yield "borrow", self._borrow
241
+
242
+
243
+ class StdRefCellProvider(printer_base):
244
+ def __init__(self, valobj):
245
+ self._value = valobj["value"]["value"]
246
+ self._borrow = valobj["borrow"]["value"]["value"]
247
+
248
+ def to_string(self):
249
+ borrow = int(self._borrow)
250
+ if borrow >= 0:
251
+ return "RefCell(borrow={})".format(borrow)
252
+ else:
253
+ return "RefCell(borrow_mut={})".format(-borrow)
254
+
255
+ def children(self):
256
+ yield "value", self._value
257
+ yield "borrow", self._borrow
258
+
259
+
260
+ class StdNonZeroNumberProvider(printer_base):
261
+ def __init__(self, valobj):
262
+ fields = valobj.type.fields()
263
+ assert len(fields) == 1
264
+ field = fields[0]
265
+
266
+ inner_valobj = valobj[field]
267
+
268
+ inner_fields = inner_valobj.type.fields()
269
+ assert len(inner_fields) == 1
270
+ inner_field = inner_fields[0]
271
+
272
+ self._value = inner_valobj[inner_field]
273
+
274
+ def to_string(self):
275
+ return self._value
276
+
277
+
278
+ # Yields children (in a provider's sense of the word) for a BTreeMap.
279
+ def children_of_btree_map(map):
280
+ # Yields each key/value pair in the node and in any child nodes.
281
+ def children_of_node(node_ptr, height):
282
+ def cast_to_internal(node):
283
+ internal_type_name = node.type.target().name.replace(
284
+ "LeafNode", "InternalNode", 1
285
+ )
286
+ internal_type = gdb.lookup_type(internal_type_name)
287
+ return node.cast(internal_type.pointer())
288
+
289
+ if node_ptr.type.name.startswith("alloc::collections::btree::node::BoxedNode<"):
290
+ # BACKCOMPAT: rust 1.49
291
+ node_ptr = node_ptr["ptr"]
292
+ node_ptr = unwrap_unique_or_non_null(node_ptr)
293
+ leaf = node_ptr.dereference()
294
+ keys = leaf["keys"]
295
+ vals = leaf["vals"]
296
+ edges = cast_to_internal(node_ptr)["edges"] if height > 0 else None
297
+ length = leaf["len"]
298
+
299
+ for i in xrange(0, length + 1):
300
+ if height > 0:
301
+ child_ptr = edges[i]["value"]["value"][ZERO_FIELD]
302
+ for child in children_of_node(child_ptr, height - 1):
303
+ yield child
304
+ if i < length:
305
+ # Avoid "Cannot perform pointer math on incomplete type" on zero-sized arrays.
306
+ key_type_size = keys.type.sizeof
307
+ val_type_size = vals.type.sizeof
308
+ key = (
309
+ keys[i]["value"]["value"][ZERO_FIELD]
310
+ if key_type_size > 0
311
+ else gdb.parse_and_eval("()")
312
+ )
313
+ val = (
314
+ vals[i]["value"]["value"][ZERO_FIELD]
315
+ if val_type_size > 0
316
+ else gdb.parse_and_eval("()")
317
+ )
318
+ yield key, val
319
+
320
+ if map["length"] > 0:
321
+ root = map["root"]
322
+ if root.type.name.startswith("core::option::Option<"):
323
+ root = root.cast(gdb.lookup_type(root.type.name[21:-1]))
324
+ node_ptr = root["node"]
325
+ height = root["height"]
326
+ for child in children_of_node(node_ptr, height):
327
+ yield child
328
+
329
+
330
+ class StdBTreeSetProvider(printer_base):
331
+ def __init__(self, valobj):
332
+ self._valobj = valobj
333
+
334
+ def to_string(self):
335
+ return "BTreeSet(size={})".format(self._valobj["map"]["length"])
336
+
337
+ def children(self):
338
+ inner_map = self._valobj["map"]
339
+ for i, (child, _) in enumerate(children_of_btree_map(inner_map)):
340
+ yield "[{}]".format(i), child
341
+
342
+ @staticmethod
343
+ def display_hint():
344
+ return "array"
345
+
346
+
347
+ class StdBTreeMapProvider(printer_base):
348
+ def __init__(self, valobj):
349
+ self._valobj = valobj
350
+
351
+ def to_string(self):
352
+ return "BTreeMap(size={})".format(self._valobj["length"])
353
+
354
+ def children(self):
355
+ for i, (key, val) in enumerate(children_of_btree_map(self._valobj)):
356
+ yield "key{}".format(i), key
357
+ yield "val{}".format(i), val
358
+
359
+ @staticmethod
360
+ def display_hint():
361
+ return "map"
362
+
363
+
364
+ # BACKCOMPAT: rust 1.35
365
+ class StdOldHashMapProvider(printer_base):
366
+ def __init__(self, valobj, show_values=True):
367
+ self._valobj = valobj
368
+ self._show_values = show_values
369
+
370
+ self._table = self._valobj["table"]
371
+ self._size = int(self._table["size"])
372
+ self._hashes = self._table["hashes"]
373
+ self._hash_uint_type = self._hashes.type
374
+ self._hash_uint_size = self._hashes.type.sizeof
375
+ self._modulo = 2**self._hash_uint_size
376
+ self._data_ptr = self._hashes[ZERO_FIELD]["pointer"]
377
+
378
+ self._capacity_mask = int(self._table["capacity_mask"])
379
+ self._capacity = (self._capacity_mask + 1) % self._modulo
380
+
381
+ marker = self._table["marker"].type
382
+ self._pair_type = marker.template_argument(0)
383
+ self._pair_type_size = self._pair_type.sizeof
384
+
385
+ self._valid_indices = []
386
+ for idx in range(self._capacity):
387
+ data_ptr = self._data_ptr.cast(self._hash_uint_type.pointer())
388
+ address = data_ptr + idx
389
+ hash_uint = address.dereference()
390
+ hash_ptr = hash_uint[ZERO_FIELD]["pointer"]
391
+ if int(hash_ptr) != 0:
392
+ self._valid_indices.append(idx)
393
+
394
+ def to_string(self):
395
+ if self._show_values:
396
+ return "HashMap(size={})".format(self._size)
397
+ else:
398
+ return "HashSet(size={})".format(self._size)
399
+
400
+ def children(self):
401
+ start = int(self._data_ptr) & ~1
402
+
403
+ hashes = self._hash_uint_size * self._capacity
404
+ align = self._pair_type_size
405
+ len_rounded_up = (
406
+ (
407
+ (((hashes + align) % self._modulo - 1) % self._modulo)
408
+ & ~((align - 1) % self._modulo)
409
+ )
410
+ % self._modulo
411
+ - hashes
412
+ ) % self._modulo
413
+
414
+ pairs_offset = hashes + len_rounded_up
415
+ pairs_start = gdb.Value(start + pairs_offset).cast(self._pair_type.pointer())
416
+
417
+ for index in range(self._size):
418
+ table_index = self._valid_indices[index]
419
+ idx = table_index & self._capacity_mask
420
+ element = (pairs_start + idx).dereference()
421
+ if self._show_values:
422
+ yield "key{}".format(index), element[ZERO_FIELD]
423
+ yield "val{}".format(index), element[FIRST_FIELD]
424
+ else:
425
+ yield "[{}]".format(index), element[ZERO_FIELD]
426
+
427
+ def display_hint(self):
428
+ return "map" if self._show_values else "array"
429
+
430
+
431
+ class StdHashMapProvider(printer_base):
432
+ def __init__(self, valobj, show_values=True):
433
+ self._valobj = valobj
434
+ self._show_values = show_values
435
+
436
+ table = self._table()
437
+ table_inner = table["table"]
438
+ capacity = int(table_inner["bucket_mask"]) + 1
439
+ ctrl = table_inner["ctrl"]["pointer"]
440
+
441
+ self._size = int(table_inner["items"])
442
+ self._pair_type = table.type.template_argument(0).strip_typedefs()
443
+
444
+ self._new_layout = not table_inner.type.has_key("data")
445
+ if self._new_layout:
446
+ self._data_ptr = ctrl.cast(self._pair_type.pointer())
447
+ else:
448
+ self._data_ptr = table_inner["data"]["pointer"]
449
+
450
+ self._valid_indices = []
451
+ for idx in range(capacity):
452
+ address = ctrl + idx
453
+ value = address.dereference()
454
+ is_presented = value & 128 == 0
455
+ if is_presented:
456
+ self._valid_indices.append(idx)
457
+
458
+ def _table(self):
459
+ if self._show_values:
460
+ hashbrown_hashmap = self._valobj["base"]
461
+ elif self._valobj.type.fields()[0].name == "map":
462
+ # BACKCOMPAT: rust 1.47
463
+ # HashSet wraps std::collections::HashMap, which wraps hashbrown::HashMap
464
+ hashbrown_hashmap = self._valobj["map"]["base"]
465
+ else:
466
+ # HashSet wraps hashbrown::HashSet, which wraps hashbrown::HashMap
467
+ hashbrown_hashmap = self._valobj["base"]["map"]
468
+ return hashbrown_hashmap["table"]
469
+
470
+ def to_string(self):
471
+ if self._show_values:
472
+ return "HashMap(size={})".format(self._size)
473
+ else:
474
+ return "HashSet(size={})".format(self._size)
475
+
476
+ def children(self):
477
+ pairs_start = self._data_ptr
478
+
479
+ for index in range(self._size):
480
+ idx = self._valid_indices[index]
481
+ if self._new_layout:
482
+ idx = -(idx + 1)
483
+ element = (pairs_start + idx).dereference()
484
+ if self._show_values:
485
+ yield "key{}".format(index), element[ZERO_FIELD]
486
+ yield "val{}".format(index), element[FIRST_FIELD]
487
+ else:
488
+ yield "[{}]".format(index), element[ZERO_FIELD]
489
+
490
+ def num_children(self):
491
+ result = self._size
492
+ if self._show_values:
493
+ result *= 2
494
+ return result
495
+
496
+ def display_hint(self):
497
+ return "map" if self._show_values else "array"
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/intrinsic.natvis ADDED
@@ -0,0 +1,372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
3
+ <Type Name="ref$&lt;str$&gt;">
4
+ <AlternativeType Name="ref_mut$&lt;str$&gt;" />
5
+ <AlternativeType Name="ptr_const$&lt;str$&gt;" />
6
+ <AlternativeType Name="ptr_mut$&lt;str$&gt;" />
7
+
8
+ <DisplayString>{(char*)data_ptr,[length]s8}</DisplayString>
9
+ <StringView>(char*)data_ptr,[length]s8</StringView>
10
+ <Expand>
11
+ <Item Name="[len]" ExcludeView="simple">length</Item>
12
+ <Synthetic Name="[chars]">
13
+ <Expand>
14
+ <ArrayItems>
15
+ <Size>length</Size>
16
+ <ValuePointer>data_ptr</ValuePointer>
17
+ </ArrayItems>
18
+ </Expand>
19
+ </Synthetic>
20
+ </Expand>
21
+ </Type>
22
+ <Type Name="ref$&lt;slice2$&lt;*&gt; &gt;">
23
+ <AlternativeType Name="ref_mut$&lt;slice2$&lt;*&gt; &gt;" />
24
+ <AlternativeType Name="ptr_const$&lt;slice2$&lt;*&gt; &gt;" />
25
+ <AlternativeType Name="ptr_mut$&lt;slice2$&lt;*&gt; &gt;" />
26
+
27
+ <DisplayString>{{ len={length} }}</DisplayString>
28
+ <Expand>
29
+ <Item Name="[len]" ExcludeView="simple">length</Item>
30
+ <ArrayItems>
31
+ <Size>length</Size>
32
+ <ValuePointer>data_ptr</ValuePointer>
33
+ </ArrayItems>
34
+ </Expand>
35
+ </Type>
36
+ <Type Name="f16">
37
+ <Intrinsic Name="sign_mask" Expression="(unsigned __int16) 0x8000" />
38
+ <Intrinsic Name="exponent_mask" Expression="(unsigned __int16) 0x7c00" />
39
+ <Intrinsic Name="significand_mask" Expression="(unsigned __int16) 0x03ff" />
40
+ <Intrinsic Name="sign_bit" Expression="(unsigned __int16) (bits &amp; sign_mask())" />
41
+ <Intrinsic Name="exponent_bits" Expression="(unsigned __int16) (bits &amp; exponent_mask())" />
42
+ <Intrinsic Name="significand_bits" Expression="(unsigned __int16) (bits &amp; significand_mask())" />
43
+
44
+ <Intrinsic Name="if_set" Expression="(bits &amp; mask) != 0 ? value : 1.0">
45
+ <Parameter Name="mask" Type="unsigned __int16" />
46
+ <Parameter Name="value" Type="float" />
47
+ </Intrinsic>
48
+ <!-- Calculates 2**exp without needing a pow function. Each float in if_set() is the square of the previous float. 32768 == 2.pow(bias), bias == 15 -->
49
+ <Intrinsic Name="two_pow_exponent" Expression="if_set(0x0400, 2.0) * if_set(0x0800, 4.0) * if_set(0x1000, 16.0) * if_set(0x2000, 256.0) * if_set(0x4000, 65536.0) / 32768.0" />
50
+ <!-- Calculates 0.significand, without any implicit bit. 1024 == 2.pow(explicit significand width), explicit significand width == 10 -->
51
+ <Intrinsic Name="raw_significand" Expression="((float) significand_bits()) / 1024.0" />
52
+ <Intrinsic Name="sign" Expression="sign_bit() == 0 ? 1.0 : -1.0" />
53
+
54
+ <DisplayString Condition="bits == 0x7c00">inf</DisplayString>
55
+ <DisplayString Condition="bits == 0xfc00">-inf</DisplayString>
56
+ <DisplayString Condition="exponent_bits() == exponent_mask()">NaN</DisplayString>
57
+ <!-- Subnormal or zero (16384 == 2.pow(bias - 1), bias - 1 == 14) -->
58
+ <DisplayString Condition="exponent_bits() == 0">{(float) (sign() * raw_significand() / 16384.0)}</DisplayString>
59
+ <!-- Normal -->
60
+ <DisplayString>{(float) (sign() * (raw_significand() + 1.0) * two_pow_exponent())}</DisplayString>
61
+ </Type>
62
+ <Type Name="tuple$&lt;&gt;">
63
+ <DisplayString>()</DisplayString>
64
+ </Type>
65
+ <Type Name="tuple$&lt;*&gt;">
66
+ <DisplayString>({__0})</DisplayString>
67
+ <Expand>
68
+ <Item Name="[0]">__0</Item>
69
+ </Expand>
70
+ </Type>
71
+ <Type Name="tuple$&lt;*,*&gt;">
72
+ <DisplayString>({__0}, {__1})</DisplayString>
73
+ <Expand>
74
+ <Item Name="[0]">__0</Item>
75
+ <Item Name="[1]">__1</Item>
76
+ </Expand>
77
+ </Type>
78
+ <Type Name="tuple$&lt;*,*,*&gt;">
79
+ <DisplayString>({__0}, {__1}, {__2})</DisplayString>
80
+ <Expand>
81
+ <Item Name="[0]">__0</Item>
82
+ <Item Name="[1]">__1</Item>
83
+ <Item Name="[2]">__2</Item>
84
+ </Expand>
85
+ </Type>
86
+ <Type Name="tuple$&lt;*,*,*,*&gt;">
87
+ <DisplayString>({__0}, {__1}, {__2}, {__3})</DisplayString>
88
+ <Expand>
89
+ <Item Name="[0]">__0</Item>
90
+ <Item Name="[1]">__1</Item>
91
+ <Item Name="[2]">__2</Item>
92
+ <Item Name="[3]">__3</Item>
93
+ </Expand>
94
+ </Type>
95
+ <Type Name="tuple$&lt;*,*,*,*,*&gt;">
96
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4})</DisplayString>
97
+ <Expand>
98
+ <Item Name="[0]">__0</Item>
99
+ <Item Name="[1]">__1</Item>
100
+ <Item Name="[2]">__2</Item>
101
+ <Item Name="[3]">__3</Item>
102
+ <Item Name="[4]">__4</Item>
103
+ </Expand>
104
+ </Type>
105
+ <Type Name="tuple$&lt;*,*,*,*,*,*&gt;">
106
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5})</DisplayString>
107
+ <Expand>
108
+ <Item Name="[0]">__0</Item>
109
+ <Item Name="[1]">__1</Item>
110
+ <Item Name="[2]">__2</Item>
111
+ <Item Name="[3]">__3</Item>
112
+ <Item Name="[4]">__4</Item>
113
+ <Item Name="[5]">__5</Item>
114
+ </Expand>
115
+ </Type>
116
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*&gt;">
117
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6})</DisplayString>
118
+ <Expand>
119
+ <Item Name="[0]">__0</Item>
120
+ <Item Name="[1]">__1</Item>
121
+ <Item Name="[2]">__2</Item>
122
+ <Item Name="[3]">__3</Item>
123
+ <Item Name="[4]">__4</Item>
124
+ <Item Name="[5]">__5</Item>
125
+ <Item Name="[6]">__6</Item>
126
+ </Expand>
127
+ </Type>
128
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*,*&gt;">
129
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7})</DisplayString>
130
+ <Expand>
131
+ <Item Name="[0]">__0</Item>
132
+ <Item Name="[1]">__1</Item>
133
+ <Item Name="[2]">__2</Item>
134
+ <Item Name="[3]">__3</Item>
135
+ <Item Name="[4]">__4</Item>
136
+ <Item Name="[5]">__5</Item>
137
+ <Item Name="[6]">__6</Item>
138
+ <Item Name="[7]">__7</Item>
139
+ </Expand>
140
+ </Type>
141
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*,*,*&gt;">
142
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7}, {__8})</DisplayString>
143
+ <Expand>
144
+ <Item Name="[0]">__0</Item>
145
+ <Item Name="[1]">__1</Item>
146
+ <Item Name="[2]">__2</Item>
147
+ <Item Name="[3]">__3</Item>
148
+ <Item Name="[4]">__4</Item>
149
+ <Item Name="[5]">__5</Item>
150
+ <Item Name="[6]">__6</Item>
151
+ <Item Name="[7]">__7</Item>
152
+ <Item Name="[8]">__8</Item>
153
+ </Expand>
154
+ </Type>
155
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*,*,*,*&gt;">
156
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7}, {__8}, {__9})</DisplayString>
157
+ <Expand>
158
+ <Item Name="[0]">__0</Item>
159
+ <Item Name="[1]">__1</Item>
160
+ <Item Name="[2]">__2</Item>
161
+ <Item Name="[3]">__3</Item>
162
+ <Item Name="[4]">__4</Item>
163
+ <Item Name="[5]">__5</Item>
164
+ <Item Name="[6]">__6</Item>
165
+ <Item Name="[7]">__7</Item>
166
+ <Item Name="[8]">__8</Item>
167
+ <Item Name="[9]">__9</Item>
168
+ </Expand>
169
+ </Type>
170
+ <Type Name="tuple$&lt;*,*,*,*,*,*,*,*,*,*,*&gt;">
171
+ <DisplayString>({__0}, {__1}, {__2}, {__3}, {__4}, {__5}, {__6}, {__7}, {__8}, {__9}, ...)</DisplayString>
172
+ <Expand>
173
+ <Item Name="[0]">__0</Item>
174
+ <Item Name="[1]">__1</Item>
175
+ <Item Name="[2]">__2</Item>
176
+ <Item Name="[3]">__3</Item>
177
+ <Item Name="[4]">__4</Item>
178
+ <Item Name="[5]">__5</Item>
179
+ <Item Name="[6]">__6</Item>
180
+ <Item Name="[7]">__7</Item>
181
+ <Item Name="[8]">__8</Item>
182
+ <Item Name="[9]">__9</Item>
183
+ <Synthetic Name="[...]"><DisplayString>...</DisplayString></Synthetic>
184
+ </Expand>
185
+ </Type>
186
+
187
+ <!--
188
+ This is the visualizer for all enums. It takes care of selecting the active variant.
189
+ See `compiler\rustc_codegen_llvm\src\debuginfo\metadata\enums\cpp_like.rs` for more information.
190
+ -->
191
+ <Type Name="enum2$&lt;*&gt;">
192
+ <!-- NOTE: That tag ranges can wrap around, in which case `end` is less than `begin` and we
193
+ have to do a different check -->
194
+ <Intrinsic Name="in_range" Expression="(begin &lt;= end) ? ((x &gt;= begin) &amp;&amp; (x &lt;= end)) : ((x &gt;= begin) || (x &lt;= end))">
195
+ <Parameter Name="x" Type="unsigned __int64" />
196
+ <Parameter Name="begin" Type="unsigned __int64" />
197
+ <Parameter Name="end" Type="unsigned __int64" />
198
+ </Intrinsic>
199
+
200
+ <Intrinsic Name="eq128" Expression="(x_hi == y_hi) &amp;&amp; (x_lo == y_lo)">
201
+ <Parameter Name="x_hi" Type="unsigned __int64" />
202
+ <Parameter Name="x_lo" Type="unsigned __int64" />
203
+ <Parameter Name="y_hi" Type="unsigned __int64" />
204
+ <Parameter Name="y_lo" Type="unsigned __int64" />
205
+ </Intrinsic>
206
+
207
+ <Intrinsic Name="lt128" Expression="(x_hi &lt; y_hi) || ((x_hi == y_hi) &amp;&amp; (x_lo &lt; y_lo))">
208
+ <Parameter Name="x_hi" Type="unsigned __int64" />
209
+ <Parameter Name="x_lo" Type="unsigned __int64" />
210
+ <Parameter Name="y_hi" Type="unsigned __int64" />
211
+ <Parameter Name="y_lo" Type="unsigned __int64" />
212
+ </Intrinsic>
213
+
214
+ <Intrinsic Name="lt_or_eq128" Expression="((x_hi == y_hi) &amp;&amp; (x_lo == y_lo)) || lt128(x_hi, x_lo, y_hi, y_lo)">
215
+ <Parameter Name="x_hi" Type="unsigned __int64" />
216
+ <Parameter Name="x_lo" Type="unsigned __int64" />
217
+ <Parameter Name="y_hi" Type="unsigned __int64" />
218
+ <Parameter Name="y_lo" Type="unsigned __int64" />
219
+ </Intrinsic>
220
+
221
+ <!-- NOTE: That tag ranges can wrap around, in which case `end` is less than `begin` and we
222
+ have to do a different check -->
223
+ <Intrinsic Name="in_range128" Expression="(lt_or_eq128(begin_hi, begin_lo, end_hi, end_lo)) ?
224
+ (lt_or_eq128(begin_hi, begin_lo, x_hi, x_lo) &amp;&amp; lt_or_eq128(x_hi, x_lo, end_hi, end_lo)) :
225
+ (lt_or_eq128(begin_hi, begin_lo, x_hi, x_lo) || lt_or_eq128(x_hi, x_lo, end_hi, end_lo))">
226
+ <Parameter Name="x_hi" Type="unsigned __int64" />
227
+ <Parameter Name="x_lo" Type="unsigned __int64" />
228
+ <Parameter Name="begin_hi" Type="unsigned __int64" />
229
+ <Parameter Name="begin_lo" Type="unsigned __int64" />
230
+ <Parameter Name="end_hi" Type="unsigned __int64" />
231
+ <Parameter Name="end_lo" Type="unsigned __int64" />
232
+ </Intrinsic>
233
+
234
+ <DisplayString Condition="tag == variant0.DISCR_EXACT" Optional="true">{variant0.NAME,en}</DisplayString>
235
+ <DisplayString Condition="tag == variant1.DISCR_EXACT" Optional="true">{variant1.NAME,en}</DisplayString>
236
+ <DisplayString Condition="tag == variant2.DISCR_EXACT" Optional="true">{variant2.NAME,en}</DisplayString>
237
+ <DisplayString Condition="tag == variant3.DISCR_EXACT" Optional="true">{variant3.NAME,en}</DisplayString>
238
+ <DisplayString Condition="tag == variant4.DISCR_EXACT" Optional="true">{variant4.NAME,en}</DisplayString>
239
+ <DisplayString Condition="tag == variant5.DISCR_EXACT" Optional="true">{variant5.NAME,en}</DisplayString>
240
+ <DisplayString Condition="tag == variant6.DISCR_EXACT" Optional="true">{variant6.NAME,en}</DisplayString>
241
+ <DisplayString Condition="tag == variant7.DISCR_EXACT" Optional="true">{variant7.NAME,en}</DisplayString>
242
+ <DisplayString Condition="tag == variant8.DISCR_EXACT" Optional="true">{variant8.NAME,en}</DisplayString>
243
+ <DisplayString Condition="tag == variant9.DISCR_EXACT" Optional="true">{variant9.NAME,en}</DisplayString>
244
+ <DisplayString Condition="tag == variant10.DISCR_EXACT" Optional="true">{variant10.NAME,en}</DisplayString>
245
+ <DisplayString Condition="tag == variant11.DISCR_EXACT" Optional="true">{variant11.NAME,en}</DisplayString>
246
+ <DisplayString Condition="tag == variant12.DISCR_EXACT" Optional="true">{variant12.NAME,en}</DisplayString>
247
+ <DisplayString Condition="tag == variant13.DISCR_EXACT" Optional="true">{variant13.NAME,en}</DisplayString>
248
+ <DisplayString Condition="tag == variant14.DISCR_EXACT" Optional="true">{variant14.NAME,en}</DisplayString>
249
+ <DisplayString Condition="tag == variant15.DISCR_EXACT" Optional="true">{variant15.NAME,en}</DisplayString>
250
+
251
+ <DisplayString Condition="in_range(tag, variant0.DISCR_BEGIN, variant0.DISCR_END)" Optional="true">{variant0.NAME,en}</DisplayString>
252
+ <DisplayString Condition="in_range(tag, variant1.DISCR_BEGIN, variant1.DISCR_END)" Optional="true">{variant1.NAME,en}</DisplayString>
253
+ <DisplayString Condition="in_range(tag, variant2.DISCR_BEGIN, variant2.DISCR_END)" Optional="true">{variant2.NAME,en}</DisplayString>
254
+ <DisplayString Condition="in_range(tag, variant3.DISCR_BEGIN, variant3.DISCR_END)" Optional="true">{variant3.NAME,en}</DisplayString>
255
+ <DisplayString Condition="in_range(tag, variant4.DISCR_BEGIN, variant4.DISCR_END)" Optional="true">{variant4.NAME,en}</DisplayString>
256
+ <DisplayString Condition="in_range(tag, variant5.DISCR_BEGIN, variant5.DISCR_END)" Optional="true">{variant5.NAME,en}</DisplayString>
257
+ <DisplayString Condition="in_range(tag, variant6.DISCR_BEGIN, variant6.DISCR_END)" Optional="true">{variant6.NAME,en}</DisplayString>
258
+ <DisplayString Condition="in_range(tag, variant7.DISCR_BEGIN, variant7.DISCR_END)" Optional="true">{variant7.NAME,en}</DisplayString>
259
+ <DisplayString Condition="in_range(tag, variant8.DISCR_BEGIN, variant8.DISCR_END)" Optional="true">{variant8.NAME,en}</DisplayString>
260
+ <DisplayString Condition="in_range(tag, variant9.DISCR_BEGIN, variant9.DISCR_END)" Optional="true">{variant9.NAME,en}</DisplayString>
261
+ <DisplayString Condition="in_range(tag, variant10.DISCR_BEGIN, variant10.DISCR_END)" Optional="true">{variant10.NAME,en}</DisplayString>
262
+ <DisplayString Condition="in_range(tag, variant11.DISCR_BEGIN, variant11.DISCR_END)" Optional="true">{variant11.NAME,en}</DisplayString>
263
+ <DisplayString Condition="in_range(tag, variant12.DISCR_BEGIN, variant12.DISCR_END)" Optional="true">{variant12.NAME,en}</DisplayString>
264
+ <DisplayString Condition="in_range(tag, variant13.DISCR_BEGIN, variant13.DISCR_END)" Optional="true">{variant13.NAME,en}</DisplayString>
265
+ <DisplayString Condition="in_range(tag, variant14.DISCR_BEGIN, variant14.DISCR_END)" Optional="true">{variant14.NAME,en}</DisplayString>
266
+ <DisplayString Condition="in_range(tag, variant15.DISCR_BEGIN, variant15.DISCR_END)" Optional="true">{variant15.NAME,en}</DisplayString>
267
+
268
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant0.DISCR128_EXACT_HI, variant0.DISCR128_EXACT_LO)" Optional="true">{variant0.NAME,en}</DisplayString>
269
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant1.DISCR128_EXACT_HI, variant1.DISCR128_EXACT_LO)" Optional="true">{variant1.NAME,en}</DisplayString>
270
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant2.DISCR128_EXACT_HI, variant2.DISCR128_EXACT_LO)" Optional="true">{variant2.NAME,en}</DisplayString>
271
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant3.DISCR128_EXACT_HI, variant3.DISCR128_EXACT_LO)" Optional="true">{variant3.NAME,en}</DisplayString>
272
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant4.DISCR128_EXACT_HI, variant4.DISCR128_EXACT_LO)" Optional="true">{variant4.NAME,en}</DisplayString>
273
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant5.DISCR128_EXACT_HI, variant5.DISCR128_EXACT_LO)" Optional="true">{variant5.NAME,en}</DisplayString>
274
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant6.DISCR128_EXACT_HI, variant6.DISCR128_EXACT_LO)" Optional="true">{variant6.NAME,en}</DisplayString>
275
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant7.DISCR128_EXACT_HI, variant7.DISCR128_EXACT_LO)" Optional="true">{variant7.NAME,en}</DisplayString>
276
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant8.DISCR128_EXACT_HI, variant8.DISCR128_EXACT_LO)" Optional="true">{variant8.NAME,en}</DisplayString>
277
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant9.DISCR128_EXACT_HI, variant9.DISCR128_EXACT_LO)" Optional="true">{variant9.NAME,en}</DisplayString>
278
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant10.DISCR128_EXACT_HI, variant10.DISCR128_EXACT_LO)" Optional="true">{variant10.NAME,en}</DisplayString>
279
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant11.DISCR128_EXACT_HI, variant11.DISCR128_EXACT_LO)" Optional="true">{variant11.NAME,en}</DisplayString>
280
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant12.DISCR128_EXACT_HI, variant12.DISCR128_EXACT_LO)" Optional="true">{variant12.NAME,en}</DisplayString>
281
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant13.DISCR128_EXACT_HI, variant13.DISCR128_EXACT_LO)" Optional="true">{variant13.NAME,en}</DisplayString>
282
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant14.DISCR128_EXACT_HI, variant14.DISCR128_EXACT_LO)" Optional="true">{variant14.NAME,en}</DisplayString>
283
+ <DisplayString Condition="eq128(tag128_hi, tag128_lo, variant15.DISCR128_EXACT_HI, variant15.DISCR128_EXACT_LO)" Optional="true">{variant15.NAME,en}</DisplayString>
284
+
285
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant0.DISCR128_BEGIN_HI, variant0.DISCR128_BEGIN_LO, variant0.DISCR128_END_HI, variant0.DISCR128_END_LO)" Optional="true">{variant0.NAME,en}</DisplayString>
286
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant1.DISCR128_BEGIN_HI, variant1.DISCR128_BEGIN_LO, variant1.DISCR128_END_HI, variant1.DISCR128_END_LO)" Optional="true">{variant1.NAME,en}</DisplayString>
287
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant2.DISCR128_BEGIN_HI, variant2.DISCR128_BEGIN_LO, variant2.DISCR128_END_HI, variant2.DISCR128_END_LO)" Optional="true">{variant2.NAME,en}</DisplayString>
288
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant3.DISCR128_BEGIN_HI, variant3.DISCR128_BEGIN_LO, variant3.DISCR128_END_HI, variant3.DISCR128_END_LO)" Optional="true">{variant3.NAME,en}</DisplayString>
289
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant4.DISCR128_BEGIN_HI, variant4.DISCR128_BEGIN_LO, variant4.DISCR128_END_HI, variant4.DISCR128_END_LO)" Optional="true">{variant4.NAME,en}</DisplayString>
290
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant5.DISCR128_BEGIN_HI, variant5.DISCR128_BEGIN_LO, variant5.DISCR128_END_HI, variant5.DISCR128_END_LO)" Optional="true">{variant5.NAME,en}</DisplayString>
291
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant6.DISCR128_BEGIN_HI, variant6.DISCR128_BEGIN_LO, variant6.DISCR128_END_HI, variant6.DISCR128_END_LO)" Optional="true">{variant6.NAME,en}</DisplayString>
292
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant7.DISCR128_BEGIN_HI, variant7.DISCR128_BEGIN_LO, variant7.DISCR128_END_HI, variant7.DISCR128_END_LO)" Optional="true">{variant7.NAME,en}</DisplayString>
293
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant8.DISCR128_BEGIN_HI, variant8.DISCR128_BEGIN_LO, variant8.DISCR128_END_HI, variant8.DISCR128_END_LO)" Optional="true">{variant8.NAME,en}</DisplayString>
294
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant9.DISCR128_BEGIN_HI, variant9.DISCR128_BEGIN_LO, variant9.DISCR128_END_HI, variant9.DISCR128_END_LO)" Optional="true">{variant9.NAME,en}</DisplayString>
295
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant10.DISCR128_BEGIN_HI, variant10.DISCR128_BEGIN_LO, variant10.DISCR128_END_HI, variant10.DISCR128_END_LO)" Optional="true">{variant10.NAME,en}</DisplayString>
296
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant11.DISCR128_BEGIN_HI, variant11.DISCR128_BEGIN_LO, variant11.DISCR128_END_HI, variant11.DISCR128_END_LO)" Optional="true">{variant11.NAME,en}</DisplayString>
297
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant12.DISCR128_BEGIN_HI, variant12.DISCR128_BEGIN_LO, variant12.DISCR128_END_HI, variant12.DISCR128_END_LO)" Optional="true">{variant12.NAME,en}</DisplayString>
298
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant13.DISCR128_BEGIN_HI, variant13.DISCR128_BEGIN_LO, variant13.DISCR128_END_HI, variant13.DISCR128_END_LO)" Optional="true">{variant13.NAME,en}</DisplayString>
299
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant14.DISCR128_BEGIN_HI, variant14.DISCR128_BEGIN_LO, variant14.DISCR128_END_HI, variant14.DISCR128_END_LO)" Optional="true">{variant14.NAME,en}</DisplayString>
300
+ <DisplayString Condition="in_range128(tag128_hi, tag128_lo, variant15.DISCR128_BEGIN_HI, variant15.DISCR128_BEGIN_LO, variant15.DISCR128_END_HI, variant15.DISCR128_END_LO)" Optional="true">{variant15.NAME,en}</DisplayString>
301
+
302
+ <Expand HideRawView="true">
303
+ <ExpandedItem Condition="tag == variant0.DISCR_EXACT" Optional="true">variant0.value</ExpandedItem>
304
+ <ExpandedItem Condition="tag == variant1.DISCR_EXACT" Optional="true">variant1.value</ExpandedItem>
305
+ <ExpandedItem Condition="tag == variant2.DISCR_EXACT" Optional="true">variant2.value</ExpandedItem>
306
+ <ExpandedItem Condition="tag == variant3.DISCR_EXACT" Optional="true">variant3.value</ExpandedItem>
307
+ <ExpandedItem Condition="tag == variant4.DISCR_EXACT" Optional="true">variant4.value</ExpandedItem>
308
+ <ExpandedItem Condition="tag == variant5.DISCR_EXACT" Optional="true">variant5.value</ExpandedItem>
309
+ <ExpandedItem Condition="tag == variant6.DISCR_EXACT" Optional="true">variant6.value</ExpandedItem>
310
+ <ExpandedItem Condition="tag == variant7.DISCR_EXACT" Optional="true">variant7.value</ExpandedItem>
311
+ <ExpandedItem Condition="tag == variant8.DISCR_EXACT" Optional="true">variant8.value</ExpandedItem>
312
+ <ExpandedItem Condition="tag == variant9.DISCR_EXACT" Optional="true">variant9.value</ExpandedItem>
313
+ <ExpandedItem Condition="tag == variant10.DISCR_EXACT" Optional="true">variant10.value</ExpandedItem>
314
+ <ExpandedItem Condition="tag == variant11.DISCR_EXACT" Optional="true">variant11.value</ExpandedItem>
315
+ <ExpandedItem Condition="tag == variant12.DISCR_EXACT" Optional="true">variant12.value</ExpandedItem>
316
+ <ExpandedItem Condition="tag == variant13.DISCR_EXACT" Optional="true">variant13.value</ExpandedItem>
317
+ <ExpandedItem Condition="tag == variant14.DISCR_EXACT" Optional="true">variant14.value</ExpandedItem>
318
+ <ExpandedItem Condition="tag == variant15.DISCR_EXACT" Optional="true">variant15.value</ExpandedItem>
319
+
320
+ <ExpandedItem Condition="in_range(tag, variant0.DISCR_BEGIN, variant0.DISCR_END)" Optional="true">variant0.value</ExpandedItem>
321
+ <ExpandedItem Condition="in_range(tag, variant1.DISCR_BEGIN, variant1.DISCR_END)" Optional="true">variant1.value</ExpandedItem>
322
+ <ExpandedItem Condition="in_range(tag, variant2.DISCR_BEGIN, variant2.DISCR_END)" Optional="true">variant2.value</ExpandedItem>
323
+ <ExpandedItem Condition="in_range(tag, variant3.DISCR_BEGIN, variant3.DISCR_END)" Optional="true">variant3.value</ExpandedItem>
324
+ <ExpandedItem Condition="in_range(tag, variant4.DISCR_BEGIN, variant4.DISCR_END)" Optional="true">variant4.value</ExpandedItem>
325
+ <ExpandedItem Condition="in_range(tag, variant5.DISCR_BEGIN, variant5.DISCR_END)" Optional="true">variant5.value</ExpandedItem>
326
+ <ExpandedItem Condition="in_range(tag, variant6.DISCR_BEGIN, variant6.DISCR_END)" Optional="true">variant6.value</ExpandedItem>
327
+ <ExpandedItem Condition="in_range(tag, variant7.DISCR_BEGIN, variant7.DISCR_END)" Optional="true">variant7.value</ExpandedItem>
328
+ <ExpandedItem Condition="in_range(tag, variant8.DISCR_BEGIN, variant8.DISCR_END)" Optional="true">variant8.value</ExpandedItem>
329
+ <ExpandedItem Condition="in_range(tag, variant9.DISCR_BEGIN, variant9.DISCR_END)" Optional="true">variant9.value</ExpandedItem>
330
+ <ExpandedItem Condition="in_range(tag, variant10.DISCR_BEGIN, variant10.DISCR_END)" Optional="true">variant10.value</ExpandedItem>
331
+ <ExpandedItem Condition="in_range(tag, variant11.DISCR_BEGIN, variant11.DISCR_END)" Optional="true">variant11.value</ExpandedItem>
332
+ <ExpandedItem Condition="in_range(tag, variant12.DISCR_BEGIN, variant12.DISCR_END)" Optional="true">variant12.value</ExpandedItem>
333
+ <ExpandedItem Condition="in_range(tag, variant13.DISCR_BEGIN, variant13.DISCR_END)" Optional="true">variant13.value</ExpandedItem>
334
+ <ExpandedItem Condition="in_range(tag, variant14.DISCR_BEGIN, variant14.DISCR_END)" Optional="true">variant14.value</ExpandedItem>
335
+ <ExpandedItem Condition="in_range(tag, variant15.DISCR_BEGIN, variant15.DISCR_END)" Optional="true">variant15.value</ExpandedItem>
336
+
337
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant0.DISCR128_EXACT_HI, variant0.DISCR128_EXACT_LO)" Optional="true">variant0.value</ExpandedItem>
338
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant1.DISCR128_EXACT_HI, variant1.DISCR128_EXACT_LO)" Optional="true">variant1.value</ExpandedItem>
339
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant2.DISCR128_EXACT_HI, variant2.DISCR128_EXACT_LO)" Optional="true">variant2.value</ExpandedItem>
340
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant3.DISCR128_EXACT_HI, variant3.DISCR128_EXACT_LO)" Optional="true">variant3.value</ExpandedItem>
341
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant4.DISCR128_EXACT_HI, variant4.DISCR128_EXACT_LO)" Optional="true">variant4.value</ExpandedItem>
342
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant5.DISCR128_EXACT_HI, variant5.DISCR128_EXACT_LO)" Optional="true">variant5.value</ExpandedItem>
343
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant6.DISCR128_EXACT_HI, variant6.DISCR128_EXACT_LO)" Optional="true">variant6.value</ExpandedItem>
344
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant7.DISCR128_EXACT_HI, variant7.DISCR128_EXACT_LO)" Optional="true">variant7.value</ExpandedItem>
345
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant8.DISCR128_EXACT_HI, variant8.DISCR128_EXACT_LO)" Optional="true">variant8.value</ExpandedItem>
346
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant9.DISCR128_EXACT_HI, variant9.DISCR128_EXACT_LO)" Optional="true">variant9.value</ExpandedItem>
347
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant10.DISCR128_EXACT_HI, variant10.DISCR128_EXACT_LO)" Optional="true">variant10.value</ExpandedItem>
348
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant11.DISCR128_EXACT_HI, variant11.DISCR128_EXACT_LO)" Optional="true">variant11.value</ExpandedItem>
349
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant12.DISCR128_EXACT_HI, variant12.DISCR128_EXACT_LO)" Optional="true">variant12.value</ExpandedItem>
350
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant13.DISCR128_EXACT_HI, variant13.DISCR128_EXACT_LO)" Optional="true">variant13.value</ExpandedItem>
351
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant14.DISCR128_EXACT_HI, variant14.DISCR128_EXACT_LO)" Optional="true">variant14.value</ExpandedItem>
352
+ <ExpandedItem Condition="eq128(tag128_hi, tag128_lo, variant15.DISCR128_EXACT_HI, variant15.DISCR128_EXACT_LO)" Optional="true">variant15.value</ExpandedItem>
353
+
354
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant0.DISCR128_BEGIN_HI, variant0.DISCR128_BEGIN_LO, variant0.DISCR128_END_HI, variant0.DISCR128_END_LO)" Optional="true">variant0.value</ExpandedItem>
355
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant1.DISCR128_BEGIN_HI, variant1.DISCR128_BEGIN_LO, variant1.DISCR128_END_HI, variant1.DISCR128_END_LO)" Optional="true">variant1.value</ExpandedItem>
356
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant2.DISCR128_BEGIN_HI, variant2.DISCR128_BEGIN_LO, variant2.DISCR128_END_HI, variant2.DISCR128_END_LO)" Optional="true">variant2.value</ExpandedItem>
357
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant3.DISCR128_BEGIN_HI, variant3.DISCR128_BEGIN_LO, variant3.DISCR128_END_HI, variant3.DISCR128_END_LO)" Optional="true">variant3.value</ExpandedItem>
358
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant4.DISCR128_BEGIN_HI, variant4.DISCR128_BEGIN_LO, variant4.DISCR128_END_HI, variant4.DISCR128_END_LO)" Optional="true">variant4.value</ExpandedItem>
359
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant5.DISCR128_BEGIN_HI, variant5.DISCR128_BEGIN_LO, variant5.DISCR128_END_HI, variant5.DISCR128_END_LO)" Optional="true">variant5.value</ExpandedItem>
360
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant6.DISCR128_BEGIN_HI, variant6.DISCR128_BEGIN_LO, variant6.DISCR128_END_HI, variant6.DISCR128_END_LO)" Optional="true">variant6.value</ExpandedItem>
361
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant7.DISCR128_BEGIN_HI, variant7.DISCR128_BEGIN_LO, variant7.DISCR128_END_HI, variant7.DISCR128_END_LO)" Optional="true">variant7.value</ExpandedItem>
362
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant8.DISCR128_BEGIN_HI, variant8.DISCR128_BEGIN_LO, variant8.DISCR128_END_HI, variant8.DISCR128_END_LO)" Optional="true">variant8.value</ExpandedItem>
363
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant9.DISCR128_BEGIN_HI, variant9.DISCR128_BEGIN_LO, variant9.DISCR128_END_HI, variant9.DISCR128_END_LO)" Optional="true">variant9.value</ExpandedItem>
364
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant10.DISCR128_BEGIN_HI, variant10.DISCR128_BEGIN_LO, variant10.DISCR128_END_HI, variant10.DISCR128_END_LO)" Optional="true">variant10.value</ExpandedItem>
365
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant11.DISCR128_BEGIN_HI, variant11.DISCR128_BEGIN_LO, variant11.DISCR128_END_HI, variant11.DISCR128_END_LO)" Optional="true">variant11.value</ExpandedItem>
366
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant12.DISCR128_BEGIN_HI, variant12.DISCR128_BEGIN_LO, variant12.DISCR128_END_HI, variant12.DISCR128_END_LO)" Optional="true">variant12.value</ExpandedItem>
367
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant13.DISCR128_BEGIN_HI, variant13.DISCR128_BEGIN_LO, variant13.DISCR128_END_HI, variant13.DISCR128_END_LO)" Optional="true">variant13.value</ExpandedItem>
368
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant14.DISCR128_BEGIN_HI, variant14.DISCR128_BEGIN_LO, variant14.DISCR128_END_HI, variant14.DISCR128_END_LO)" Optional="true">variant14.value</ExpandedItem>
369
+ <ExpandedItem Condition="in_range128(tag128_hi, tag128_lo, variant15.DISCR128_BEGIN_HI, variant15.DISCR128_BEGIN_LO, variant15.DISCR128_END_HI, variant15.DISCR128_END_LO)" Optional="true">variant15.value</ExpandedItem>
370
+ </Expand>
371
+ </Type>
372
+ </AutoVisualizer>
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/liballoc.natvis ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
3
+ <Type Name="alloc::vec::Vec&lt;*&gt;">
4
+ <DisplayString>{{ len={len} }}</DisplayString>
5
+ <Expand>
6
+ <Item Name="[len]" ExcludeView="simple">len</Item>
7
+ <Item Name="[capacity]" ExcludeView="simple">buf.inner.cap.__0</Item>
8
+ <ArrayItems>
9
+ <Size>len</Size>
10
+ <ValuePointer>($T1*)buf.inner.ptr.pointer.pointer</ValuePointer>
11
+ </ArrayItems>
12
+ </Expand>
13
+ </Type>
14
+ <Type Name="alloc::collections::vec_deque::VecDeque&lt;*&gt;">
15
+ <DisplayString>{{ len={len} }}</DisplayString>
16
+ <Expand>
17
+ <Item Name="[len]" ExcludeView="simple">len</Item>
18
+ <Item Name="[capacity]" ExcludeView="simple">buf.inner.cap.__0</Item>
19
+ <CustomListItems>
20
+ <Variable Name="i" InitialValue="0" />
21
+ <Size>len</Size>
22
+ <Loop>
23
+ <If Condition="i == len">
24
+ <Break/>
25
+ </If>
26
+ <Item>(($T1*)buf.inner.ptr.pointer.pointer)[(i + head) % buf.inner.cap.__0]</Item>
27
+ <Exec>i = i + 1</Exec>
28
+ </Loop>
29
+ </CustomListItems>
30
+ </Expand>
31
+ </Type>
32
+ <Type Name="alloc::collections::linked_list::LinkedList&lt;*&gt;">
33
+ <DisplayString>{{ len={len} }}</DisplayString>
34
+ <Expand>
35
+ <LinkedListItems>
36
+ <Size>len</Size>
37
+ <HeadPointer>*(alloc::collections::linked_list::Node&lt;$T1&gt; **)&amp;head</HeadPointer>
38
+ <NextPointer>*(alloc::collections::linked_list::Node&lt;$T1&gt; **)&amp;next</NextPointer>
39
+ <ValueNode>element</ValueNode>
40
+ </LinkedListItems>
41
+ </Expand>
42
+ </Type>
43
+ <Type Name="alloc::string::String">
44
+ <DisplayString>{(char*)vec.buf.inner.ptr.pointer.pointer,[vec.len]s8}</DisplayString>
45
+ <StringView>(char*)vec.buf.inner.ptr.pointer.pointer,[vec.len]s8</StringView>
46
+ <Expand>
47
+ <Item Name="[len]" ExcludeView="simple">vec.len</Item>
48
+ <Item Name="[capacity]" ExcludeView="simple">vec.buf.inner.cap.__0</Item>
49
+ <Synthetic Name="[chars]">
50
+ <DisplayString>{(char*)vec.buf.inner.ptr.pointer.pointer,[vec.len]s8}</DisplayString>
51
+ <Expand>
52
+ <ArrayItems>
53
+ <Size>vec.len</Size>
54
+ <ValuePointer>(char*)vec.buf.inner.ptr.pointer.pointer</ValuePointer>
55
+ </ArrayItems>
56
+ </Expand>
57
+ </Synthetic>
58
+ </Expand>
59
+ </Type>
60
+
61
+ <!--
62
+ The display string for Rc, Arc, etc is optional because the expression cannot be evaluated
63
+ if the pointee is unsized (i.e. if `ptr.pointer` is a fat pointer).
64
+
65
+ There are also two versions for the reference count fields, one for sized and one for
66
+ dyn pointees.
67
+
68
+ Rc<[T]> and Arc<[T]> are handled separately altogether so we can actually show
69
+ the slice values. These visualizers have a second wildcard `foo&lt;slice2$&lt;*&gt;, *&gt;`
70
+ which accounts for the allocator parameter. This isn't needed for the other visualizers since
71
+ their inner `*` eats the type parameter but since the slice ones match part of the type params
72
+ it is necessary for them.
73
+ -->
74
+ <!-- alloc::rc::Rc<T> -->
75
+ <Type Name="alloc::rc::Rc&lt;*&gt;">
76
+ <DisplayString Optional="true">{ptr.pointer->value}</DisplayString>
77
+ <Expand>
78
+ <!-- thin -->
79
+ <ExpandedItem Optional="true">ptr.pointer->value</ExpandedItem>
80
+ <Item Name="[Reference count]" Optional="true">ptr.pointer->strong</Item>
81
+ <Item Name="[Weak reference count]" Optional="true">ptr.pointer->weak</Item>
82
+
83
+ <!-- dyn -->
84
+ <Item Name="[Reference count]" Optional="true">ptr.pointer.pointer->strong</Item>
85
+ <Item Name="[Weak reference count]" Optional="true">ptr.pointer.pointer->weak</Item>
86
+ </Expand>
87
+ </Type>
88
+
89
+ <!-- alloc::rc::Rc<[T]> -->
90
+ <Type Name="alloc::rc::Rc&lt;slice2$&lt;*&gt;,*&gt;">
91
+ <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
92
+ <Expand>
93
+ <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
94
+ <Item Name="[Reference count]">ptr.pointer.data_ptr->strong</Item>
95
+ <Item Name="[Weak reference count]">ptr.pointer.data_ptr->weak</Item>
96
+ <ArrayItems>
97
+ <Size>ptr.pointer.length</Size>
98
+ <!-- We add +2 to the data_ptr in order to skip the ref count fields in the RcInner -->
99
+ <ValuePointer>($T1*)(((size_t*)ptr.pointer.data_ptr) + 2)</ValuePointer>
100
+ </ArrayItems>
101
+ </Expand>
102
+ </Type>
103
+
104
+ <!-- alloc::rc::Weak<T> -->
105
+ <Type Name="alloc::rc::Weak&lt;*&gt;">
106
+ <DisplayString Optional="true">{ptr.pointer->value}</DisplayString>
107
+ <Expand>
108
+ <!-- thin -->
109
+ <ExpandedItem Optional="true">ptr.pointer->value</ExpandedItem>
110
+ <Item Name="[Reference count]" Optional="true">ptr.pointer->strong</Item>
111
+ <Item Name="[Weak reference count]" Optional="true">ptr.pointer->weak</Item>
112
+
113
+ <!-- dyn -->
114
+ <Item Name="[Reference count]" Optional="true">ptr.pointer.pointer->strong</Item>
115
+ <Item Name="[Weak reference count]" Optional="true">ptr.pointer.pointer->weak</Item>
116
+ </Expand>
117
+ </Type>
118
+
119
+ <!-- alloc::rc::Weak<[T]> -->
120
+ <Type Name="alloc::rc::Weak&lt;slice2$&lt;*&gt;,*&gt;">
121
+ <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
122
+ <Expand>
123
+ <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
124
+ <Item Name="[Reference count]">ptr.pointer.data_ptr->strong</Item>
125
+ <Item Name="[Weak reference count]">ptr.pointer.data_ptr->weak</Item>
126
+ <ArrayItems>
127
+ <Size>ptr.pointer.length</Size>
128
+ <ValuePointer>($T1*)(((size_t*)ptr.pointer.data_ptr) + 2)</ValuePointer>
129
+ </ArrayItems>
130
+ </Expand>
131
+ </Type>
132
+
133
+ <!-- alloc::sync::Arc<T> -->
134
+ <Type Name="alloc::sync::Arc&lt;*&gt;">
135
+ <DisplayString Optional="true">{ptr.pointer->data}</DisplayString>
136
+ <Expand>
137
+ <!-- thin -->
138
+ <ExpandedItem Optional="true">ptr.pointer->data</ExpandedItem>
139
+ <Item Name="[Reference count]" Optional="true">ptr.pointer->strong</Item>
140
+ <Item Name="[Weak reference count]" Optional="true">ptr.pointer->weak</Item>
141
+
142
+ <!-- dyn -->
143
+ <Item Name="[Reference count]" Optional="true">ptr.pointer.pointer->strong</Item>
144
+ <Item Name="[Weak reference count]" Optional="true">ptr.pointer.pointer->weak</Item>
145
+ </Expand>
146
+ </Type>
147
+
148
+ <!-- alloc::sync::Arc<[T]> -->
149
+ <Type Name="alloc::sync::Arc&lt;slice2$&lt;*&gt;,*&gt;">
150
+ <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
151
+ <Expand>
152
+ <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
153
+ <Item Name="[Reference count]">ptr.pointer.data_ptr->strong</Item>
154
+ <Item Name="[Weak reference count]">ptr.pointer.data_ptr->weak</Item>
155
+ <ArrayItems>
156
+ <Size>ptr.pointer.length</Size>
157
+ <ValuePointer>($T1*)(((size_t*)ptr.pointer.data_ptr) + 2)</ValuePointer>
158
+ </ArrayItems>
159
+ </Expand>
160
+ </Type>
161
+
162
+ <!-- alloc::sync::Weak<T> -->
163
+ <Type Name="alloc::sync::Weak&lt;*&gt;">
164
+ <DisplayString Optional="true">{ptr.pointer->data}</DisplayString>
165
+ <Expand>
166
+ <!-- thin -->
167
+ <ExpandedItem Optional="true">ptr.pointer->data</ExpandedItem>
168
+ <Item Name="[Reference count]" Optional="true">ptr.pointer->strong</Item>
169
+ <Item Name="[Weak reference count]" Optional="true">ptr.pointer->weak</Item>
170
+
171
+ <!-- dyn -->
172
+ <Item Name="[Reference count]" Optional="true">ptr.pointer.pointer->strong</Item>
173
+ <Item Name="[Weak reference count]" Optional="true">ptr.pointer.pointer->weak</Item>
174
+ </Expand>
175
+ </Type>
176
+
177
+ <!-- alloc::sync::Weak<[T]> -->
178
+ <Type Name="alloc::sync::Weak&lt;slice2$&lt;*&gt;,*&gt;">
179
+ <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
180
+ <Expand>
181
+ <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
182
+ <Item Name="[Reference count]">ptr.pointer.data_ptr->strong</Item>
183
+ <Item Name="[Weak reference count]">ptr.pointer.data_ptr->weak</Item>
184
+ <ArrayItems>
185
+ <Size>ptr.pointer.length</Size>
186
+ <ValuePointer>($T1*)(((size_t*)ptr.pointer.data_ptr) + 2)</ValuePointer>
187
+ </ArrayItems>
188
+ </Expand>
189
+ </Type>
190
+ </AutoVisualizer>
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/libcore.natvis ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
3
+ <Type Name="core::cell::Cell&lt;*&gt;">
4
+ <DisplayString>{value.value}</DisplayString>
5
+ <Expand>
6
+ <ExpandedItem>value.value</ExpandedItem>
7
+ </Expand>
8
+ </Type>
9
+ <Type Name="core::cell::Ref&lt;*&gt;">
10
+ <DisplayString>{value.pointer}</DisplayString>
11
+ <Expand>
12
+ <ExpandedItem>value.pointer</ExpandedItem>
13
+ </Expand>
14
+ </Type>
15
+ <Type Name="core::cell::RefMut&lt;*&gt;">
16
+ <DisplayString>{value.pointer}</DisplayString>
17
+ <Expand>
18
+ <ExpandedItem>value.pointer</ExpandedItem>
19
+ </Expand>
20
+ </Type>
21
+ <Type Name="core::cell::RefCell&lt;*&gt;">
22
+ <DisplayString>{value.value}</DisplayString>
23
+ <Expand>
24
+ <Item Name="[Borrow state]" Condition="borrow.value.value == 0">"Unborrowed",sb</Item>
25
+ <Item Name="[Borrow state]" Condition="borrow.value.value &gt; 0">"Immutably borrowed",sb</Item>
26
+ <Item Name="[Borrow state]" Condition="borrow.value.value &lt; 0">"Mutably borrowed",sb</Item>
27
+ <ExpandedItem>value.value</ExpandedItem>
28
+ </Expand>
29
+ </Type>
30
+ <Type Name="core::cell::UnsafeCell&lt;*&gt;">
31
+ <DisplayString>{value}</DisplayString>
32
+ <Expand>
33
+ <ExpandedItem>value</ExpandedItem>
34
+ </Expand>
35
+ </Type>
36
+
37
+ <Type Name="core::mem::manually_drop::ManuallyDrop&lt;*&gt;">
38
+ <DisplayString>{value.__0}</DisplayString>
39
+ <Expand>
40
+ <ExpandedItem>value.__0</ExpandedItem>
41
+ </Expand>
42
+ </Type>
43
+
44
+ <Type Name="core::num::nonzero::NonZero&lt;*&gt;">
45
+ <DisplayString>{__0.__0}</DisplayString>
46
+ <Expand>
47
+ <ExpandedItem>__0.__0</ExpandedItem>
48
+ </Expand>
49
+ </Type>
50
+
51
+ <Type Name="core::num::wrapping::Wrapping&lt;*&gt;">
52
+ <DisplayString>{__0}</DisplayString>
53
+ </Type>
54
+
55
+ <Type Name="core::ops::range::Range&lt;*&gt;">
56
+ <DisplayString>({start}..{end})</DisplayString>
57
+ </Type>
58
+ <Type Name="core::ops::range::RangeFrom&lt;*&gt;">
59
+ <DisplayString>({start}..)</DisplayString>
60
+ </Type>
61
+ <Type Name="core::ops::range::RangeInclusive&lt;*&gt;">
62
+ <DisplayString>({start}..={end})</DisplayString>
63
+ </Type>
64
+ <Type Name="core::ops::range::RangeTo&lt;*&gt;">
65
+ <DisplayString>(..{end})</DisplayString>
66
+ </Type>
67
+ <Type Name="core::ops::range::RangeToInclusive&lt;*&gt;">
68
+ <DisplayString>(..={end})</DisplayString>
69
+ </Type>
70
+
71
+ <Type Name="core::pin::Pin&lt;*&gt;">
72
+ <DisplayString>Pin({(void*)pointer}: {pointer})</DisplayString>
73
+ <Expand>
74
+ <ExpandedItem>pointer</ExpandedItem>
75
+ </Expand>
76
+ </Type>
77
+
78
+ <Type Name="core::ptr::non_null::NonNull&lt;*&gt;">
79
+ <DisplayString>NonNull({(void*) pointer}: {pointer})</DisplayString>
80
+ <Expand>
81
+ <ExpandedItem>pointer</ExpandedItem>
82
+ </Expand>
83
+ </Type>
84
+
85
+ <Type Name="core::ptr::unique::Unique&lt;*&gt;">
86
+ <DisplayString>Unique({(void*)pointer.pointer}: {pointer.pointer})</DisplayString>
87
+ <Expand>
88
+ <ExpandedItem>pointer</ExpandedItem>
89
+ </Expand>
90
+ </Type>
91
+
92
+ <Type Name="core::sync::atomic::AtomicBool">
93
+ <DisplayString>{(bool)v.value}</DisplayString>
94
+ </Type>
95
+ <Type Name="core::sync::atomic::AtomicI8">
96
+ <DisplayString>{v.value}</DisplayString>
97
+ </Type>
98
+ <Type Name="core::sync::atomic::AtomicI16">
99
+ <DisplayString>{v.value}</DisplayString>
100
+ </Type>
101
+ <Type Name="core::sync::atomic::AtomicI32">
102
+ <DisplayString>{v.value}</DisplayString>
103
+ </Type>
104
+ <Type Name="core::sync::atomic::AtomicI64">
105
+ <DisplayString>{v.value}</DisplayString>
106
+ </Type>
107
+ <Type Name="core::sync::atomic::AtomicIsize">
108
+ <DisplayString>{v.value}</DisplayString>
109
+ </Type>
110
+ <Type Name="core::sync::atomic::AtomicU8">
111
+ <DisplayString>{v.value}</DisplayString>
112
+ </Type>
113
+ <Type Name="core::sync::atomic::AtomicU16">
114
+ <DisplayString>{v.value}</DisplayString>
115
+ </Type>
116
+ <Type Name="core::sync::atomic::AtomicU32">
117
+ <DisplayString>{v.value}</DisplayString>
118
+ </Type>
119
+ <Type Name="core::sync::atomic::AtomicU64">
120
+ <DisplayString>{v.value}</DisplayString>
121
+ </Type>
122
+ <Type Name="core::sync::atomic::AtomicUsize">
123
+ <DisplayString>{v.value}</DisplayString>
124
+ </Type>
125
+
126
+ <Type Name="core::time::Duration">
127
+ <DisplayString>{secs,d}s {nanos.__0,d}ns</DisplayString>
128
+ <Expand>
129
+ <Item Name="seconds">secs,d</Item>
130
+ <Item Name="nanoseconds">nanos.__0,d</Item>
131
+ </Expand>
132
+ </Type>
133
+ </AutoVisualizer>
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/libstd.natvis ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
3
+ <!--
4
+ std::collection::Hash* container visualizers
5
+
6
+ Current std impls:
7
+ std::collections::hash::set::HashSet<K, S> is implemented in terms of...
8
+ hashbrown::set::HashSet<K, S> is implemented in terms of...
9
+ hashbrown::map::HashMap<K, V, S> is implemented in terms of...
10
+ hashbrown::raw::RawTable<(K, V)>
11
+
12
+ Ideally, we'd teach rustc to scan dependencies/crates for .natvis files so
13
+ the bulk of this could live alongside the hashbrown crate implementation,
14
+ and std would just forward using e.g. <ExpandedItem>base</ExpandedItem>.
15
+
16
+ However, Given that std...Hash*Set* is currently implemented in terms of
17
+ hashbrown...Hash*Map*, which would visualize poorly, we want to customize the
18
+ look/feel at the std type level *anyways*...
19
+
20
+ References:
21
+ https://github.com/rust-lang/rust/blob/HEAD/src/libstd/collections/hash/map.rs
22
+ https://github.com/rust-lang/rust/blob/HEAD/src/libstd/collections/hash/set.rs
23
+ https://github.com/rust-lang/hashbrown/blob/master/src/map.rs
24
+ https://github.com/rust-lang/hashbrown/blob/master/src/set.rs
25
+ https://github.com/rust-lang/hashbrown/blob/master/src/raw/mod.rs
26
+ -->
27
+
28
+ <Type Name="std::collections::hash::map::HashMap&lt;*,*,*&gt;">
29
+ <DisplayString>{{ len={base.table.table.items} }}</DisplayString>
30
+ <Expand>
31
+ <Item Name="[len]">base.table.table.items</Item>
32
+ <Item Name="[capacity]">base.table.table.items + base.table.table.growth_left</Item>
33
+ <Item Name="[state]">base.hash_builder</Item>
34
+
35
+ <CustomListItems>
36
+ <Variable Name="i" InitialValue="0" />
37
+ <Variable Name="n" InitialValue="base.table.table.items" />
38
+ <Size>base.table.table.items</Size>
39
+ <Loop>
40
+ <Break Condition="n == 0" />
41
+ <If Condition="(base.table.table.ctrl.pointer[i] &amp; 0x80) == 0">
42
+ <!-- Bucket is populated -->
43
+ <Exec>n--</Exec>
44
+ <Item Name="{((tuple$&lt;$T1,$T2&gt;*)base.table.table.ctrl.pointer)[-(i + 1)].__0}">((tuple$&lt;$T1,$T2&gt;*)base.table.table.ctrl.pointer)[-(i + 1)].__1</Item>
45
+ </If>
46
+ <Exec>i++</Exec>
47
+ </Loop>
48
+ </CustomListItems>
49
+ </Expand>
50
+ </Type>
51
+
52
+ <Type Name="std::collections::hash::set::HashSet&lt;*,*&gt;">
53
+ <DisplayString>{{ len={base.map.table.table.items} }}</DisplayString>
54
+ <Expand>
55
+ <Item Name="[len]">base.map.table.table.items</Item>
56
+ <Item Name="[capacity]">base.map.table.table.items + base.map.table.table.growth_left</Item>
57
+ <Item Name="[state]">base.map.hash_builder</Item>
58
+
59
+ <CustomListItems>
60
+ <Variable Name="i" InitialValue="0" />
61
+ <Variable Name="n" InitialValue="base.map.table.table.items" />
62
+ <Size>base.map.table.table.items</Size>
63
+ <Loop>
64
+ <Break Condition="n == 0" />
65
+ <If Condition="(base.map.table.table.ctrl.pointer[i] &amp; 0x80) == 0">
66
+ <!-- Bucket is populated -->
67
+ <Exec>n--</Exec>
68
+ <Item>(($T1*)base.map.table.table.ctrl.pointer)[-(i + 1)]</Item>
69
+ </If>
70
+ <Exec>i++</Exec>
71
+ </Loop>
72
+ </CustomListItems>
73
+ </Expand>
74
+ </Type>
75
+
76
+ <Type Name="std::ffi::c_str::CString">
77
+ <DisplayString>{(char*)inner.data_ptr}</DisplayString>
78
+ <Expand>
79
+ <Synthetic Name="[chars]">
80
+ <DisplayString>{(char*)inner.data_ptr}</DisplayString>
81
+ <Expand>
82
+ <ArrayItems>
83
+ <Size>inner.length</Size>
84
+ <ValuePointer>(char*)inner.data_ptr</ValuePointer>
85
+ </ArrayItems>
86
+ </Expand>
87
+ </Synthetic>
88
+ </Expand>
89
+ </Type>
90
+
91
+ <Type Name="std::ffi::c_str::CStr">
92
+ <DisplayString>{(char*) inner}</DisplayString>
93
+ <Expand>
94
+ <Synthetic Name="[chars]">
95
+ <DisplayString>{(char*) inner}</DisplayString>
96
+ <Expand>
97
+ <ArrayItems>
98
+ <Size>strlen((char *) inner) + 1</Size>
99
+ <ValuePointer>(char*)inner</ValuePointer>
100
+ </ArrayItems>
101
+ </Expand>
102
+ </Synthetic>
103
+ </Expand>
104
+ </Type>
105
+
106
+ <Type Name="std::ffi::os_str::OsString">
107
+ <DisplayString>{(char*)inner.inner.bytes.buf.inner.ptr.pointer.pointer,[inner.inner.bytes.len]}</DisplayString>
108
+ <Expand>
109
+ <Synthetic Name="[chars]">
110
+ <DisplayString>{(char*)inner.inner.bytes.buf.inner.ptr.pointer.pointer,[inner.inner.bytes.len]}</DisplayString>
111
+ <Expand>
112
+ <ArrayItems>
113
+ <Size>inner.inner.bytes.len</Size>
114
+ <ValuePointer>(char*)inner.inner.bytes.buf.inner.ptr.pointer.pointer</ValuePointer>
115
+ </ArrayItems>
116
+ </Expand>
117
+ </Synthetic>
118
+ </Expand>
119
+ </Type>
120
+ </AutoVisualizer>
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/lldb_commands ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Forces test-compliant formatting to all other types
2
+ type synthetic add -l lldb_lookup.synthetic_lookup -x ".*" --category Rust
3
+ # Std String
4
+ type synthetic add -l lldb_lookup.StdStringSyntheticProvider -x "^(alloc::([a-z_]+::)+)String$" --category Rust
5
+ type summary add -F lldb_lookup.StdStringSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)String$" --category Rust
6
+ # Std str
7
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^&(mut )?str$" --category Rust
8
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^&(mut )?str$" --category Rust
9
+ ## MSVC
10
+ type synthetic add -l lldb_lookup.MSVCStrSyntheticProvider -x "^ref(_mut)?\$<str\$>$" --category Rust
11
+ type summary add -F lldb_lookup.StdStrSummaryProvider -e -h -x "^ref(_mut)?\$<str\$>$" --category Rust
12
+ # Array
13
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^&(mut )?\\[.+\\]$" --category Rust
14
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^&(mut )?\\[.+\\]$" --category Rust
15
+ # Slice
16
+ ## MSVC
17
+ type synthetic add -l lldb_lookup.MSVCStdSliceSyntheticProvider -x "^ref(_mut)?\$<slice2\$<.+> >" --category Rust
18
+ type summary add -F lldb_lookup.StdSliceSummaryProvider -e -x -h "^ref(_mut)?\$<slice2\$<.+> >" --category Rust
19
+ # OsString
20
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(std::ffi::([a-z_]+::)+)OsString$" --category Rust
21
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(std::ffi::([a-z_]+::)+)OsString$" --category Rust
22
+ # Vec
23
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(alloc::([a-z_]+::)+)Vec<.+>$" --category Rust
24
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)Vec<.+>$" --category Rust
25
+ # VecDeque
26
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(alloc::([a-z_]+::)+)VecDeque<.+>$" --category Rust
27
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)VecDeque<.+>$" --category Rust
28
+ # BTreeSet
29
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(alloc::([a-z_]+::)+)BTreeSet<.+>$" --category Rust
30
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)BTreeSet<.+>$" --category Rust
31
+ # BTreeMap
32
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(alloc::([a-z_]+::)+)BTreeMap<.+>$" --category Rust
33
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)BTreeMap<.+>$" --category Rust
34
+ # HashMap
35
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(std::collections::([a-z_]+::)+)HashMap<.+>$" --category Rust
36
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(std::collections::([a-z_]+::)+)HashMap<.+>$" --category Rust
37
+ # HashSet
38
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(std::collections::([a-z_]+::)+)HashSet<.+>$" --category Rust
39
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(std::collections::([a-z_]+::)+)HashSet<.+>$" --category Rust
40
+ # Rc
41
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(alloc::([a-z_]+::)+)Rc<.+>$" --category Rust
42
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)Rc<.+>$" --category Rust
43
+ # Arc
44
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(alloc::([a-z_]+::)+)Arc<.+>$" --category Rust
45
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(alloc::([a-z_]+::)+)Arc<.+>$" --category Rust
46
+ # Cell
47
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(core::([a-z_]+::)+)Cell<.+>$" --category Rust
48
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)Cell<.+>$" --category Rust
49
+ # RefCell
50
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(core::([a-z_]+::)+)Ref<.+>$" --category Rust
51
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(core::([a-z_]+::)+)RefMut<.+>$" --category Rust
52
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(core::([a-z_]+::)+)RefCell<.+>$" --category Rust
53
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)Ref<.+>$" --category Rust
54
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefMut<.+>$" --category Rust
55
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefCell<.+>$" --category Rust
56
+ # NonZero
57
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(core::([a-z_]+::)+)NonZero<.+>$" --category Rust
58
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^core::num::([a-z_]+::)*NonZero.+$" --category Rust
59
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)NonZero<.+>$" --category Rust
60
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^core::num::([a-z_]+::)*NonZero.+$" --category Rust
61
+ # PathBuf
62
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^(std::([a-z_]+::)+)PathBuf$" --category Rust
63
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(std::([a-z_]+::)+)PathBuf$" --category Rust
64
+ # Path
65
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^&(mut )?(std::([a-z_]+::)+)Path$" --category Rust
66
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^&(mut )?(std::([a-z_]+::)+)Path$" --category Rust
67
+ # Enum
68
+ # type summary add -F lldb_lookup.ClangEncodedEnumSummaryProvider -e -h "lldb_lookup.is_sum_type_enum" --recognizer-function --category Rust
69
+ ## MSVC
70
+ type synthetic add -l lldb_lookup.MSVCEnumSyntheticProvider -x "^enum2\$<.+>$" --category Rust
71
+ type summary add -F lldb_lookup.MSVCEnumSummaryProvider -e -x -h "^enum2\$<.+>$" --category Rust
72
+ ## MSVC Variants
73
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^enum2\$<.+>::.*$" --category Rust
74
+ type summary add -F lldb_lookup.summary_lookup -e -x -h "^enum2\$<.+>::.*$" --category Rust
75
+ # Tuple
76
+ type synthetic add -l lldb_lookup.synthetic_lookup -x "^\(.*\)$" --category Rust
77
+ type summary add -F lldb_lookup.TupleSummaryProvider -e -x -h "^\(.*\)$" --category Rust
78
+ ## MSVC
79
+ type synthetic add -l lldb_lookup.MSVCTupleSyntheticProvider -x "^tuple\$<.+>$" --category Rust
80
+ type summary add -F lldb_lookup.TupleSummaryProvider -e -x -h "^tuple\$<.+>$" --category Rust
81
+ type category enable Rust
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/lldb_lookup.py ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import lldb
2
+
3
+ from lldb_providers import *
4
+ from rust_types import RustType, classify_struct, classify_union
5
+
6
+
7
+ # BACKCOMPAT: rust 1.35
8
+ def is_hashbrown_hashmap(hash_map: lldb.SBValue) -> bool:
9
+ return len(hash_map.type.fields) == 1
10
+
11
+
12
+ def classify_rust_type(type: lldb.SBType) -> str:
13
+ type_class = type.GetTypeClass()
14
+ if type_class == lldb.eTypeClassStruct:
15
+ return classify_struct(type.name, type.fields)
16
+ if type_class == lldb.eTypeClassUnion:
17
+ return classify_union(type.fields)
18
+
19
+ return RustType.OTHER
20
+
21
+
22
+ def summary_lookup(valobj: lldb.SBValue, _dict: LLDBOpaque) -> str:
23
+ """Returns the summary provider for the given value"""
24
+ rust_type = classify_rust_type(valobj.GetType())
25
+
26
+ if rust_type == RustType.STD_STRING:
27
+ return StdStringSummaryProvider(valobj, _dict)
28
+ if rust_type == RustType.STD_OS_STRING:
29
+ return StdOsStringSummaryProvider(valobj, _dict)
30
+ if rust_type == RustType.STD_STR:
31
+ return StdStrSummaryProvider(valobj, _dict)
32
+
33
+ if rust_type == RustType.STD_VEC:
34
+ return SizeSummaryProvider(valobj, _dict)
35
+ if rust_type == RustType.STD_VEC_DEQUE:
36
+ return SizeSummaryProvider(valobj, _dict)
37
+ if rust_type == RustType.STD_SLICE:
38
+ return SizeSummaryProvider(valobj, _dict)
39
+
40
+ if rust_type == RustType.STD_HASH_MAP:
41
+ return SizeSummaryProvider(valobj, _dict)
42
+ if rust_type == RustType.STD_HASH_SET:
43
+ return SizeSummaryProvider(valobj, _dict)
44
+
45
+ if rust_type == RustType.STD_RC:
46
+ return StdRcSummaryProvider(valobj, _dict)
47
+ if rust_type == RustType.STD_ARC:
48
+ return StdRcSummaryProvider(valobj, _dict)
49
+
50
+ if rust_type == RustType.STD_REF:
51
+ return StdRefSummaryProvider(valobj, _dict)
52
+ if rust_type == RustType.STD_REF_MUT:
53
+ return StdRefSummaryProvider(valobj, _dict)
54
+ if rust_type == RustType.STD_REF_CELL:
55
+ return StdRefSummaryProvider(valobj, _dict)
56
+
57
+ if rust_type == RustType.STD_NONZERO_NUMBER:
58
+ return StdNonZeroNumberSummaryProvider(valobj, _dict)
59
+
60
+ if rust_type == RustType.STD_PATHBUF:
61
+ return StdPathBufSummaryProvider(valobj, _dict)
62
+ if rust_type == RustType.STD_PATH:
63
+ return StdPathSummaryProvider(valobj, _dict)
64
+
65
+ return ""
66
+
67
+
68
+ def synthetic_lookup(valobj: lldb.SBValue, _dict: LLDBOpaque) -> object:
69
+ """Returns the synthetic provider for the given value"""
70
+ rust_type = classify_rust_type(valobj.GetType())
71
+
72
+ if rust_type == RustType.STRUCT:
73
+ return StructSyntheticProvider(valobj, _dict)
74
+ if rust_type == RustType.STRUCT_VARIANT:
75
+ return StructSyntheticProvider(valobj, _dict, is_variant=True)
76
+ if rust_type == RustType.TUPLE:
77
+ return TupleSyntheticProvider(valobj, _dict)
78
+ if rust_type == RustType.TUPLE_VARIANT:
79
+ return TupleSyntheticProvider(valobj, _dict, is_variant=True)
80
+ if rust_type == RustType.EMPTY:
81
+ return EmptySyntheticProvider(valobj, _dict)
82
+ if rust_type == RustType.REGULAR_ENUM:
83
+ discriminant = valobj.GetChildAtIndex(0).GetChildAtIndex(0).GetValueAsUnsigned()
84
+ return synthetic_lookup(valobj.GetChildAtIndex(discriminant), _dict)
85
+ if rust_type == RustType.SINGLETON_ENUM:
86
+ return synthetic_lookup(valobj.GetChildAtIndex(0), _dict)
87
+ if rust_type == RustType.ENUM:
88
+ # this little trick lets us treat `synthetic_lookup` as a "recognizer function" for the enum
89
+ # summary providers, reducing the number of lookups we have to do. This is a huge time save
90
+ # because there's no way (via type name) to recognize sum-type enums on `*-gnu` targets. The
91
+ # alternative would be to shove every single type through `summary_lookup`, which is
92
+ # incredibly wasteful. Once these scripts are updated for LLDB 19.0 and we can use
93
+ # `--recognizer-function`, this hack will only be needed for backwards compatibility.
94
+ summary: lldb.SBTypeSummary = valobj.GetTypeSummary()
95
+ if (
96
+ summary.summary_data is None
97
+ or summary.summary_data.strip()
98
+ != "lldb_lookup.ClangEncodedEnumSummaryProvider(valobj,internal_dict)"
99
+ ):
100
+ rust_category: lldb.SBTypeCategory = lldb.debugger.GetCategory("Rust")
101
+ rust_category.AddTypeSummary(
102
+ lldb.SBTypeNameSpecifier(valobj.GetTypeName()),
103
+ lldb.SBTypeSummary().CreateWithFunctionName(
104
+ "lldb_lookup.ClangEncodedEnumSummaryProvider"
105
+ ),
106
+ )
107
+
108
+ return ClangEncodedEnumProvider(valobj, _dict)
109
+ if rust_type == RustType.STD_VEC:
110
+ return StdVecSyntheticProvider(valobj, _dict)
111
+ if rust_type == RustType.STD_VEC_DEQUE:
112
+ return StdVecDequeSyntheticProvider(valobj, _dict)
113
+ if rust_type == RustType.STD_SLICE or rust_type == RustType.STD_STR:
114
+ return StdSliceSyntheticProvider(valobj, _dict)
115
+
116
+ if rust_type == RustType.STD_HASH_MAP:
117
+ if is_hashbrown_hashmap(valobj):
118
+ return StdHashMapSyntheticProvider(valobj, _dict)
119
+ else:
120
+ return StdOldHashMapSyntheticProvider(valobj, _dict)
121
+ if rust_type == RustType.STD_HASH_SET:
122
+ hash_map = valobj.GetChildAtIndex(0)
123
+ if is_hashbrown_hashmap(hash_map):
124
+ return StdHashMapSyntheticProvider(valobj, _dict, show_values=False)
125
+ else:
126
+ return StdOldHashMapSyntheticProvider(hash_map, _dict, show_values=False)
127
+
128
+ if rust_type == RustType.STD_RC:
129
+ return StdRcSyntheticProvider(valobj, _dict)
130
+ if rust_type == RustType.STD_ARC:
131
+ return StdRcSyntheticProvider(valobj, _dict, is_atomic=True)
132
+
133
+ if rust_type == RustType.STD_CELL:
134
+ return StdCellSyntheticProvider(valobj, _dict)
135
+ if rust_type == RustType.STD_REF:
136
+ return StdRefSyntheticProvider(valobj, _dict)
137
+ if rust_type == RustType.STD_REF_MUT:
138
+ return StdRefSyntheticProvider(valobj, _dict)
139
+ if rust_type == RustType.STD_REF_CELL:
140
+ return StdRefSyntheticProvider(valobj, _dict, is_cell=True)
141
+
142
+ return DefaultSyntheticProvider(valobj, _dict)
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/lldb_providers.py ADDED
@@ -0,0 +1,1403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+ import sys
3
+ from typing import Generator, List, TYPE_CHECKING
4
+
5
+ from lldb import (
6
+ SBData,
7
+ SBError,
8
+ eBasicTypeLong,
9
+ eBasicTypeUnsignedLong,
10
+ eBasicTypeUnsignedChar,
11
+ eFormatChar,
12
+ )
13
+
14
+ from rust_types import is_tuple_fields
15
+
16
+ if TYPE_CHECKING:
17
+ from lldb import SBValue, SBType, SBTypeStaticField, SBTarget
18
+
19
+ # from lldb.formatters import Logger
20
+
21
+ ####################################################################################################
22
+ # This file contains two kinds of pretty-printers: summary and synthetic.
23
+ #
24
+ # Important classes from LLDB module:
25
+ # SBValue: the value of a variable, a register, or an expression
26
+ # SBType: the data type; each SBValue has a corresponding SBType
27
+ #
28
+ # Summary provider is a function with the type `(SBValue, dict) -> str`.
29
+ # The first parameter is the object encapsulating the actual variable being displayed;
30
+ # The second parameter is an internal support parameter used by LLDB, and you should not touch it.
31
+ #
32
+ # Synthetic children is the way to provide a children-based representation of the object's value.
33
+ # Synthetic provider is a class that implements the following interface:
34
+ #
35
+ # class SyntheticChildrenProvider:
36
+ # def __init__(self, SBValue, dict)
37
+ # def num_children(self)
38
+ # def get_child_index(self, str)
39
+ # def get_child_at_index(self, int)
40
+ # def update(self)
41
+ # def has_children(self)
42
+ # def get_value(self)
43
+ #
44
+ #
45
+ # You can find more information and examples here:
46
+ # 1. https://lldb.llvm.org/varformats.html
47
+ # 2. https://lldb.llvm.org/use/python-reference.html
48
+ # 3. https://github.com/llvm/llvm-project/blob/llvmorg-8.0.1/lldb/www/python_reference/lldb.formatters.cpp-pysrc.html
49
+ # 4. https://github.com/llvm-mirror/lldb/tree/master/examples/summaries/cocoa
50
+ ####################################################################################################
51
+
52
+ PY3 = sys.version_info[0] == 3
53
+
54
+
55
+ class LLDBOpaque:
56
+ """
57
+ An marker type for use in type hints to denote LLDB bookkeeping variables. Values marked with
58
+ this type should never be used except when passing as an argument to an LLDB function.
59
+ """
60
+
61
+
62
+ class ValueBuilder:
63
+ def __init__(self, valobj: SBValue):
64
+ self.valobj = valobj
65
+ process = valobj.GetProcess()
66
+ self.endianness = process.GetByteOrder()
67
+ self.pointer_size = process.GetAddressByteSize()
68
+
69
+ def from_int(self, name: str, value: int) -> SBValue:
70
+ type = self.valobj.GetType().GetBasicType(eBasicTypeLong)
71
+ data = SBData.CreateDataFromSInt64Array(
72
+ self.endianness, self.pointer_size, [value]
73
+ )
74
+ return self.valobj.CreateValueFromData(name, data, type)
75
+
76
+ def from_uint(self, name: str, value: int) -> SBValue:
77
+ type = self.valobj.GetType().GetBasicType(eBasicTypeUnsignedLong)
78
+ data = SBData.CreateDataFromUInt64Array(
79
+ self.endianness, self.pointer_size, [value]
80
+ )
81
+ return self.valobj.CreateValueFromData(name, data, type)
82
+
83
+
84
+ def unwrap_unique_or_non_null(unique_or_nonnull: SBValue) -> SBValue:
85
+ # BACKCOMPAT: rust 1.32
86
+ # https://github.com/rust-lang/rust/commit/7a0911528058e87d22ea305695f4047572c5e067
87
+ # BACKCOMPAT: rust 1.60
88
+ # https://github.com/rust-lang/rust/commit/2a91eeac1a2d27dd3de1bf55515d765da20fd86f
89
+ ptr = unique_or_nonnull.GetChildMemberWithName("pointer")
90
+ return ptr if ptr.TypeIsPointerType() else ptr.GetChildAtIndex(0)
91
+
92
+
93
+ class DefaultSyntheticProvider:
94
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
95
+ # logger = Logger.Logger()
96
+ # logger >> "Default synthetic provider for " + str(valobj.GetName())
97
+ self.valobj = valobj
98
+
99
+ def num_children(self) -> int:
100
+ return self.valobj.GetNumChildren()
101
+
102
+ def get_child_index(self, name: str) -> int:
103
+ return self.valobj.GetIndexOfChildWithName(name)
104
+
105
+ def get_child_at_index(self, index: int) -> SBValue:
106
+ return self.valobj.GetChildAtIndex(index)
107
+
108
+ def update(self):
109
+ pass
110
+
111
+ def has_children(self) -> bool:
112
+ return self.valobj.MightHaveChildren()
113
+
114
+
115
+ class EmptySyntheticProvider:
116
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
117
+ # logger = Logger.Logger()
118
+ # logger >> "[EmptySyntheticProvider] for " + str(valobj.GetName())
119
+ self.valobj = valobj
120
+
121
+ def num_children(self) -> int:
122
+ return 0
123
+
124
+ def get_child_index(self, name: str) -> int:
125
+ return -1
126
+
127
+ def get_child_at_index(self, index: int) -> SBValue:
128
+ return None
129
+
130
+ def update(self):
131
+ pass
132
+
133
+ def has_children(self) -> bool:
134
+ return False
135
+
136
+
137
+ def get_template_args(type_name: str) -> Generator[str, None, None]:
138
+ """
139
+ Takes a type name `T<A, tuple$<B, C>, D>` and returns a list of its generic args
140
+ `["A", "tuple$<B, C>", "D"]`.
141
+
142
+ String-based replacement for LLDB's `SBType.template_args`, as LLDB is currently unable to
143
+ populate this field for targets with PDB debug info. Also useful for manually altering the type
144
+ name of generics (e.g. `Vec<ref$<str$> >` -> `Vec<&str>`).
145
+
146
+ Each element of the returned list can be looked up for its `SBType` value via
147
+ `SBTarget.FindFirstType()`
148
+ """
149
+ level = 0
150
+ start = 0
151
+ for i, c in enumerate(type_name):
152
+ if c == "<":
153
+ level += 1
154
+ if level == 1:
155
+ start = i + 1
156
+ elif c == ">":
157
+ level -= 1
158
+ if level == 0:
159
+ yield type_name[start:i].strip()
160
+ elif c == "," and level == 1:
161
+ yield type_name[start:i].strip()
162
+ start = i + 1
163
+
164
+
165
+ MSVC_PTR_PREFIX: List[str] = ["ref$<", "ref_mut$<", "ptr_const$<", "ptr_mut$<"]
166
+
167
+
168
+ def resolve_msvc_template_arg(arg_name: str, target: SBTarget) -> SBType:
169
+ """
170
+ RECURSIVE when arrays or references are nested (e.g. `ref$<ref$<u8> >`, `array$<ref$<u8> >`)
171
+
172
+ Takes the template arg's name (likely from `get_template_args`) and finds/creates its
173
+ corresponding SBType.
174
+
175
+ For non-reference/pointer/array types this is identical to calling
176
+ `target.FindFirstType(arg_name)`
177
+
178
+ LLDB internally interprets refs, pointers, and arrays C-style (`&u8` -> `u8 *`,
179
+ `*const u8` -> `u8 *`, `[u8; 5]` -> `u8 [5]`). Looking up these names still doesn't work in the
180
+ current version of LLDB, so instead the types are generated via `base_type.GetPointerType()` and
181
+ `base_type.GetArrayType()`, which bypass the PDB file and ask clang directly for the type node.
182
+ """
183
+ result = target.FindFirstType(arg_name)
184
+
185
+ if result.IsValid():
186
+ return result
187
+
188
+ for prefix in MSVC_PTR_PREFIX:
189
+ if arg_name.startswith(prefix):
190
+ arg_name = arg_name[len(prefix) : -1].strip()
191
+
192
+ result = resolve_msvc_template_arg(arg_name, target)
193
+ return result.GetPointerType()
194
+
195
+ if arg_name.startswith("array$<"):
196
+ arg_name = arg_name[7:-1].strip()
197
+
198
+ template_args = get_template_args(arg_name)
199
+
200
+ element_name = next(template_args)
201
+ length = next(template_args)
202
+
203
+ result = resolve_msvc_template_arg(element_name, target)
204
+
205
+ return result.GetArrayType(int(length))
206
+
207
+ return result
208
+
209
+
210
+ def StructSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
211
+ # structs need the field name before the field value
212
+ output = (
213
+ f"{valobj.GetChildAtIndex(i).GetName()}:{child}"
214
+ for i, child in enumerate(aggregate_field_summary(valobj, _dict))
215
+ )
216
+
217
+ return "{" + ", ".join(output) + "}"
218
+
219
+
220
+ def TupleSummaryProvider(valobj: SBValue, _dict: LLDBOpaque):
221
+ return "(" + ", ".join(aggregate_field_summary(valobj, _dict)) + ")"
222
+
223
+
224
+ def aggregate_field_summary(valobj: SBValue, _dict) -> Generator[str, None, None]:
225
+ for i in range(0, valobj.GetNumChildren()):
226
+ child: SBValue = valobj.GetChildAtIndex(i)
227
+ summary = child.summary
228
+ if summary is None:
229
+ summary = child.value
230
+ if summary is None:
231
+ if is_tuple_fields(child):
232
+ summary = TupleSummaryProvider(child, _dict)
233
+ else:
234
+ summary = StructSummaryProvider(child, _dict)
235
+ yield summary
236
+
237
+
238
+ def SizeSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
239
+ return "size=" + str(valobj.GetNumChildren())
240
+
241
+
242
+ def vec_to_string(vec: SBValue) -> str:
243
+ length = vec.GetNumChildren()
244
+ chars = [vec.GetChildAtIndex(i).GetValueAsUnsigned() for i in range(length)]
245
+ return (
246
+ bytes(chars).decode(errors="replace")
247
+ if PY3
248
+ else "".join(chr(char) for char in chars)
249
+ )
250
+
251
+
252
+ def StdStringSummaryProvider(valobj, dict):
253
+ inner_vec = (
254
+ valobj.GetNonSyntheticValue()
255
+ .GetChildMemberWithName("vec")
256
+ .GetNonSyntheticValue()
257
+ )
258
+
259
+ pointer = (
260
+ inner_vec.GetChildMemberWithName("buf")
261
+ .GetChildMemberWithName("inner")
262
+ .GetChildMemberWithName("ptr")
263
+ .GetChildMemberWithName("pointer")
264
+ .GetChildMemberWithName("pointer")
265
+ )
266
+
267
+ length = inner_vec.GetChildMemberWithName("len").GetValueAsUnsigned()
268
+
269
+ if length <= 0:
270
+ return '""'
271
+ error = SBError()
272
+ process = pointer.GetProcess()
273
+ data = process.ReadMemory(pointer.GetValueAsUnsigned(), length, error)
274
+ if error.Success():
275
+ return '"' + data.decode("utf8", "replace") + '"'
276
+ else:
277
+ raise Exception("ReadMemory error: %s", error.GetCString())
278
+
279
+
280
+ def StdOsStringSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
281
+ # logger = Logger.Logger()
282
+ # logger >> "[StdOsStringSummaryProvider] for " + str(valobj.GetName())
283
+ buf = valobj.GetChildAtIndex(0).GetChildAtIndex(0)
284
+ is_windows = "Wtf8Buf" in buf.type.name
285
+ vec = buf.GetChildAtIndex(0) if is_windows else buf
286
+ return '"%s"' % vec_to_string(vec)
287
+
288
+
289
+ def StdStrSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
290
+ # logger = Logger.Logger()
291
+ # logger >> "[StdStrSummaryProvider] for " + str(valobj.GetName())
292
+
293
+ # the code below assumes non-synthetic value, this makes sure the assumption holds
294
+ valobj = valobj.GetNonSyntheticValue()
295
+
296
+ length = valobj.GetChildMemberWithName("length").GetValueAsUnsigned()
297
+ if length == 0:
298
+ return '""'
299
+
300
+ data_ptr = valobj.GetChildMemberWithName("data_ptr")
301
+
302
+ start = data_ptr.GetValueAsUnsigned()
303
+ error = SBError()
304
+ process = data_ptr.GetProcess()
305
+ data = process.ReadMemory(start, length, error)
306
+ data = data.decode(encoding="UTF-8") if PY3 else data
307
+ return '"%s"' % data
308
+
309
+
310
+ def StdPathBufSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
311
+ # logger = Logger.Logger()
312
+ # logger >> "[StdPathBufSummaryProvider] for " + str(valobj.GetName())
313
+ return StdOsStringSummaryProvider(valobj.GetChildMemberWithName("inner"), _dict)
314
+
315
+
316
+ def StdPathSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
317
+ # logger = Logger.Logger()
318
+ # logger >> "[StdPathSummaryProvider] for " + str(valobj.GetName())
319
+ length = valobj.GetChildMemberWithName("length").GetValueAsUnsigned()
320
+ if length == 0:
321
+ return '""'
322
+
323
+ data_ptr = valobj.GetChildMemberWithName("data_ptr")
324
+
325
+ start = data_ptr.GetValueAsUnsigned()
326
+ error = SBError()
327
+ process = data_ptr.GetProcess()
328
+ data = process.ReadMemory(start, length, error)
329
+ if PY3:
330
+ try:
331
+ data = data.decode(encoding="UTF-8")
332
+ except UnicodeDecodeError:
333
+ return "%r" % data
334
+ return '"%s"' % data
335
+
336
+
337
+ def sequence_formatter(output: str, valobj: SBValue, _dict: LLDBOpaque):
338
+ length: int = valobj.GetNumChildren()
339
+
340
+ long: bool = False
341
+ for i in range(0, length):
342
+ if len(output) > 32:
343
+ long = True
344
+ break
345
+
346
+ child: SBValue = valobj.GetChildAtIndex(i)
347
+
348
+ summary = child.summary
349
+ if summary is None:
350
+ summary = child.value
351
+ if summary is None:
352
+ summary = "{...}"
353
+ output += f"{summary}, "
354
+ if long:
355
+ output = f"(len: {length}) " + output + "..."
356
+ else:
357
+ output = output[:-2]
358
+
359
+ return output
360
+
361
+
362
+ class StructSyntheticProvider:
363
+ """Pretty-printer for structs and struct enum variants"""
364
+
365
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque, is_variant: bool = False):
366
+ # logger = Logger.Logger()
367
+ self.valobj = valobj
368
+ self.is_variant = is_variant
369
+ self.type = valobj.GetType()
370
+ self.fields = {}
371
+
372
+ if is_variant:
373
+ self.fields_count = self.type.GetNumberOfFields() - 1
374
+ real_fields = self.type.fields[1:]
375
+ else:
376
+ self.fields_count = self.type.GetNumberOfFields()
377
+ real_fields = self.type.fields
378
+
379
+ for number, field in enumerate(real_fields):
380
+ self.fields[field.name] = number
381
+
382
+ def num_children(self) -> int:
383
+ return self.fields_count
384
+
385
+ def get_child_index(self, name: str) -> int:
386
+ return self.fields.get(name, -1)
387
+
388
+ def get_child_at_index(self, index: int) -> SBValue:
389
+ if self.is_variant:
390
+ field = self.type.GetFieldAtIndex(index + 1)
391
+ else:
392
+ field = self.type.GetFieldAtIndex(index)
393
+ return self.valobj.GetChildMemberWithName(field.name)
394
+
395
+ def update(self):
396
+ # type: () -> None
397
+ pass
398
+
399
+ def has_children(self) -> bool:
400
+ return True
401
+
402
+
403
+ class StdStringSyntheticProvider:
404
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
405
+ self.valobj = valobj
406
+ self.update()
407
+
408
+ def update(self):
409
+ inner_vec = self.valobj.GetChildMemberWithName("vec").GetNonSyntheticValue()
410
+ self.data_ptr = (
411
+ inner_vec.GetChildMemberWithName("buf")
412
+ .GetChildMemberWithName("inner")
413
+ .GetChildMemberWithName("ptr")
414
+ .GetChildMemberWithName("pointer")
415
+ .GetChildMemberWithName("pointer")
416
+ )
417
+ self.length = inner_vec.GetChildMemberWithName("len").GetValueAsUnsigned()
418
+ self.element_type = self.data_ptr.GetType().GetPointeeType()
419
+
420
+ def has_children(self) -> bool:
421
+ return True
422
+
423
+ def num_children(self) -> int:
424
+ return self.length
425
+
426
+ def get_child_index(self, name: str) -> int:
427
+ index = name.lstrip("[").rstrip("]")
428
+ if index.isdigit():
429
+ return int(index)
430
+
431
+ return -1
432
+
433
+ def get_child_at_index(self, index: int) -> SBValue:
434
+ if not 0 <= index < self.length:
435
+ return None
436
+ start = self.data_ptr.GetValueAsUnsigned()
437
+ address = start + index
438
+ element = self.data_ptr.CreateValueFromAddress(
439
+ f"[{index}]", address, self.element_type
440
+ )
441
+ element.SetFormat(eFormatChar)
442
+ return element
443
+
444
+
445
+ class MSVCStrSyntheticProvider:
446
+ __slots__ = ["valobj", "data_ptr", "length"]
447
+
448
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
449
+ self.valobj = valobj
450
+ self.update()
451
+
452
+ def update(self):
453
+ self.data_ptr = self.valobj.GetChildMemberWithName("data_ptr")
454
+ self.length = self.valobj.GetChildMemberWithName("length").GetValueAsUnsigned()
455
+
456
+ def has_children(self) -> bool:
457
+ return True
458
+
459
+ def num_children(self) -> int:
460
+ return self.length
461
+
462
+ def get_child_index(self, name: str) -> int:
463
+ index = name.lstrip("[").rstrip("]")
464
+ if index.isdigit():
465
+ return int(index)
466
+
467
+ return -1
468
+
469
+ def get_child_at_index(self, index: int) -> SBValue:
470
+ if not 0 <= index < self.length:
471
+ return None
472
+ start = self.data_ptr.GetValueAsUnsigned()
473
+ address = start + index
474
+ element = self.data_ptr.CreateValueFromAddress(
475
+ f"[{index}]", address, self.data_ptr.GetType().GetPointeeType()
476
+ )
477
+ return element
478
+
479
+ def get_type_name(self):
480
+ if self.valobj.GetTypeName().startswith("ref_mut"):
481
+ return "&mut str"
482
+ else:
483
+ return "&str"
484
+
485
+
486
+ def _getVariantName(variant: SBValue) -> str:
487
+ """
488
+ Since the enum variant's type name is in the form `TheEnumName::TheVariantName$Variant`,
489
+ we can extract `TheVariantName` from it for display purpose.
490
+ """
491
+ s = variant.GetType().GetName()
492
+ if not s.endswith("$Variant"):
493
+ return ""
494
+
495
+ # trim off path and "$Variant"
496
+ # len("$Variant") == 8
497
+ return s.rsplit("::", 1)[1][:-8]
498
+
499
+
500
+ class ClangEncodedEnumProvider:
501
+ """Pretty-printer for 'clang-encoded' enums support implemented in LLDB"""
502
+
503
+ valobj: SBValue
504
+ variant: SBValue
505
+ value: SBValue
506
+
507
+ DISCRIMINANT_MEMBER_NAME = "$discr$"
508
+ VALUE_MEMBER_NAME = "value"
509
+
510
+ __slots__ = ("valobj", "variant", "value")
511
+
512
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
513
+ self.valobj = valobj
514
+ self.update()
515
+
516
+ def has_children(self) -> bool:
517
+ return self.value.MightHaveChildren()
518
+
519
+ def num_children(self) -> int:
520
+ return self.value.GetNumChildren()
521
+
522
+ def get_child_index(self, name: str) -> int:
523
+ return self.value.GetIndexOfChildWithName(name)
524
+
525
+ def get_child_at_index(self, index: int) -> SBValue:
526
+ return self.value.GetChildAtIndex(index)
527
+
528
+ def update(self):
529
+ all_variants = self.valobj.GetChildAtIndex(0)
530
+ index = self._getCurrentVariantIndex(all_variants)
531
+ self.variant = all_variants.GetChildAtIndex(index)
532
+ self.value = self.variant.GetChildMemberWithName(
533
+ ClangEncodedEnumProvider.VALUE_MEMBER_NAME
534
+ ).GetSyntheticValue()
535
+
536
+ def _getCurrentVariantIndex(self, all_variants: SBValue) -> int:
537
+ default_index = 0
538
+ for i in range(all_variants.GetNumChildren()):
539
+ variant = all_variants.GetChildAtIndex(i)
540
+ discr = variant.GetChildMemberWithName(
541
+ ClangEncodedEnumProvider.DISCRIMINANT_MEMBER_NAME
542
+ )
543
+ if discr.IsValid():
544
+ discr_unsigned_value = discr.GetValueAsUnsigned()
545
+ if variant.GetName() == f"$variant${discr_unsigned_value}":
546
+ return i
547
+ else:
548
+ default_index = i
549
+ return default_index
550
+
551
+
552
+ def ClangEncodedEnumSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
553
+ enum_synth = ClangEncodedEnumProvider(valobj.GetNonSyntheticValue(), _dict)
554
+ variant = enum_synth.variant
555
+ name = _getVariantName(variant)
556
+
557
+ if valobj.GetNumChildren() == 0:
558
+ return name
559
+
560
+ child_name: str = valobj.GetChildAtIndex(0).name
561
+ if child_name == "0" or child_name == "__0":
562
+ # enum variant is a tuple struct
563
+ return name + TupleSummaryProvider(valobj, _dict)
564
+ else:
565
+ # enum variant is a regular struct
566
+ return name + StructSummaryProvider(valobj, _dict)
567
+
568
+
569
+ class MSVCEnumSyntheticProvider:
570
+ """
571
+ Synthetic provider for sum-type enums on MSVC. For a detailed explanation of the internals,
572
+ see:
573
+
574
+ https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs
575
+ """
576
+
577
+ valobj: SBValue
578
+ variant: SBValue
579
+ value: SBValue
580
+
581
+ __slots__ = ["valobj", "variant", "value"]
582
+
583
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
584
+ self.valobj = valobj
585
+ self.update()
586
+
587
+ def update(self):
588
+ tag: SBValue = self.valobj.GetChildMemberWithName("tag")
589
+
590
+ if tag.IsValid():
591
+ tag: int = tag.GetValueAsUnsigned()
592
+ for child in self.valobj.GetNonSyntheticValue().children:
593
+ if not child.name.startswith("variant"):
594
+ continue
595
+
596
+ variant_type: SBType = child.GetType()
597
+ try:
598
+ exact: SBTypeStaticField = variant_type.GetStaticFieldWithName(
599
+ "DISCR_EXACT"
600
+ )
601
+ except AttributeError:
602
+ # LLDB versions prior to 19.0.0 do not have the `SBTypeGetStaticField` API.
603
+ # With current DI generation there's not a great way to provide a "best effort"
604
+ # evaluation either, so we just return the object itself with no further
605
+ # attempts to inspect the type information
606
+ self.variant = self.valobj
607
+ self.value = self.valobj
608
+ return
609
+
610
+ if exact.IsValid():
611
+ discr: int = exact.GetConstantValue(
612
+ self.valobj.target
613
+ ).GetValueAsUnsigned()
614
+ if tag == discr:
615
+ self.variant = child
616
+ self.value = child.GetChildMemberWithName(
617
+ "value"
618
+ ).GetSyntheticValue()
619
+ return
620
+ else: # if invalid, DISCR must be a range
621
+ begin: int = (
622
+ variant_type.GetStaticFieldWithName("DISCR_BEGIN")
623
+ .GetConstantValue(self.valobj.target)
624
+ .GetValueAsUnsigned()
625
+ )
626
+ end: int = (
627
+ variant_type.GetStaticFieldWithName("DISCR_END")
628
+ .GetConstantValue(self.valobj.target)
629
+ .GetValueAsUnsigned()
630
+ )
631
+
632
+ # begin isn't necessarily smaller than end, so we must test for both cases
633
+ if begin < end:
634
+ if begin <= tag <= end:
635
+ self.variant = child
636
+ self.value = child.GetChildMemberWithName(
637
+ "value"
638
+ ).GetSyntheticValue()
639
+ return
640
+ else:
641
+ if tag >= begin or tag <= end:
642
+ self.variant = child
643
+ self.value = child.GetChildMemberWithName(
644
+ "value"
645
+ ).GetSyntheticValue()
646
+ return
647
+ else: # if invalid, tag is a 128 bit value
648
+ tag_lo: int = self.valobj.GetChildMemberWithName(
649
+ "tag128_lo"
650
+ ).GetValueAsUnsigned()
651
+ tag_hi: int = self.valobj.GetChildMemberWithName(
652
+ "tag128_hi"
653
+ ).GetValueAsUnsigned()
654
+
655
+ tag: int = (tag_hi << 64) | tag_lo
656
+
657
+ for child in self.valobj.GetNonSyntheticValue().children:
658
+ if not child.name.startswith("variant"):
659
+ continue
660
+
661
+ variant_type: SBType = child.GetType()
662
+ exact_lo: SBTypeStaticField = variant_type.GetStaticFieldWithName(
663
+ "DISCR128_EXACT_LO"
664
+ )
665
+
666
+ if exact_lo.IsValid():
667
+ exact_lo: int = exact_lo.GetConstantValue(
668
+ self.valobj.target
669
+ ).GetValueAsUnsigned()
670
+ exact_hi: int = (
671
+ variant_type.GetStaticFieldWithName("DISCR128_EXACT_HI")
672
+ .GetConstantValue(self.valobj.target)
673
+ .GetValueAsUnsigned()
674
+ )
675
+
676
+ discr: int = (exact_hi << 64) | exact_lo
677
+ if tag == discr:
678
+ self.variant = child
679
+ self.value = child.GetChildMemberWithName(
680
+ "value"
681
+ ).GetSyntheticValue()
682
+ return
683
+ else: # if invalid, DISCR must be a range
684
+ begin_lo: int = (
685
+ variant_type.GetStaticFieldWithName("DISCR128_BEGIN_LO")
686
+ .GetConstantValue(self.valobj.target)
687
+ .GetValueAsUnsigned()
688
+ )
689
+ begin_hi: int = (
690
+ variant_type.GetStaticFieldWithName("DISCR128_BEGIN_HI")
691
+ .GetConstantValue(self.valobj.target)
692
+ .GetValueAsUnsigned()
693
+ )
694
+
695
+ end_lo: int = (
696
+ variant_type.GetStaticFieldWithName("DISCR128_END_LO")
697
+ .GetConstantValue(self.valobj.target)
698
+ .GetValueAsUnsigned()
699
+ )
700
+ end_hi: int = (
701
+ variant_type.GetStaticFieldWithName("DISCR128_END_HI")
702
+ .GetConstantValue(self.valobj.target)
703
+ .GetValueAsUnsigned()
704
+ )
705
+
706
+ begin = (begin_hi << 64) | begin_lo
707
+ end = (end_hi << 64) | end_lo
708
+
709
+ # begin isn't necessarily smaller than end, so we must test for both cases
710
+ if begin < end:
711
+ if begin <= tag <= end:
712
+ self.variant = child
713
+ self.value = child.GetChildMemberWithName(
714
+ "value"
715
+ ).GetSyntheticValue()
716
+ return
717
+ else:
718
+ if tag >= begin or tag <= end:
719
+ self.variant = child
720
+ self.value = child.GetChildMemberWithName(
721
+ "value"
722
+ ).GetSyntheticValue()
723
+ return
724
+
725
+ def num_children(self) -> int:
726
+ return self.value.GetNumChildren()
727
+
728
+ def get_child_index(self, name: str) -> int:
729
+ return self.value.GetIndexOfChildWithName(name)
730
+
731
+ def get_child_at_index(self, index: int) -> SBValue:
732
+ return self.value.GetChildAtIndex(index)
733
+
734
+ def has_children(self) -> bool:
735
+ return self.value.MightHaveChildren()
736
+
737
+ def get_type_name(self) -> str:
738
+ name = self.valobj.GetTypeName()
739
+ # remove "enum2$<", str.removeprefix() is python 3.9+
740
+ name = name[7:]
741
+
742
+ # MSVC misinterprets ">>" as a shift operator, so spaces are inserted by rust to
743
+ # avoid that
744
+ if name.endswith(" >"):
745
+ name = name[:-2]
746
+ elif name.endswith(">"):
747
+ name = name[:-1]
748
+
749
+ return name
750
+
751
+
752
+ def MSVCEnumSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
753
+ enum_synth = MSVCEnumSyntheticProvider(valobj.GetNonSyntheticValue(), _dict)
754
+ variant_names: SBType = valobj.target.FindFirstType(
755
+ f"{enum_synth.valobj.GetTypeName()}::VariantNames"
756
+ )
757
+ try:
758
+ name_idx = (
759
+ enum_synth.variant.GetType()
760
+ .GetStaticFieldWithName("NAME")
761
+ .GetConstantValue(valobj.target)
762
+ .GetValueAsUnsigned()
763
+ )
764
+ except AttributeError:
765
+ # LLDB versions prior to 19 do not have the `SBTypeGetStaticField` API, and have no way
766
+ # to determine the value based on the tag field.
767
+ tag: SBValue = valobj.GetChildMemberWithName("tag")
768
+
769
+ if tag.IsValid():
770
+ discr: int = tag.GetValueAsUnsigned()
771
+ return "".join(["{tag = ", str(tag.unsigned), "}"])
772
+ else:
773
+ tag_lo: int = valobj.GetChildMemberWithName(
774
+ "tag128_lo"
775
+ ).GetValueAsUnsigned()
776
+ tag_hi: int = valobj.GetChildMemberWithName(
777
+ "tag128_hi"
778
+ ).GetValueAsUnsigned()
779
+
780
+ discr: int = (tag_hi << 64) | tag_lo
781
+
782
+ return "".join(["{tag = ", str(discr), "}"])
783
+
784
+ name: str = variant_names.enum_members[name_idx].name
785
+
786
+ if enum_synth.num_children() == 0:
787
+ return name
788
+
789
+ child_name: str = enum_synth.value.GetChildAtIndex(0).name
790
+ if child_name == "0" or child_name == "__0":
791
+ # enum variant is a tuple struct
792
+ return name + TupleSummaryProvider(enum_synth.value, _dict)
793
+ else:
794
+ # enum variant is a regular struct
795
+ return name + StructSummaryProvider(enum_synth.value, _dict)
796
+
797
+
798
+ class TupleSyntheticProvider:
799
+ """Pretty-printer for tuples and tuple enum variants"""
800
+
801
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque, is_variant: bool = False):
802
+ # logger = Logger.Logger()
803
+ self.valobj = valobj
804
+ self.is_variant = is_variant
805
+ self.type = valobj.GetType()
806
+
807
+ if is_variant:
808
+ self.size = self.type.GetNumberOfFields() - 1
809
+ else:
810
+ self.size = self.type.GetNumberOfFields()
811
+
812
+ def num_children(self) -> int:
813
+ return self.size
814
+
815
+ def get_child_index(self, name: str) -> int:
816
+ if name.isdigit():
817
+ return int(name)
818
+ else:
819
+ return -1
820
+
821
+ def get_child_at_index(self, index: int) -> SBValue:
822
+ if self.is_variant:
823
+ field = self.type.GetFieldAtIndex(index + 1)
824
+ else:
825
+ field = self.type.GetFieldAtIndex(index)
826
+ element = self.valobj.GetChildMemberWithName(field.name)
827
+ return self.valobj.CreateValueFromData(
828
+ str(index), element.GetData(), element.GetType()
829
+ )
830
+
831
+ def update(self):
832
+ pass
833
+
834
+ def has_children(self) -> bool:
835
+ return True
836
+
837
+
838
+ class MSVCTupleSyntheticProvider:
839
+ __slots__ = ["valobj"]
840
+
841
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
842
+ self.valobj = valobj
843
+
844
+ def num_children(self) -> int:
845
+ return self.valobj.GetNumChildren()
846
+
847
+ def get_child_index(self, name: str) -> int:
848
+ return self.valobj.GetIndexOfChildWithName(name)
849
+
850
+ def get_child_at_index(self, index: int) -> SBValue:
851
+ child: SBValue = self.valobj.GetChildAtIndex(index)
852
+ offset = self.valobj.GetType().GetFieldAtIndex(index).byte_offset
853
+ return self.valobj.CreateChildAtOffset(str(index), offset, child.GetType())
854
+
855
+ def update(self):
856
+ pass
857
+
858
+ def has_children(self) -> bool:
859
+ return self.valobj.MightHaveChildren()
860
+
861
+ def get_type_name(self) -> str:
862
+ name = self.valobj.GetTypeName()
863
+ # remove "tuple$<" and ">", str.removeprefix and str.removesuffix require python 3.9+
864
+ name = name[7:-1].strip()
865
+ return "(" + name + ")"
866
+
867
+
868
+ class StdVecSyntheticProvider:
869
+ """Pretty-printer for alloc::vec::Vec<T>
870
+
871
+ struct Vec<T> { buf: RawVec<T>, len: usize }
872
+ rust 1.75: struct RawVec<T> { ptr: Unique<T>, cap: usize, ... }
873
+ rust 1.76: struct RawVec<T> { ptr: Unique<T>, cap: Cap(usize), ... }
874
+ rust 1.31.1: struct Unique<T: ?Sized> { pointer: NonZero<*const T>, ... }
875
+ rust 1.33.0: struct Unique<T: ?Sized> { pointer: *const T, ... }
876
+ rust 1.62.0: struct Unique<T: ?Sized> { pointer: NonNull<T>, ... }
877
+ struct NonZero<T>(T)
878
+ struct NonNull<T> { pointer: *const T }
879
+ """
880
+
881
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
882
+ # logger = Logger.Logger()
883
+ # logger >> "[StdVecSyntheticProvider] for " + str(valobj.GetName())
884
+ self.valobj = valobj
885
+ self.element_type = None
886
+ self.update()
887
+
888
+ def num_children(self) -> int:
889
+ return self.length
890
+
891
+ def get_child_index(self, name: str) -> int:
892
+ index = name.lstrip("[").rstrip("]")
893
+ if index.isdigit():
894
+ return int(index)
895
+ else:
896
+ return -1
897
+
898
+ def get_child_at_index(self, index: int) -> SBValue:
899
+ start = self.data_ptr.GetValueAsUnsigned()
900
+ address = start + index * self.element_type_size
901
+ element = self.data_ptr.CreateValueFromAddress(
902
+ "[%s]" % index, address, self.element_type
903
+ )
904
+ return element
905
+
906
+ def update(self):
907
+ self.length = self.valobj.GetChildMemberWithName("len").GetValueAsUnsigned()
908
+ self.buf = self.valobj.GetChildMemberWithName("buf").GetChildMemberWithName(
909
+ "inner"
910
+ )
911
+
912
+ self.data_ptr = unwrap_unique_or_non_null(
913
+ self.buf.GetChildMemberWithName("ptr")
914
+ )
915
+
916
+ self.element_type = self.valobj.GetType().GetTemplateArgumentType(0)
917
+
918
+ if not self.element_type.IsValid():
919
+ arg_name = next(get_template_args(self.valobj.GetTypeName()))
920
+
921
+ self.element_type = resolve_msvc_template_arg(arg_name, self.valobj.target)
922
+
923
+ self.element_type_size = self.element_type.GetByteSize()
924
+
925
+ def has_children(self) -> bool:
926
+ return True
927
+
928
+
929
+ class StdSliceSyntheticProvider:
930
+ __slots__ = ["valobj", "length", "data_ptr", "element_type", "element_size"]
931
+
932
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
933
+ self.valobj = valobj
934
+ self.update()
935
+
936
+ def num_children(self) -> int:
937
+ return self.length
938
+
939
+ def get_child_index(self, name: str) -> int:
940
+ index = name.lstrip("[").rstrip("]")
941
+ if index.isdigit():
942
+ return int(index)
943
+ else:
944
+ return -1
945
+
946
+ def get_child_at_index(self, index: int) -> SBValue:
947
+ start = self.data_ptr.GetValueAsUnsigned()
948
+ address = start + index * self.element_size
949
+ element = self.data_ptr.CreateValueFromAddress(
950
+ "[%s]" % index, address, self.element_type
951
+ )
952
+ return element
953
+
954
+ def update(self):
955
+ self.length = self.valobj.GetChildMemberWithName("length").GetValueAsUnsigned()
956
+ self.data_ptr = self.valobj.GetChildMemberWithName("data_ptr")
957
+
958
+ self.element_type = self.data_ptr.GetType().GetPointeeType()
959
+ self.element_size = self.element_type.GetByteSize()
960
+
961
+ def has_children(self) -> bool:
962
+ return True
963
+
964
+
965
+ class MSVCStdSliceSyntheticProvider(StdSliceSyntheticProvider):
966
+ def get_type_name(self) -> str:
967
+ name = self.valobj.GetTypeName()
968
+
969
+ if name.startswith("ref_mut"):
970
+ # remove "ref_mut$<slice2$<" and trailing "> >"
971
+ name = name[17:-3]
972
+ ref = "&mut "
973
+ else:
974
+ # remove "ref$<slice2$<" and trailing "> >"
975
+ name = name[13:-3]
976
+ ref = "&"
977
+
978
+ return "".join([ref, "[", name, "]"])
979
+
980
+
981
+ def StdSliceSummaryProvider(valobj, dict):
982
+ output = sequence_formatter("[", valobj, dict)
983
+ output += "]"
984
+ return output
985
+
986
+
987
+ class StdVecDequeSyntheticProvider:
988
+ """Pretty-printer for alloc::collections::vec_deque::VecDeque<T>
989
+
990
+ struct VecDeque<T> { head: usize, len: usize, buf: RawVec<T> }
991
+ """
992
+
993
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
994
+ # logger = Logger.Logger()
995
+ # logger >> "[StdVecDequeSyntheticProvider] for " + str(valobj.GetName())
996
+ self.valobj = valobj
997
+ self.element_type = None
998
+ self.update()
999
+
1000
+ def num_children(self) -> int:
1001
+ return self.size
1002
+
1003
+ def get_child_index(self, name: str) -> int:
1004
+ index = name.lstrip("[").rstrip("]")
1005
+ if index.isdigit() and int(index) < self.size:
1006
+ return int(index)
1007
+ else:
1008
+ return -1
1009
+
1010
+ def get_child_at_index(self, index: int) -> SBValue:
1011
+ start = self.data_ptr.GetValueAsUnsigned()
1012
+ address = start + ((index + self.head) % self.cap) * self.element_type_size
1013
+ element = self.data_ptr.CreateValueFromAddress(
1014
+ "[%s]" % index, address, self.element_type
1015
+ )
1016
+ return element
1017
+
1018
+ def update(self):
1019
+ self.head = self.valobj.GetChildMemberWithName("head").GetValueAsUnsigned()
1020
+ self.size = self.valobj.GetChildMemberWithName("len").GetValueAsUnsigned()
1021
+ self.buf = self.valobj.GetChildMemberWithName("buf").GetChildMemberWithName(
1022
+ "inner"
1023
+ )
1024
+ cap = self.buf.GetChildMemberWithName("cap")
1025
+ if cap.GetType().num_fields == 1:
1026
+ cap = cap.GetChildAtIndex(0)
1027
+ self.cap = cap.GetValueAsUnsigned()
1028
+
1029
+ self.data_ptr = unwrap_unique_or_non_null(
1030
+ self.buf.GetChildMemberWithName("ptr")
1031
+ )
1032
+
1033
+ self.element_type = self.valobj.GetType().GetTemplateArgumentType(0)
1034
+
1035
+ if not self.element_type.IsValid():
1036
+ arg_name = next(get_template_args(self.valobj.GetTypeName()))
1037
+
1038
+ self.element_type = resolve_msvc_template_arg(arg_name, self.valobj.target)
1039
+
1040
+ self.element_type_size = self.element_type.GetByteSize()
1041
+
1042
+ def has_children(self) -> bool:
1043
+ return True
1044
+
1045
+
1046
+ # BACKCOMPAT: rust 1.35
1047
+ class StdOldHashMapSyntheticProvider:
1048
+ """Pretty-printer for std::collections::hash::map::HashMap<K, V, S>
1049
+
1050
+ struct HashMap<K, V, S> {..., table: RawTable<K, V>, ... }
1051
+ struct RawTable<K, V> { capacity_mask: usize, size: usize, hashes: TaggedHashUintPtr, ... }
1052
+ """
1053
+
1054
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque, show_values: bool = True):
1055
+ self.valobj = valobj
1056
+ self.show_values = show_values
1057
+ self.update()
1058
+
1059
+ def num_children(self) -> int:
1060
+ return self.size
1061
+
1062
+ def get_child_index(self, name: str) -> int:
1063
+ index = name.lstrip("[").rstrip("]")
1064
+ if index.isdigit():
1065
+ return int(index)
1066
+ else:
1067
+ return -1
1068
+
1069
+ def get_child_at_index(self, index: int) -> SBValue:
1070
+ # logger = Logger.Logger()
1071
+ start = self.data_ptr.GetValueAsUnsigned() & ~1
1072
+
1073
+ # See `libstd/collections/hash/table.rs:raw_bucket_at
1074
+ hashes = self.hash_uint_size * self.capacity
1075
+ align = self.pair_type_size
1076
+ # See `libcore/alloc.rs:padding_needed_for`
1077
+ len_rounded_up = (
1078
+ (
1079
+ (((hashes + align) % self.modulo - 1) % self.modulo)
1080
+ & ~((align - 1) % self.modulo)
1081
+ )
1082
+ % self.modulo
1083
+ - hashes
1084
+ ) % self.modulo
1085
+ # len_rounded_up = ((hashes + align - 1) & ~(align - 1)) - hashes
1086
+
1087
+ pairs_offset = hashes + len_rounded_up
1088
+ pairs_start = start + pairs_offset
1089
+
1090
+ table_index = self.valid_indices[index]
1091
+ idx = table_index & self.capacity_mask
1092
+ address = pairs_start + idx * self.pair_type_size
1093
+ element = self.data_ptr.CreateValueFromAddress(
1094
+ "[%s]" % index, address, self.pair_type
1095
+ )
1096
+ if self.show_values:
1097
+ return element
1098
+ else:
1099
+ key = element.GetChildAtIndex(0)
1100
+ return self.valobj.CreateValueFromData(
1101
+ "[%s]" % index, key.GetData(), key.GetType()
1102
+ )
1103
+
1104
+ def update(self):
1105
+ # logger = Logger.Logger()
1106
+
1107
+ self.table = self.valobj.GetChildMemberWithName("table") # type: SBValue
1108
+ self.size = self.table.GetChildMemberWithName("size").GetValueAsUnsigned()
1109
+ self.hashes = self.table.GetChildMemberWithName("hashes")
1110
+ self.hash_uint_type = self.hashes.GetType()
1111
+ self.hash_uint_size = self.hashes.GetType().GetByteSize()
1112
+ self.modulo = 2**self.hash_uint_size
1113
+ self.data_ptr = self.hashes.GetChildAtIndex(0).GetChildAtIndex(0)
1114
+
1115
+ self.capacity_mask = self.table.GetChildMemberWithName(
1116
+ "capacity_mask"
1117
+ ).GetValueAsUnsigned()
1118
+ self.capacity = (self.capacity_mask + 1) % self.modulo
1119
+
1120
+ marker = self.table.GetChildMemberWithName("marker").GetType() # type: SBType
1121
+ self.pair_type = marker.template_args[0]
1122
+ self.pair_type_size = self.pair_type.GetByteSize()
1123
+
1124
+ self.valid_indices = []
1125
+ for idx in range(self.capacity):
1126
+ address = self.data_ptr.GetValueAsUnsigned() + idx * self.hash_uint_size
1127
+ hash_uint = self.data_ptr.CreateValueFromAddress(
1128
+ "[%s]" % idx, address, self.hash_uint_type
1129
+ )
1130
+ hash_ptr = hash_uint.GetChildAtIndex(0).GetChildAtIndex(0)
1131
+ if hash_ptr.GetValueAsUnsigned() != 0:
1132
+ self.valid_indices.append(idx)
1133
+
1134
+ # logger >> "Valid indices: {}".format(str(self.valid_indices))
1135
+
1136
+ def has_children(self) -> bool:
1137
+ return True
1138
+
1139
+
1140
+ class StdHashMapSyntheticProvider:
1141
+ """Pretty-printer for hashbrown's HashMap"""
1142
+
1143
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque, show_values: bool = True):
1144
+ self.valobj = valobj
1145
+ self.show_values = show_values
1146
+ self.update()
1147
+
1148
+ def num_children(self) -> int:
1149
+ return self.size
1150
+
1151
+ def get_child_index(self, name: str) -> int:
1152
+ index = name.lstrip("[").rstrip("]")
1153
+ if index.isdigit():
1154
+ return int(index)
1155
+ else:
1156
+ return -1
1157
+
1158
+ def get_child_at_index(self, index: int) -> SBValue:
1159
+ pairs_start = self.data_ptr.GetValueAsUnsigned()
1160
+ idx = self.valid_indices[index]
1161
+ if self.new_layout:
1162
+ idx = -(idx + 1)
1163
+ address = pairs_start + idx * self.pair_type_size
1164
+ element = self.data_ptr.CreateValueFromAddress(
1165
+ "[%s]" % index, address, self.pair_type
1166
+ )
1167
+
1168
+ if self.show_values:
1169
+ return element
1170
+ else:
1171
+ key = element.GetChildAtIndex(0)
1172
+ return self.valobj.CreateValueFromData(
1173
+ "[%s]" % index, key.GetData(), key.GetType()
1174
+ )
1175
+
1176
+ def update(self):
1177
+ table = self.table()
1178
+ inner_table = table.GetChildMemberWithName("table")
1179
+
1180
+ capacity = (
1181
+ inner_table.GetChildMemberWithName("bucket_mask").GetValueAsUnsigned() + 1
1182
+ )
1183
+ ctrl = inner_table.GetChildMemberWithName("ctrl").GetChildAtIndex(0)
1184
+
1185
+ self.size = inner_table.GetChildMemberWithName("items").GetValueAsUnsigned()
1186
+
1187
+ self.pair_type = table.GetType().GetTemplateArgumentType(0)
1188
+
1189
+ if not self.pair_type.IsValid():
1190
+ arg_name = next(get_template_args(table.GetTypeName()))
1191
+
1192
+ self.pair_type = resolve_msvc_template_arg(arg_name, self.valobj.target)
1193
+
1194
+ if self.pair_type.IsTypedefType():
1195
+ self.pair_type = self.pair_type.GetTypedefedType()
1196
+ self.pair_type_size = self.pair_type.GetByteSize()
1197
+
1198
+ self.new_layout = not inner_table.GetChildMemberWithName("data").IsValid()
1199
+ if self.new_layout:
1200
+ self.data_ptr = ctrl.Cast(self.pair_type.GetPointerType())
1201
+ else:
1202
+ self.data_ptr = inner_table.GetChildMemberWithName("data").GetChildAtIndex(
1203
+ 0
1204
+ )
1205
+
1206
+ u8_type = self.valobj.GetTarget().GetBasicType(eBasicTypeUnsignedChar)
1207
+ u8_type_size = (
1208
+ self.valobj.GetTarget().GetBasicType(eBasicTypeUnsignedChar).GetByteSize()
1209
+ )
1210
+
1211
+ self.valid_indices = []
1212
+ for idx in range(capacity):
1213
+ address = ctrl.GetValueAsUnsigned() + idx * u8_type_size
1214
+ value = ctrl.CreateValueFromAddress(
1215
+ "ctrl[%s]" % idx, address, u8_type
1216
+ ).GetValueAsUnsigned()
1217
+ is_present = value & 128 == 0
1218
+ if is_present:
1219
+ self.valid_indices.append(idx)
1220
+
1221
+ def table(self) -> SBValue:
1222
+ if self.show_values:
1223
+ hashbrown_hashmap = self.valobj.GetChildMemberWithName("base")
1224
+ else:
1225
+ # BACKCOMPAT: rust 1.47
1226
+ # HashSet wraps either std HashMap or hashbrown::HashSet, which both
1227
+ # wrap hashbrown::HashMap, so either way we "unwrap" twice.
1228
+ hashbrown_hashmap = self.valobj.GetChildAtIndex(0).GetChildAtIndex(0)
1229
+ return hashbrown_hashmap.GetChildMemberWithName("table")
1230
+
1231
+ def has_children(self) -> bool:
1232
+ return True
1233
+
1234
+
1235
+ def StdRcSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
1236
+ strong = valobj.GetChildMemberWithName("strong").GetValueAsUnsigned()
1237
+ weak = valobj.GetChildMemberWithName("weak").GetValueAsUnsigned()
1238
+ return "strong={}, weak={}".format(strong, weak)
1239
+
1240
+
1241
+ class StdRcSyntheticProvider:
1242
+ """Pretty-printer for alloc::rc::Rc<T> and alloc::sync::Arc<T>
1243
+
1244
+ struct Rc<T> { ptr: NonNull<RcInner<T>>, ... }
1245
+ rust 1.31.1: struct NonNull<T> { pointer: NonZero<*const T> }
1246
+ rust 1.33.0: struct NonNull<T> { pointer: *const T }
1247
+ struct NonZero<T>(T)
1248
+ struct RcInner<T> { strong: Cell<usize>, weak: Cell<usize>, value: T }
1249
+ struct Cell<T> { value: UnsafeCell<T> }
1250
+ struct UnsafeCell<T> { value: T }
1251
+
1252
+ struct Arc<T> { ptr: NonNull<ArcInner<T>>, ... }
1253
+ struct ArcInner<T> { strong: atomic::AtomicUsize, weak: atomic::AtomicUsize, data: T }
1254
+ struct AtomicUsize { v: UnsafeCell<usize> }
1255
+ """
1256
+
1257
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque, is_atomic: bool = False):
1258
+ self.valobj = valobj
1259
+
1260
+ self.ptr = unwrap_unique_or_non_null(self.valobj.GetChildMemberWithName("ptr"))
1261
+
1262
+ self.value = self.ptr.GetChildMemberWithName("data" if is_atomic else "value")
1263
+
1264
+ self.strong = (
1265
+ self.ptr.GetChildMemberWithName("strong")
1266
+ .GetChildAtIndex(0)
1267
+ .GetChildMemberWithName("value")
1268
+ )
1269
+ self.weak = (
1270
+ self.ptr.GetChildMemberWithName("weak")
1271
+ .GetChildAtIndex(0)
1272
+ .GetChildMemberWithName("value")
1273
+ )
1274
+
1275
+ self.value_builder = ValueBuilder(valobj)
1276
+
1277
+ self.update()
1278
+
1279
+ def num_children(self) -> int:
1280
+ # Actually there are 3 children, but only the `value` should be shown as a child
1281
+ return 1
1282
+
1283
+ def get_child_index(self, name: str) -> int:
1284
+ if name == "value":
1285
+ return 0
1286
+ if name == "strong":
1287
+ return 1
1288
+ if name == "weak":
1289
+ return 2
1290
+ return -1
1291
+
1292
+ def get_child_at_index(self, index: int) -> SBValue:
1293
+ if index == 0:
1294
+ return self.value
1295
+ if index == 1:
1296
+ return self.value_builder.from_uint("strong", self.strong_count)
1297
+ if index == 2:
1298
+ return self.value_builder.from_uint("weak", self.weak_count)
1299
+
1300
+ return None
1301
+
1302
+ def update(self):
1303
+ self.strong_count = self.strong.GetValueAsUnsigned()
1304
+ self.weak_count = self.weak.GetValueAsUnsigned() - 1
1305
+
1306
+ def has_children(self) -> bool:
1307
+ return True
1308
+
1309
+
1310
+ class StdCellSyntheticProvider:
1311
+ """Pretty-printer for std::cell::Cell"""
1312
+
1313
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque):
1314
+ self.valobj = valobj
1315
+ self.value = valobj.GetChildMemberWithName("value").GetChildAtIndex(0)
1316
+
1317
+ def num_children(self) -> int:
1318
+ return 1
1319
+
1320
+ def get_child_index(self, name: str) -> int:
1321
+ if name == "value":
1322
+ return 0
1323
+ return -1
1324
+
1325
+ def get_child_at_index(self, index: int) -> SBValue:
1326
+ if index == 0:
1327
+ return self.value
1328
+ return None
1329
+
1330
+ def update(self):
1331
+ pass
1332
+
1333
+ def has_children(self) -> bool:
1334
+ return True
1335
+
1336
+
1337
+ def StdRefSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
1338
+ borrow = valobj.GetChildMemberWithName("borrow").GetValueAsSigned()
1339
+ return (
1340
+ "borrow={}".format(borrow) if borrow >= 0 else "borrow_mut={}".format(-borrow)
1341
+ )
1342
+
1343
+
1344
+ class StdRefSyntheticProvider:
1345
+ """Pretty-printer for std::cell::Ref, std::cell::RefMut, and std::cell::RefCell"""
1346
+
1347
+ def __init__(self, valobj: SBValue, _dict: LLDBOpaque, is_cell: bool = False):
1348
+ self.valobj = valobj
1349
+
1350
+ borrow = valobj.GetChildMemberWithName("borrow")
1351
+ value = valobj.GetChildMemberWithName("value")
1352
+ if is_cell:
1353
+ self.borrow = borrow.GetChildMemberWithName("value").GetChildMemberWithName(
1354
+ "value"
1355
+ )
1356
+ self.value = value.GetChildMemberWithName("value")
1357
+ else:
1358
+ self.borrow = (
1359
+ borrow.GetChildMemberWithName("borrow")
1360
+ .GetChildMemberWithName("value")
1361
+ .GetChildMemberWithName("value")
1362
+ )
1363
+ self.value = value.Dereference()
1364
+
1365
+ self.value_builder = ValueBuilder(valobj)
1366
+
1367
+ self.update()
1368
+
1369
+ def num_children(self) -> int:
1370
+ # Actually there are 2 children, but only the `value` should be shown as a child
1371
+ return 1
1372
+
1373
+ def get_child_index(self, name: str) -> int:
1374
+ if name == "value":
1375
+ return 0
1376
+ if name == "borrow":
1377
+ return 1
1378
+ return -1
1379
+
1380
+ def get_child_at_index(self, index: int) -> SBValue:
1381
+ if index == 0:
1382
+ return self.value
1383
+ if index == 1:
1384
+ return self.value_builder.from_int("borrow", self.borrow_count)
1385
+ return None
1386
+
1387
+ def update(self):
1388
+ self.borrow_count = self.borrow.GetValueAsSigned()
1389
+
1390
+ def has_children(self) -> bool:
1391
+ return True
1392
+
1393
+
1394
+ def StdNonZeroNumberSummaryProvider(valobj: SBValue, _dict: LLDBOpaque) -> str:
1395
+ inner = valobj.GetChildAtIndex(0)
1396
+ inner_inner = inner.GetChildAtIndex(0)
1397
+
1398
+ # FIXME: Avoid printing as character literal,
1399
+ # see https://github.com/llvm/llvm-project/issues/65076.
1400
+ if inner_inner.GetTypeName() in ["char", "unsigned char"]:
1401
+ return str(inner_inner.GetValueAsSigned())
1402
+ else:
1403
+ return inner_inner.GetValue()
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc/rust_types.py ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import List
2
+ import re
3
+
4
+
5
+ class RustType(object):
6
+ OTHER = "Other"
7
+ STRUCT = "Struct"
8
+ TUPLE = "Tuple"
9
+ CSTYLE_VARIANT = "CStyleVariant"
10
+ TUPLE_VARIANT = "TupleVariant"
11
+ STRUCT_VARIANT = "StructVariant"
12
+ ENUM = "Enum"
13
+ EMPTY = "Empty"
14
+ SINGLETON_ENUM = "SingletonEnum"
15
+ REGULAR_ENUM = "RegularEnum"
16
+ COMPRESSED_ENUM = "CompressedEnum"
17
+ REGULAR_UNION = "RegularUnion"
18
+
19
+ STD_STRING = "StdString"
20
+ STD_OS_STRING = "StdOsString"
21
+ STD_STR = "StdStr"
22
+ STD_SLICE = "StdSlice"
23
+ STD_VEC = "StdVec"
24
+ STD_VEC_DEQUE = "StdVecDeque"
25
+ STD_BTREE_SET = "StdBTreeSet"
26
+ STD_BTREE_MAP = "StdBTreeMap"
27
+ STD_HASH_MAP = "StdHashMap"
28
+ STD_HASH_SET = "StdHashSet"
29
+ STD_RC = "StdRc"
30
+ STD_ARC = "StdArc"
31
+ STD_CELL = "StdCell"
32
+ STD_REF = "StdRef"
33
+ STD_REF_MUT = "StdRefMut"
34
+ STD_REF_CELL = "StdRefCell"
35
+ STD_NONZERO_NUMBER = "StdNonZeroNumber"
36
+ STD_PATH = "StdPath"
37
+ STD_PATHBUF = "StdPathBuf"
38
+
39
+
40
+ STD_STRING_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)String$")
41
+ STD_STR_REGEX = re.compile(r"^&(mut )?str$")
42
+ STD_SLICE_REGEX = re.compile(r"^&(mut )?\[.+\]$")
43
+ STD_OS_STRING_REGEX = re.compile(r"^(std::ffi::([a-z_]+::)+)OsString$")
44
+ STD_VEC_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)Vec<.+>$")
45
+ STD_VEC_DEQUE_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)VecDeque<.+>$")
46
+ STD_BTREE_SET_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)BTreeSet<.+>$")
47
+ STD_BTREE_MAP_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)BTreeMap<.+>$")
48
+ STD_HASH_MAP_REGEX = re.compile(r"^(std::collections::([a-z_]+::)+)HashMap<.+>$")
49
+ STD_HASH_SET_REGEX = re.compile(r"^(std::collections::([a-z_]+::)+)HashSet<.+>$")
50
+ STD_RC_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)Rc<.+>$")
51
+ STD_ARC_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)Arc<.+>$")
52
+ STD_CELL_REGEX = re.compile(r"^(core::([a-z_]+::)+)Cell<.+>$")
53
+ STD_REF_REGEX = re.compile(r"^(core::([a-z_]+::)+)Ref<.+>$")
54
+ STD_REF_MUT_REGEX = re.compile(r"^(core::([a-z_]+::)+)RefMut<.+>$")
55
+ STD_REF_CELL_REGEX = re.compile(r"^(core::([a-z_]+::)+)RefCell<.+>$")
56
+ STD_NONZERO_NUMBER_REGEX = re.compile(r"^(core::([a-z_]+::)+)NonZero<.+>$")
57
+ STD_PATHBUF_REGEX = re.compile(r"^(std::([a-z_]+::)+)PathBuf$")
58
+ STD_PATH_REGEX = re.compile(r"^&(mut )?(std::([a-z_]+::)+)Path$")
59
+
60
+ TUPLE_ITEM_REGEX = re.compile(r"__\d+$")
61
+
62
+ ENCODED_ENUM_PREFIX = "RUST$ENCODED$ENUM$"
63
+ ENUM_DISR_FIELD_NAME = "<<variant>>"
64
+ ENUM_LLDB_ENCODED_VARIANTS = "$variants$"
65
+
66
+ STD_TYPE_TO_REGEX = {
67
+ RustType.STD_STRING: STD_STRING_REGEX,
68
+ RustType.STD_OS_STRING: STD_OS_STRING_REGEX,
69
+ RustType.STD_STR: STD_STR_REGEX,
70
+ RustType.STD_SLICE: STD_SLICE_REGEX,
71
+ RustType.STD_VEC: STD_VEC_REGEX,
72
+ RustType.STD_VEC_DEQUE: STD_VEC_DEQUE_REGEX,
73
+ RustType.STD_HASH_MAP: STD_HASH_MAP_REGEX,
74
+ RustType.STD_HASH_SET: STD_HASH_SET_REGEX,
75
+ RustType.STD_BTREE_SET: STD_BTREE_SET_REGEX,
76
+ RustType.STD_BTREE_MAP: STD_BTREE_MAP_REGEX,
77
+ RustType.STD_RC: STD_RC_REGEX,
78
+ RustType.STD_ARC: STD_ARC_REGEX,
79
+ RustType.STD_REF: STD_REF_REGEX,
80
+ RustType.STD_REF_MUT: STD_REF_MUT_REGEX,
81
+ RustType.STD_REF_CELL: STD_REF_CELL_REGEX,
82
+ RustType.STD_CELL: STD_CELL_REGEX,
83
+ RustType.STD_NONZERO_NUMBER: STD_NONZERO_NUMBER_REGEX,
84
+ RustType.STD_PATHBUF: STD_PATHBUF_REGEX,
85
+ RustType.STD_PATH: STD_PATH_REGEX,
86
+ }
87
+
88
+
89
+ def is_tuple_fields(fields: List) -> bool:
90
+ return all(TUPLE_ITEM_REGEX.match(str(field.name)) for field in fields)
91
+
92
+
93
+ def classify_struct(name: str, fields: List) -> str:
94
+ if len(fields) == 0:
95
+ return RustType.EMPTY
96
+
97
+ for ty, regex in STD_TYPE_TO_REGEX.items():
98
+ if regex.match(name):
99
+ return ty
100
+
101
+ # <<variant>> is emitted by GDB while LLDB(18.1+) emits "$variants$"
102
+ if (
103
+ fields[0].name == ENUM_DISR_FIELD_NAME
104
+ or fields[0].name == ENUM_LLDB_ENCODED_VARIANTS
105
+ ):
106
+ return RustType.ENUM
107
+
108
+ if is_tuple_fields(fields):
109
+ return RustType.TUPLE
110
+
111
+ return RustType.STRUCT
112
+
113
+
114
+ def classify_union(fields: List) -> str:
115
+ if len(fields) == 0:
116
+ return RustType.EMPTY
117
+
118
+ first_variant_name = fields[0].name
119
+ if first_variant_name is None:
120
+ if len(fields) == 1:
121
+ return RustType.SINGLETON_ENUM
122
+ else:
123
+ return RustType.REGULAR_ENUM
124
+ elif first_variant_name.startswith(ENCODED_ENUM_PREFIX):
125
+ assert len(fields) == 1
126
+ return RustType.COMPRESSED_ENUM
127
+ else:
128
+ return RustType.REGULAR_UNION
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-cargo-x86_64-pc-windows-msvc ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ file:bin/cargo.exe
2
+ file:bin/cargo.pdb
3
+ file:etc/bash_completion.d/cargo
4
+ file:share/doc/cargo/LICENSE-APACHE
5
+ file:share/doc/cargo/LICENSE-MIT
6
+ file:share/doc/cargo/LICENSE-THIRD-PARTY
7
+ file:share/doc/cargo/README.md
8
+ file:share/man/man1/cargo-add.1
9
+ file:share/man/man1/cargo-bench.1
10
+ file:share/man/man1/cargo-build.1
11
+ file:share/man/man1/cargo-check.1
12
+ file:share/man/man1/cargo-clean.1
13
+ file:share/man/man1/cargo-doc.1
14
+ file:share/man/man1/cargo-fetch.1
15
+ file:share/man/man1/cargo-fix.1
16
+ file:share/man/man1/cargo-generate-lockfile.1
17
+ file:share/man/man1/cargo-help.1
18
+ file:share/man/man1/cargo-info.1
19
+ file:share/man/man1/cargo-init.1
20
+ file:share/man/man1/cargo-install.1
21
+ file:share/man/man1/cargo-locate-project.1
22
+ file:share/man/man1/cargo-login.1
23
+ file:share/man/man1/cargo-logout.1
24
+ file:share/man/man1/cargo-metadata.1
25
+ file:share/man/man1/cargo-new.1
26
+ file:share/man/man1/cargo-owner.1
27
+ file:share/man/man1/cargo-package.1
28
+ file:share/man/man1/cargo-pkgid.1
29
+ file:share/man/man1/cargo-publish.1
30
+ file:share/man/man1/cargo-remove.1
31
+ file:share/man/man1/cargo-report-future-incompatibilities.1
32
+ file:share/man/man1/cargo-report.1
33
+ file:share/man/man1/cargo-run.1
34
+ file:share/man/man1/cargo-rustc.1
35
+ file:share/man/man1/cargo-rustdoc.1
36
+ file:share/man/man1/cargo-search.1
37
+ file:share/man/man1/cargo-test.1
38
+ file:share/man/man1/cargo-tree.1
39
+ file:share/man/man1/cargo-uninstall.1
40
+ file:share/man/man1/cargo-update.1
41
+ file:share/man/man1/cargo-vendor.1
42
+ file:share/man/man1/cargo-version.1
43
+ file:share/man/man1/cargo-yank.1
44
+ file:share/man/man1/cargo.1
45
+ file:share/zsh/site-functions/_cargo
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-clippy-preview-x86_64-pc-windows-msvc ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ file:bin/cargo-clippy.exe
2
+ file:bin/cargo-clippy.pdb
3
+ file:bin/clippy-driver.exe
4
+ file:bin/clippy-driver.pdb
5
+ file:share/doc/clippy/LICENSE-APACHE
6
+ file:share/doc/clippy/LICENSE-MIT
7
+ file:share/doc/clippy/README.md
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rust-analyzer-preview-x86_64-pc-windows-msvc ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ file:bin/rust-analyzer.exe
2
+ file:bin/rust-analyzer.pdb
3
+ file:share/doc/rust-analyzer/LICENSE-APACHE
4
+ file:share/doc/rust-analyzer/LICENSE-MIT
5
+ file:share/doc/rust-analyzer/README.md
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rust-src ADDED
The diff for this file is too large to render. See raw diff
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rust-std-x86_64-pc-windows-msvc ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/liballoc-778893609386d885.rlib
2
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/liballoc-778893609386d885.rmeta
3
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libcfg_if-66ccf9e220034f42.rlib
4
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libcfg_if-66ccf9e220034f42.rmeta
5
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libcompiler_builtins-c5c18940a57badd0.rlib
6
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libcompiler_builtins-c5c18940a57badd0.rmeta
7
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libcore-7c4a4c66f69609a4.rlib
8
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libcore-7c4a4c66f69609a4.rmeta
9
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libgetopts-b5eee3599c71b40b.rlib
10
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libgetopts-b5eee3599c71b40b.rmeta
11
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libhashbrown-d671ea03f4f2cb7f.rlib
12
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libhashbrown-d671ea03f4f2cb7f.rmeta
13
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_abort-59292eecd8b1d16e.rlib
14
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_abort-59292eecd8b1d16e.rmeta
15
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_unwind-2405f2c51aa3033f.rlib
16
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_unwind-2405f2c51aa3033f.rmeta
17
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libproc_macro-e21e6e955e6fcad2.rlib
18
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libproc_macro-e21e6e955e6fcad2.rmeta
19
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libprofiler_builtins-adc74bbcd604917d.rlib
20
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libprofiler_builtins-adc74bbcd604917d.rmeta
21
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_demangle-eda3326d6d941958.rlib
22
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_demangle-eda3326d6d941958.rmeta
23
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_literal_escaper-26a66b580b06d1b8.rlib
24
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_literal_escaper-26a66b580b06d1b8.rmeta
25
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_alloc-fd50af2c77fb0ff8.rlib
26
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_alloc-fd50af2c77fb0ff8.rmeta
27
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_core-70fce068d6af51d0.rlib
28
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_core-70fce068d6af51d0.rmeta
29
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_std-444efa70010dce55.rlib
30
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_std-444efa70010dce55.rmeta
31
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libstd-0cebe7c42cd80226.rlib
32
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libstd-0cebe7c42cd80226.rmeta
33
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libstd_detect-9997abfbe12e9a5a.rlib
34
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libstd_detect-9997abfbe12e9a5a.rmeta
35
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libsysroot-7490860bdc62736d.rlib
36
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libsysroot-7490860bdc62736d.rmeta
37
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libtest-aa8668665eaf52b3.rlib
38
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libtest-aa8668665eaf52b3.rmeta
39
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libunwind-ab072c5f59c422bc.rlib
40
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libunwind-ab072c5f59c422bc.rmeta
41
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libwindows_link-51a83819a91587e9.rlib
42
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/libwindows_link-51a83819a91587e9.rmeta
43
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/std-0cebe7c42cd80226.dll
44
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/std-0cebe7c42cd80226.dll.lib
45
+ file:lib/rustlib/x86_64-pc-windows-msvc/lib/std-0cebe7c42cd80226.pdb
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rustc-x86_64-pc-windows-msvc ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ file:bin/rust-gdb
2
+ file:bin/rust-gdbgui
3
+ file:bin/rust-lldb
4
+ file:bin/rust-windbg.cmd
5
+ file:bin/rustc.exe
6
+ file:bin/rustc.pdb
7
+ file:bin/rustc_driver-0f1b6065992ac7c3.dll
8
+ file:bin/rustc_driver-0f1b6065992ac7c3.pdb
9
+ file:bin/rustc_main-1ce660e6f7b09dfc.pdb
10
+ file:bin/rustdoc.exe
11
+ file:bin/rustdoc.pdb
12
+ file:bin/std-0cebe7c42cd80226.dll
13
+ file:bin/std-0cebe7c42cd80226.pdb
14
+ file:etc/target-spec-json-schema.json
15
+ file:lib/rustlib/etc/gdb_load_rust_pretty_printers.py
16
+ file:lib/rustlib/etc/gdb_lookup.py
17
+ file:lib/rustlib/etc/gdb_providers.py
18
+ file:lib/rustlib/etc/intrinsic.natvis
19
+ file:lib/rustlib/etc/liballoc.natvis
20
+ file:lib/rustlib/etc/libcore.natvis
21
+ file:lib/rustlib/etc/libstd.natvis
22
+ file:lib/rustlib/etc/lldb_commands
23
+ file:lib/rustlib/etc/lldb_lookup.py
24
+ file:lib/rustlib/etc/lldb_providers.py
25
+ file:lib/rustlib/etc/rust_types.py
26
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/gcc-ld/ld.lld.exe
27
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/gcc-ld/ld.lld.pdb
28
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/gcc-ld/ld64.lld.exe
29
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/gcc-ld/ld64.lld.pdb
30
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/gcc-ld/lld-link.exe
31
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/gcc-ld/lld-link.pdb
32
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/gcc-ld/wasm-ld.exe
33
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/gcc-ld/wasm-ld.pdb
34
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/rust-lld.exe
35
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/rust-objcopy.exe
36
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/wasm-component-ld.exe
37
+ file:lib/rustlib/x86_64-pc-windows-msvc/bin/wasm-component-ld.pdb
38
+ file:libexec/rust-analyzer-proc-macro-srv.exe
39
+ file:libexec/rust-analyzer-proc-macro-srv.pdb
40
+ file:share/doc/rust/COPYRIGHT-library.html
41
+ file:share/doc/rust/COPYRIGHT.html
42
+ file:share/doc/rust/README.md
43
+ file:share/doc/rust/licenses/Apache-2.0.txt
44
+ file:share/doc/rust/licenses/BSD-2-Clause.txt
45
+ file:share/doc/rust/licenses/CC-BY-SA-4.0.txt
46
+ file:share/doc/rust/licenses/GCC-exception-3.1.txt
47
+ file:share/doc/rust/licenses/GPL-2.0-only.txt
48
+ file:share/doc/rust/licenses/GPL-3.0-or-later.txt
49
+ file:share/doc/rust/licenses/ISC.txt
50
+ file:share/doc/rust/licenses/LLVM-exception.txt
51
+ file:share/doc/rust/licenses/MIT.txt
52
+ file:share/doc/rust/licenses/NCSA.txt
53
+ file:share/doc/rust/licenses/OFL-1.1.txt
54
+ file:share/doc/rust/licenses/Unicode-3.0.txt
55
+ file:share/man/man1/rustc.1
56
+ file:share/man/man1/rustdoc.1
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/manifest-rustfmt-preview-x86_64-pc-windows-msvc ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ file:bin/cargo-fmt.exe
2
+ file:bin/cargo-fmt.pdb
3
+ file:bin/rustfmt.exe
4
+ file:bin/rustfmt.pdb
5
+ file:share/doc/rustfmt/LICENSE-APACHE
6
+ file:share/doc/rustfmt/LICENSE-MIT
7
+ file:share/doc/rustfmt/README.md
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/multirust-channel-manifest.toml ADDED
The diff for this file is too large to render. See raw diff
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/multirust-config.toml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ config_version = "1"
2
+
3
+ [[components]]
4
+ pkg = "clippy-preview"
5
+ target = "x86_64-pc-windows-msvc"
6
+ is_extension = true
7
+
8
+ [[components]]
9
+ pkg = "rustfmt-preview"
10
+ target = "x86_64-pc-windows-msvc"
11
+ is_extension = true
12
+
13
+ [[components]]
14
+ pkg = "rust-analyzer-preview"
15
+ target = "x86_64-pc-windows-msvc"
16
+ is_extension = true
17
+
18
+ [[components]]
19
+ pkg = "rust-src"
20
+ target = "*"
21
+ is_extension = true
22
+
23
+ [[components]]
24
+ pkg = "cargo"
25
+ target = "x86_64-pc-windows-msvc"
26
+ is_extension = false
27
+
28
+ [[components]]
29
+ pkg = "rust-std"
30
+ target = "x86_64-pc-windows-msvc"
31
+ is_extension = false
32
+
33
+ [[components]]
34
+ pkg = "rustc"
35
+ target = "x86_64-pc-windows-msvc"
36
+ is_extension = false
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/rust-installer-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/library/Cargo.lock ADDED
@@ -0,0 +1,522 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "addr2line"
7
+ version = "0.25.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
10
+ dependencies = [
11
+ "gimli",
12
+ "rustc-std-workspace-alloc",
13
+ "rustc-std-workspace-core",
14
+ ]
15
+
16
+ [[package]]
17
+ name = "adler2"
18
+ version = "2.0.1"
19
+ source = "registry+https://github.com/rust-lang/crates.io-index"
20
+ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
21
+ dependencies = [
22
+ "rustc-std-workspace-core",
23
+ ]
24
+
25
+ [[package]]
26
+ name = "alloc"
27
+ version = "0.0.0"
28
+ dependencies = [
29
+ "compiler_builtins",
30
+ "core",
31
+ ]
32
+
33
+ [[package]]
34
+ name = "alloctests"
35
+ version = "0.0.0"
36
+ dependencies = [
37
+ "rand",
38
+ "rand_xorshift",
39
+ ]
40
+
41
+ [[package]]
42
+ name = "cc"
43
+ version = "1.2.0"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8"
46
+ dependencies = [
47
+ "shlex",
48
+ ]
49
+
50
+ [[package]]
51
+ name = "cfg-if"
52
+ version = "1.0.4"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
55
+ dependencies = [
56
+ "rustc-std-workspace-core",
57
+ ]
58
+
59
+ [[package]]
60
+ name = "compiler_builtins"
61
+ version = "0.1.160"
62
+ dependencies = [
63
+ "cc",
64
+ "core",
65
+ ]
66
+
67
+ [[package]]
68
+ name = "core"
69
+ version = "0.0.0"
70
+
71
+ [[package]]
72
+ name = "coretests"
73
+ version = "0.0.0"
74
+ dependencies = [
75
+ "rand",
76
+ "rand_xorshift",
77
+ ]
78
+
79
+ [[package]]
80
+ name = "dlmalloc"
81
+ version = "0.2.11"
82
+ source = "registry+https://github.com/rust-lang/crates.io-index"
83
+ checksum = "06cdfe340b16dd990c54cce79743613fa09fbb16774f33a77c9fd196f8f3fa30"
84
+ dependencies = [
85
+ "cfg-if",
86
+ "libc",
87
+ "rustc-std-workspace-core",
88
+ "windows-sys",
89
+ ]
90
+
91
+ [[package]]
92
+ name = "foldhash"
93
+ version = "0.2.0"
94
+ source = "registry+https://github.com/rust-lang/crates.io-index"
95
+ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
96
+
97
+ [[package]]
98
+ name = "fortanix-sgx-abi"
99
+ version = "0.6.1"
100
+ source = "registry+https://github.com/rust-lang/crates.io-index"
101
+ checksum = "5efc85edd5b83e8394f4371dd0da6859dff63dd387dab8568fece6af4cde6f84"
102
+ dependencies = [
103
+ "rustc-std-workspace-core",
104
+ ]
105
+
106
+ [[package]]
107
+ name = "getopts"
108
+ version = "0.2.24"
109
+ source = "registry+https://github.com/rust-lang/crates.io-index"
110
+ checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df"
111
+ dependencies = [
112
+ "rustc-std-workspace-core",
113
+ "rustc-std-workspace-std",
114
+ ]
115
+
116
+ [[package]]
117
+ name = "gimli"
118
+ version = "0.32.3"
119
+ source = "registry+https://github.com/rust-lang/crates.io-index"
120
+ checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
121
+ dependencies = [
122
+ "rustc-std-workspace-alloc",
123
+ "rustc-std-workspace-core",
124
+ ]
125
+
126
+ [[package]]
127
+ name = "hashbrown"
128
+ version = "0.16.1"
129
+ source = "registry+https://github.com/rust-lang/crates.io-index"
130
+ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
131
+ dependencies = [
132
+ "foldhash",
133
+ "rustc-std-workspace-alloc",
134
+ "rustc-std-workspace-core",
135
+ ]
136
+
137
+ [[package]]
138
+ name = "hermit-abi"
139
+ version = "0.5.2"
140
+ source = "registry+https://github.com/rust-lang/crates.io-index"
141
+ checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
142
+ dependencies = [
143
+ "rustc-std-workspace-alloc",
144
+ "rustc-std-workspace-core",
145
+ ]
146
+
147
+ [[package]]
148
+ name = "libc"
149
+ version = "0.2.178"
150
+ source = "registry+https://github.com/rust-lang/crates.io-index"
151
+ checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091"
152
+ dependencies = [
153
+ "rustc-std-workspace-core",
154
+ ]
155
+
156
+ [[package]]
157
+ name = "memchr"
158
+ version = "2.7.6"
159
+ source = "registry+https://github.com/rust-lang/crates.io-index"
160
+ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
161
+ dependencies = [
162
+ "rustc-std-workspace-core",
163
+ ]
164
+
165
+ [[package]]
166
+ name = "miniz_oxide"
167
+ version = "0.8.9"
168
+ source = "registry+https://github.com/rust-lang/crates.io-index"
169
+ checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
170
+ dependencies = [
171
+ "adler2",
172
+ "rustc-std-workspace-alloc",
173
+ "rustc-std-workspace-core",
174
+ ]
175
+
176
+ [[package]]
177
+ name = "moto-rt"
178
+ version = "0.16.0"
179
+ source = "registry+https://github.com/rust-lang/crates.io-index"
180
+ checksum = "29aea9f7dfeb258e030a84e0ec38a9c2ec2063d4f45eb2db31445cfc40b3dba1"
181
+ dependencies = [
182
+ "rustc-std-workspace-alloc",
183
+ "rustc-std-workspace-core",
184
+ ]
185
+
186
+ [[package]]
187
+ name = "object"
188
+ version = "0.37.3"
189
+ source = "registry+https://github.com/rust-lang/crates.io-index"
190
+ checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
191
+ dependencies = [
192
+ "memchr",
193
+ "rustc-std-workspace-alloc",
194
+ "rustc-std-workspace-core",
195
+ ]
196
+
197
+ [[package]]
198
+ name = "panic_abort"
199
+ version = "0.0.0"
200
+ dependencies = [
201
+ "alloc",
202
+ "libc",
203
+ "rustc-std-workspace-core",
204
+ ]
205
+
206
+ [[package]]
207
+ name = "panic_unwind"
208
+ version = "0.0.0"
209
+ dependencies = [
210
+ "alloc",
211
+ "libc",
212
+ "rustc-std-workspace-core",
213
+ "unwind",
214
+ ]
215
+
216
+ [[package]]
217
+ name = "proc_macro"
218
+ version = "0.0.0"
219
+ dependencies = [
220
+ "core",
221
+ "rustc-literal-escaper",
222
+ "std",
223
+ ]
224
+
225
+ [[package]]
226
+ name = "profiler_builtins"
227
+ version = "0.0.0"
228
+ dependencies = [
229
+ "cc",
230
+ ]
231
+
232
+ [[package]]
233
+ name = "r-efi"
234
+ version = "5.3.0"
235
+ source = "registry+https://github.com/rust-lang/crates.io-index"
236
+ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
237
+ dependencies = [
238
+ "rustc-std-workspace-core",
239
+ ]
240
+
241
+ [[package]]
242
+ name = "r-efi-alloc"
243
+ version = "2.1.0"
244
+ source = "registry+https://github.com/rust-lang/crates.io-index"
245
+ checksum = "dc2f58ef3ca9bb0f9c44d9aa8537601bcd3df94cc9314a40178cadf7d4466354"
246
+ dependencies = [
247
+ "r-efi",
248
+ "rustc-std-workspace-core",
249
+ ]
250
+
251
+ [[package]]
252
+ name = "rand"
253
+ version = "0.9.2"
254
+ source = "registry+https://github.com/rust-lang/crates.io-index"
255
+ checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
256
+ dependencies = [
257
+ "rand_core",
258
+ ]
259
+
260
+ [[package]]
261
+ name = "rand_core"
262
+ version = "0.9.3"
263
+ source = "registry+https://github.com/rust-lang/crates.io-index"
264
+ checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
265
+
266
+ [[package]]
267
+ name = "rand_xorshift"
268
+ version = "0.4.0"
269
+ source = "registry+https://github.com/rust-lang/crates.io-index"
270
+ checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a"
271
+ dependencies = [
272
+ "rand_core",
273
+ ]
274
+
275
+ [[package]]
276
+ name = "rustc-demangle"
277
+ version = "0.1.27"
278
+ source = "registry+https://github.com/rust-lang/crates.io-index"
279
+ checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"
280
+ dependencies = [
281
+ "rustc-std-workspace-core",
282
+ ]
283
+
284
+ [[package]]
285
+ name = "rustc-literal-escaper"
286
+ version = "0.0.7"
287
+ source = "registry+https://github.com/rust-lang/crates.io-index"
288
+ checksum = "8be87abb9e40db7466e0681dc8ecd9dcfd40360cb10b4c8fe24a7c4c3669b198"
289
+ dependencies = [
290
+ "rustc-std-workspace-core",
291
+ ]
292
+
293
+ [[package]]
294
+ name = "rustc-std-workspace-alloc"
295
+ version = "1.99.0"
296
+ dependencies = [
297
+ "alloc",
298
+ ]
299
+
300
+ [[package]]
301
+ name = "rustc-std-workspace-core"
302
+ version = "1.99.0"
303
+ dependencies = [
304
+ "compiler_builtins",
305
+ "core",
306
+ ]
307
+
308
+ [[package]]
309
+ name = "rustc-std-workspace-std"
310
+ version = "1.99.0"
311
+ dependencies = [
312
+ "std",
313
+ ]
314
+
315
+ [[package]]
316
+ name = "shlex"
317
+ version = "1.3.0"
318
+ source = "registry+https://github.com/rust-lang/crates.io-index"
319
+ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
320
+
321
+ [[package]]
322
+ name = "std"
323
+ version = "0.0.0"
324
+ dependencies = [
325
+ "addr2line",
326
+ "alloc",
327
+ "cfg-if",
328
+ "core",
329
+ "dlmalloc",
330
+ "fortanix-sgx-abi",
331
+ "hashbrown",
332
+ "hermit-abi",
333
+ "libc",
334
+ "miniz_oxide",
335
+ "moto-rt",
336
+ "object",
337
+ "panic_abort",
338
+ "panic_unwind",
339
+ "r-efi",
340
+ "r-efi-alloc",
341
+ "rand",
342
+ "rand_xorshift",
343
+ "rustc-demangle",
344
+ "std_detect",
345
+ "unwind",
346
+ "vex-sdk",
347
+ "wasi 0.11.1+wasi-snapshot-preview1",
348
+ "wasi 0.14.4+wasi-0.2.4",
349
+ "windows-link 0.0.0",
350
+ ]
351
+
352
+ [[package]]
353
+ name = "std_detect"
354
+ version = "0.1.5"
355
+ dependencies = [
356
+ "libc",
357
+ "rustc-std-workspace-alloc",
358
+ "rustc-std-workspace-core",
359
+ ]
360
+
361
+ [[package]]
362
+ name = "sysroot"
363
+ version = "0.0.0"
364
+ dependencies = [
365
+ "proc_macro",
366
+ "profiler_builtins",
367
+ "std",
368
+ "test",
369
+ ]
370
+
371
+ [[package]]
372
+ name = "test"
373
+ version = "0.0.0"
374
+ dependencies = [
375
+ "core",
376
+ "getopts",
377
+ "libc",
378
+ "std",
379
+ ]
380
+
381
+ [[package]]
382
+ name = "unwind"
383
+ version = "0.0.0"
384
+ dependencies = [
385
+ "libc",
386
+ "rustc-std-workspace-core",
387
+ "unwinding",
388
+ ]
389
+
390
+ [[package]]
391
+ name = "unwinding"
392
+ version = "0.2.8"
393
+ source = "registry+https://github.com/rust-lang/crates.io-index"
394
+ checksum = "60612c845ef41699f39dc8c5391f252942c0a88b7d15da672eff0d14101bbd6d"
395
+ dependencies = [
396
+ "gimli",
397
+ "rustc-std-workspace-core",
398
+ ]
399
+
400
+ [[package]]
401
+ name = "vex-sdk"
402
+ version = "0.27.1"
403
+ source = "registry+https://github.com/rust-lang/crates.io-index"
404
+ checksum = "79e5fe15afde1305478b35e2cb717fff59f485428534cf49cfdbfa4723379bf6"
405
+ dependencies = [
406
+ "rustc-std-workspace-core",
407
+ ]
408
+
409
+ [[package]]
410
+ name = "wasi"
411
+ version = "0.11.1+wasi-snapshot-preview1"
412
+ source = "registry+https://github.com/rust-lang/crates.io-index"
413
+ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
414
+ dependencies = [
415
+ "rustc-std-workspace-alloc",
416
+ "rustc-std-workspace-core",
417
+ ]
418
+
419
+ [[package]]
420
+ name = "wasi"
421
+ version = "0.14.4+wasi-0.2.4"
422
+ source = "registry+https://github.com/rust-lang/crates.io-index"
423
+ checksum = "88a5f4a424faf49c3c2c344f166f0662341d470ea185e939657aaff130f0ec4a"
424
+ dependencies = [
425
+ "rustc-std-workspace-alloc",
426
+ "rustc-std-workspace-core",
427
+ "wit-bindgen",
428
+ ]
429
+
430
+ [[package]]
431
+ name = "windows-link"
432
+ version = "0.0.0"
433
+
434
+ [[package]]
435
+ name = "windows-link"
436
+ version = "0.2.1"
437
+ source = "registry+https://github.com/rust-lang/crates.io-index"
438
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
439
+
440
+ [[package]]
441
+ name = "windows-sys"
442
+ version = "0.60.2"
443
+ source = "registry+https://github.com/rust-lang/crates.io-index"
444
+ checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
445
+ dependencies = [
446
+ "windows-targets",
447
+ ]
448
+
449
+ [[package]]
450
+ name = "windows-targets"
451
+ version = "0.53.5"
452
+ source = "registry+https://github.com/rust-lang/crates.io-index"
453
+ checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
454
+ dependencies = [
455
+ "windows-link 0.2.1",
456
+ "windows_aarch64_gnullvm",
457
+ "windows_aarch64_msvc",
458
+ "windows_i686_gnu",
459
+ "windows_i686_gnullvm",
460
+ "windows_i686_msvc",
461
+ "windows_x86_64_gnu",
462
+ "windows_x86_64_gnullvm",
463
+ "windows_x86_64_msvc",
464
+ ]
465
+
466
+ [[package]]
467
+ name = "windows_aarch64_gnullvm"
468
+ version = "0.53.1"
469
+ source = "registry+https://github.com/rust-lang/crates.io-index"
470
+ checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
471
+
472
+ [[package]]
473
+ name = "windows_aarch64_msvc"
474
+ version = "0.53.1"
475
+ source = "registry+https://github.com/rust-lang/crates.io-index"
476
+ checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
477
+
478
+ [[package]]
479
+ name = "windows_i686_gnu"
480
+ version = "0.53.1"
481
+ source = "registry+https://github.com/rust-lang/crates.io-index"
482
+ checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
483
+
484
+ [[package]]
485
+ name = "windows_i686_gnullvm"
486
+ version = "0.53.1"
487
+ source = "registry+https://github.com/rust-lang/crates.io-index"
488
+ checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
489
+
490
+ [[package]]
491
+ name = "windows_i686_msvc"
492
+ version = "0.53.1"
493
+ source = "registry+https://github.com/rust-lang/crates.io-index"
494
+ checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
495
+
496
+ [[package]]
497
+ name = "windows_x86_64_gnu"
498
+ version = "0.53.1"
499
+ source = "registry+https://github.com/rust-lang/crates.io-index"
500
+ checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
501
+
502
+ [[package]]
503
+ name = "windows_x86_64_gnullvm"
504
+ version = "0.53.1"
505
+ source = "registry+https://github.com/rust-lang/crates.io-index"
506
+ checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
507
+
508
+ [[package]]
509
+ name = "windows_x86_64_msvc"
510
+ version = "0.53.1"
511
+ source = "registry+https://github.com/rust-lang/crates.io-index"
512
+ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
513
+
514
+ [[package]]
515
+ name = "wit-bindgen"
516
+ version = "0.45.1"
517
+ source = "registry+https://github.com/rust-lang/crates.io-index"
518
+ checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36"
519
+ dependencies = [
520
+ "rustc-std-workspace-alloc",
521
+ "rustc-std-workspace-core",
522
+ ]
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/library/Cargo.toml ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cargo-features = ["profile-rustflags"]
2
+
3
+ [workspace]
4
+ resolver = "1"
5
+ members = [
6
+ "std",
7
+ "sysroot",
8
+ "coretests",
9
+ "alloctests",
10
+ ]
11
+
12
+ exclude = [
13
+ # stdarch has its own Cargo workspace
14
+ "stdarch",
15
+ "windows_link"
16
+ ]
17
+
18
+ [profile.release.package.compiler_builtins]
19
+ # For compiler-builtins we always use a high number of codegen units.
20
+ # The goal here is to place every single intrinsic into its own object
21
+ # file to avoid symbol clashes with the system libgcc if possible. Note
22
+ # that this number doesn't actually produce this many object files, we
23
+ # just don't create more than this number of object files.
24
+ #
25
+ # It's a bit of a bummer that we have to pass this here, unfortunately.
26
+ # Ideally this would be specified through an env var to Cargo so Cargo
27
+ # knows how many CGUs are for this specific crate, but for now
28
+ # per-crate configuration isn't specifiable in the environment.
29
+ codegen-units = 10000
30
+
31
+ # These dependencies of the standard library implement symbolication for
32
+ # backtraces on most platforms. Their debuginfo causes both linking to be slower
33
+ # (more data to chew through) and binaries to be larger without really all that
34
+ # much benefit. This section turns them all to down to have no debuginfo which
35
+ # helps to improve link times a little bit.
36
+ [profile.release.package]
37
+ addr2line.debug = 0
38
+ addr2line.opt-level = "s"
39
+ adler2.debug = 0
40
+ gimli.debug = 0
41
+ gimli.opt-level = "s"
42
+ miniz_oxide.debug = 0
43
+ miniz_oxide.opt-level = "s"
44
+ # `opt-level = "s"` for `object` led to a size regression when tried previously
45
+ object.debug = 0
46
+ rustc-demangle.debug = 0
47
+ rustc-demangle.opt-level = "s"
48
+
49
+ # panic_abort must always be compiled with panic=abort, even when the rest of the
50
+ # sysroot is panic=unwind.
51
+ [profile.dev.package.panic_abort]
52
+ rustflags = ["-Cpanic=abort"]
53
+
54
+ [profile.release.package.panic_abort]
55
+ rustflags = ["-Cpanic=abort"]
56
+
57
+ # The "dist" profile is used by bootstrap for prebuilt libstd artifacts
58
+ # These settings ensure that the prebuilt artifacts support a variety of features
59
+ # in the user's profile.
60
+ [profile.dist]
61
+ inherits = "release"
62
+ codegen-units = 1
63
+ debug = 1 # "limited"
64
+ rustflags = [
65
+ # `profile.lto=off` implies `-Cembed-bitcode=no`, but unconditionally embedding
66
+ # bitcode is necessary for when users enable LTO.
67
+ # Required until Cargo can re-build the standard library based on the value
68
+ # of `profile.lto` in the user's profile.
69
+ "-Cembed-bitcode=yes",
70
+ # Enable frame pointers
71
+ "-Zunstable-options",
72
+ "-Cforce-frame-pointers=non-leaf",
73
+ ]
74
+
75
+ [profile.dist.package.panic_abort]
76
+ rustflags = [
77
+ "-Cpanic=abort",
78
+ "-Cembed-bitcode=yes",
79
+ "-Zunstable-options",
80
+ "-Cforce-frame-pointers=non-leaf",
81
+ ]
82
+
83
+ [patch.crates-io]
84
+ # See comments in `library/rustc-std-workspace-core/README.md` for what's going on here
85
+ rustc-std-workspace-core = { path = 'rustc-std-workspace-core' }
86
+ rustc-std-workspace-alloc = { path = 'rustc-std-workspace-alloc' }
87
+ rustc-std-workspace-std = { path = 'rustc-std-workspace-std' }
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/.clang-format ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ BasedOnStyle: LLVM
2
+
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/CMakeLists.txt ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #===============================================================================
2
+ # Setup Project
3
+ #===============================================================================
4
+
5
+ cmake_minimum_required(VERSION 3.20.0)
6
+ set(LLVM_SUBPROJECT_TITLE "libunwind")
7
+
8
+ set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
9
+
10
+ # Add path for custom modules
11
+ list(INSERT CMAKE_MODULE_PATH 0
12
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
13
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules"
14
+ "${CMAKE_CURRENT_SOURCE_DIR}/../runtimes/cmake/Modules"
15
+ "${LLVM_COMMON_CMAKE_UTILS}"
16
+ "${LLVM_COMMON_CMAKE_UTILS}/Modules"
17
+ )
18
+
19
+ set(LIBUNWIND_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
20
+ set(LIBUNWIND_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
21
+ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
22
+ "Specify path to libc++ source.")
23
+
24
+ include(GNUInstallDirs)
25
+ include(CheckSymbolExists)
26
+
27
+ if (MSVC)
28
+ message(FATAL_ERROR "Libunwind doesn't build for MSVC targets, and that is almost certainly not what you want to do "
29
+ "anyway since libunwind is tied to the Itanium C++ ABI, and MSVC targets must use the MS C++ ABI.")
30
+ endif()
31
+
32
+ #===============================================================================
33
+ # Setup CMake Options
34
+ #===============================================================================
35
+ include(CMakeDependentOption)
36
+ include(HandleCompilerRT)
37
+
38
+ # Define options.
39
+ option(LIBUNWIND_ENABLE_CET "Build libunwind with CET enabled." OFF)
40
+ option(LIBUNWIND_ENABLE_GCS "Build libunwind with GCS enabled." OFF)
41
+ option(LIBUNWIND_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
42
+ option(LIBUNWIND_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
43
+ option(LIBUNWIND_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
44
+ option(LIBUNWIND_ENABLE_SHARED "Build libunwind as a shared library." ON)
45
+ option(LIBUNWIND_ENABLE_STATIC "Build libunwind as a static library." ON)
46
+ option(LIBUNWIND_ENABLE_CROSS_UNWINDING "Enable cross-platform unwinding support." OFF)
47
+ option(LIBUNWIND_ENABLE_ARM_WMMX "Enable unwinding support for ARM WMMX registers." OFF)
48
+ option(LIBUNWIND_ENABLE_THREADS "Build libunwind with threading support." ON)
49
+ option(LIBUNWIND_WEAK_PTHREAD_LIB "Use weak references to refer to pthread functions." OFF)
50
+ option(LIBUNWIND_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
51
+ option(LIBUNWIND_INCLUDE_DOCS "Build the libunwind documentation." ${LLVM_INCLUDE_DOCS})
52
+ option(LIBUNWIND_INCLUDE_TESTS "Build the libunwind tests." ${LLVM_INCLUDE_TESTS})
53
+ option(LIBUNWIND_IS_BAREMETAL "Build libunwind for baremetal targets." OFF)
54
+ option(LIBUNWIND_USE_FRAME_HEADER_CACHE "Cache frame headers for unwinding. Requires locking dl_iterate_phdr." OFF)
55
+ option(LIBUNWIND_REMEMBER_HEAP_ALLOC "Use heap instead of the stack for .cfi_remember_state." OFF)
56
+ option(LIBUNWIND_INSTALL_HEADERS "Install the libunwind headers." ON)
57
+ option(LIBUNWIND_ENABLE_FRAME_APIS "Include libgcc-compatible frame apis." OFF)
58
+
59
+ set(LIBUNWIND_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING
60
+ "Define suffix of library directory name (32/64)")
61
+ option(LIBUNWIND_INSTALL_LIBRARY "Install the libunwind library." ON)
62
+ cmake_dependent_option(LIBUNWIND_INSTALL_STATIC_LIBRARY
63
+ "Install the static libunwind library." ON
64
+ "LIBUNWIND_ENABLE_STATIC;LIBUNWIND_INSTALL_LIBRARY" OFF)
65
+ cmake_dependent_option(LIBUNWIND_INSTALL_SHARED_LIBRARY
66
+ "Install the shared libunwind library." ON
67
+ "LIBUNWIND_ENABLE_SHARED;LIBUNWIND_INSTALL_LIBRARY" OFF)
68
+
69
+ set(LIBUNWIND_LIBRARY_VERSION "1.0" CACHE STRING
70
+ "Version of libunwind. This will be reflected in the name of the shared library produced.
71
+ For example, -DLIBUNWIND_LIBRARY_VERSION=x.y will result in the library being named
72
+ libunwind.x.y.dylib, along with the usual symlinks pointing to that. On Apple platforms,
73
+ this also controls the linker's 'current_version' property.")
74
+
75
+ if(MINGW)
76
+ if (LIBUNWIND_ENABLE_SHARED)
77
+ set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-shared-mingw.cfg.in")
78
+ else()
79
+ set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-static-mingw.cfg.in")
80
+ endif()
81
+ elseif (LIBUNWIND_ENABLE_SHARED)
82
+ set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-shared.cfg.in")
83
+ else()
84
+ set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-static.cfg.in")
85
+ endif()
86
+ set(LIBUNWIND_TEST_CONFIG "${LIBUNWIND_DEFAULT_TEST_CONFIG}" CACHE STRING
87
+ "The path to the Lit testing configuration to use when running the tests.
88
+ If a relative path is provided, it is assumed to be relative to '<monorepo>/libunwind/test/configs'.")
89
+ if (NOT IS_ABSOLUTE "${LIBUNWIND_TEST_CONFIG}")
90
+ set(LIBUNWIND_TEST_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/test/configs/${LIBUNWIND_TEST_CONFIG}")
91
+ endif()
92
+ message(STATUS "Using libunwind testing configuration: ${LIBUNWIND_TEST_CONFIG}")
93
+ set(LIBUNWIND_TEST_PARAMS "" CACHE STRING
94
+ "A list of parameters to run the Lit test suite with.")
95
+
96
+ if (NOT LIBUNWIND_ENABLE_SHARED AND NOT LIBUNWIND_ENABLE_STATIC)
97
+ message(FATAL_ERROR "libunwind must be built as either a shared or static library.")
98
+ endif()
99
+
100
+ if (LIBUNWIND_ENABLE_CET AND MSVC)
101
+ message(FATAL_ERROR "libunwind CET support is not available for MSVC!")
102
+ endif()
103
+
104
+ if (WIN32)
105
+ set(LIBUNWIND_DEFAULT_HIDE_SYMBOLS TRUE)
106
+ else()
107
+ set(LIBUNWIND_DEFAULT_HIDE_SYMBOLS FALSE)
108
+ endif()
109
+ option(LIBUNWIND_HIDE_SYMBOLS
110
+ "Do not export any symbols from the static library." ${LIBUNWIND_DEFAULT_HIDE_SYMBOLS})
111
+
112
+ # If toolchain is FPXX, we switch to FP64 to save the full FPRs. See:
113
+ # https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
114
+ check_symbol_exists(__mips_hard_float "" __MIPSHF)
115
+ check_symbol_exists(_ABIO32 "" __MIPS_O32)
116
+ if (__MIPSHF AND __MIPS_O32)
117
+ file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/mips_is_fpxx.c
118
+ "#if __mips_fpr != 0\n"
119
+ "# error\n"
120
+ "#endif\n")
121
+ try_compile(MIPS_FPABI_FPXX ${CMAKE_BINARY_DIR}
122
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/mips_is_fpxx.c
123
+ CMAKE_FLAGS -DCMAKE_C_LINK_EXECUTABLE='echo')
124
+ endif()
125
+
126
+ #===============================================================================
127
+ # Configure System
128
+ #===============================================================================
129
+
130
+ # Add path for custom modules
131
+ set(CMAKE_MODULE_PATH
132
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
133
+ ${CMAKE_MODULE_PATH})
134
+
135
+ set(LIBUNWIND_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING
136
+ "Path where built libunwind headers should be installed.")
137
+ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
138
+ "Path where built libunwind runtime libraries should be installed.")
139
+
140
+ set(LIBUNWIND_SHARED_OUTPUT_NAME "unwind" CACHE STRING "Output name for the shared libunwind runtime library.")
141
+ set(LIBUNWIND_STATIC_OUTPUT_NAME "unwind" CACHE STRING "Output name for the static libunwind runtime library.")
142
+
143
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
144
+ set(LIBUNWIND_TARGET_SUBDIR ${LLVM_DEFAULT_TARGET_TRIPLE})
145
+ if(LIBUNWIND_LIBDIR_SUBDIR)
146
+ string(APPEND LIBUNWIND_TARGET_SUBDIR /${LIBUNWIND_LIBDIR_SUBDIR})
147
+ endif()
148
+ cmake_path(NORMAL_PATH LIBUNWIND_TARGET_SUBDIR)
149
+ set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LIBUNWIND_TARGET_SUBDIR})
150
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LIBUNWIND_TARGET_SUBDIR} CACHE STRING
151
+ "Path where built libunwind libraries should be installed.")
152
+ unset(LIBUNWIND_TARGET_SUBDIR)
153
+ else()
154
+ if(LLVM_LIBRARY_OUTPUT_INTDIR)
155
+ set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
156
+ else()
157
+ set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
158
+ endif()
159
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE STRING
160
+ "Path where built libunwind libraries should be installed.")
161
+ endif()
162
+
163
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
164
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
165
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
166
+
167
+ set(LIBUNWIND_C_FLAGS "")
168
+ set(LIBUNWIND_CXX_FLAGS "")
169
+ set(LIBUNWIND_COMPILE_FLAGS "")
170
+ set(LIBUNWIND_LINK_FLAGS "")
171
+ set(LIBUNWIND_ADDITIONAL_COMPILE_FLAGS "" CACHE STRING "See documentation for LIBCXX_ADDITIONAL_COMPILE_FLAGS")
172
+ set(LIBUNWIND_ADDITIONAL_LIBRARIES "" CACHE STRING
173
+ "Additional libraries libunwind is linked to which can be provided in cache")
174
+
175
+ # Include macros for adding and removing libunwind flags.
176
+ include(HandleLibunwindFlags)
177
+
178
+ #===============================================================================
179
+ # Setup Compiler Flags
180
+ #===============================================================================
181
+
182
+ # Configure compiler.
183
+ include(config-ix)
184
+
185
+ include(HandleLibC) # Setup the C library flags
186
+
187
+ if (LIBUNWIND_USE_COMPILER_RT AND NOT LIBUNWIND_HAS_NODEFAULTLIBS_FLAG)
188
+ list(APPEND LIBUNWIND_LINK_FLAGS "-rtlib=compiler-rt")
189
+ endif()
190
+
191
+ add_compile_flags_if_supported(-Werror=return-type)
192
+
193
+ if (LIBUNWIND_ENABLE_CET)
194
+ add_compile_flags_if_supported(-fcf-protection=full)
195
+ add_compile_flags_if_supported(-mshstk)
196
+ if (NOT CXX_SUPPORTS_FCF_PROTECTION_EQ_FULL_FLAG)
197
+ message(SEND_ERROR "Compiler doesn't support CET -fcf-protection option!")
198
+ endif()
199
+ if (NOT CXX_SUPPORTS_MSHSTK_FLAG)
200
+ message(SEND_ERROR "Compiler doesn't support CET -mshstk option!")
201
+ endif()
202
+ endif()
203
+
204
+ if (LIBUNWIND_ENABLE_GCS)
205
+ add_compile_flags_if_supported(-mbranch-protection=standard)
206
+ if (NOT CXX_SUPPORTS_MBRANCH_PROTECTION_EQ_STANDARD_FLAG)
207
+ message(SEND_ERROR "Compiler doesn't support GCS -mbranch-protection option!")
208
+ endif()
209
+ endif()
210
+
211
+ if (WIN32)
212
+ # The headers lack matching dllexport attributes (_LIBUNWIND_EXPORT);
213
+ # silence the warning instead of cluttering the headers (which aren't
214
+ # necessarily the ones that the callers will use anyway) with the
215
+ # attributes.
216
+ add_compile_flags_if_supported(-Wno-dll-attribute-on-redeclaration)
217
+ endif()
218
+
219
+ if (MIPS_FPABI_FPXX)
220
+ add_compile_flags(-mfp64)
221
+ endif()
222
+
223
+ # Get feature flags.
224
+ # Exceptions
225
+ # Catches C++ exceptions only and tells the compiler to assume that extern C
226
+ # functions never throw a C++ exception.
227
+ add_cxx_compile_flags_if_supported(-fstrict-aliasing)
228
+ add_cxx_compile_flags_if_supported(-EHsc)
229
+
230
+ # Don't run the linker in this CMake check.
231
+ #
232
+ # The reason why this was added is that when building libunwind for
233
+ # ARM Linux, we need to pass the -funwind-tables flag in order for it to
234
+ # work properly with ARM EHABI.
235
+ #
236
+ # However, when performing CMake checks, adding this flag causes the check
237
+ # to produce a false negative, because the compiler generates calls
238
+ # to __aeabi_unwind_cpp_pr0, which is defined in libunwind itself,
239
+ # which isn't built yet, so the linker complains about undefined symbols.
240
+ #
241
+ # This leads to libunwind not being built with this flag, which makes
242
+ # libunwind quite useless in this setup.
243
+ set(_previous_CMAKE_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE})
244
+ set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
245
+ add_compile_flags_if_supported(-funwind-tables)
246
+ set(CMAKE_TRY_COMPILE_TARGET_TYPE ${_previous_CMAKE_TRY_COMPILE_TARGET_TYPE})
247
+
248
+ if (LIBUNWIND_USES_ARM_EHABI AND NOT CXX_SUPPORTS_FUNWIND_TABLES_FLAG)
249
+ message(SEND_ERROR "The -funwind-tables flag must be supported "
250
+ "because this target uses ARM Exception Handling ABI")
251
+ endif()
252
+
253
+ add_cxx_compile_flags_if_supported(-fno-exceptions)
254
+ add_cxx_compile_flags_if_supported(-fno-rtti)
255
+
256
+ # Ensure that we don't depend on C++ standard library.
257
+ if (CXX_SUPPORTS_NOSTDINCXX_FLAG)
258
+ list(APPEND LIBUNWIND_COMPILE_FLAGS -nostdinc++)
259
+ # Remove -stdlib flags to prevent them from causing an unused flag warning.
260
+ string(REPLACE "--stdlib=libc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
261
+ string(REPLACE "--stdlib=libstdc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
262
+ string(REPLACE "-stdlib=libc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
263
+ string(REPLACE "-stdlib=libstdc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
264
+ endif()
265
+
266
+ # Assert
267
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
268
+ if (LIBUNWIND_ENABLE_ASSERTIONS)
269
+ # MSVC doesn't like _DEBUG on release builds. See PR 4379.
270
+ if (NOT MSVC)
271
+ add_compile_flags(-D_DEBUG)
272
+ endif()
273
+
274
+ # On Release builds cmake automatically defines NDEBUG, so we
275
+ # explicitly undefine it:
276
+ if ((NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") AND (NOT RUST_SGX))
277
+ add_compile_flags(-UNDEBUG)
278
+ endif()
279
+ else()
280
+ if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
281
+ add_compile_flags(-DNDEBUG)
282
+ endif()
283
+ endif()
284
+
285
+ # Cross-unwinding
286
+ if (NOT LIBUNWIND_ENABLE_CROSS_UNWINDING)
287
+ add_compile_flags(-D_LIBUNWIND_IS_NATIVE_ONLY)
288
+ endif()
289
+
290
+ # Include stubs for __register_frame_info_bases and related
291
+ if (LIBUNWIND_ENABLE_FRAME_APIS)
292
+ add_compile_flags(-D_LIBUNWIND_SUPPORT_FRAME_APIS)
293
+ endif()
294
+
295
+ # Threading-support
296
+ if (NOT LIBUNWIND_ENABLE_THREADS)
297
+ add_compile_flags(-D_LIBUNWIND_HAS_NO_THREADS)
298
+ endif()
299
+
300
+ # ARM WMMX register support
301
+ if (LIBUNWIND_ENABLE_ARM_WMMX)
302
+ # __ARM_WMMX is a compiler pre-define (as per the ACLE 2.0). Clang does not
303
+ # define this macro for any supported target at present. Therefore, here we
304
+ # provide the option to explicitly enable support for WMMX registers in the
305
+ # unwinder.
306
+ add_compile_flags(-D__ARM_WMMX)
307
+ endif()
308
+
309
+ if(LIBUNWIND_IS_BAREMETAL)
310
+ add_compile_definitions(_LIBUNWIND_IS_BAREMETAL)
311
+ endif()
312
+
313
+ if(LIBUNWIND_USE_FRAME_HEADER_CACHE)
314
+ add_compile_definitions(_LIBUNWIND_USE_FRAME_HEADER_CACHE)
315
+ endif()
316
+
317
+ if(LIBUNWIND_REMEMBER_HEAP_ALLOC)
318
+ add_compile_definitions(_LIBUNWIND_REMEMBER_HEAP_ALLOC)
319
+ endif()
320
+
321
+ # This is the _ONLY_ place where add_definitions is called.
322
+ if (MSVC)
323
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
324
+ endif()
325
+
326
+ if (C_SUPPORTS_COMMENT_LIB_PRAGMA)
327
+ if (LIBUNWIND_HAS_DL_LIB)
328
+ add_definitions(-D_LIBUNWIND_LINK_DL_LIB)
329
+ endif()
330
+ if (LIBUNWIND_HAS_PTHREAD_LIB)
331
+ add_definitions(-D_LIBUNWIND_LINK_PTHREAD_LIB)
332
+ endif()
333
+ endif()
334
+
335
+ if (RUNTIMES_EXECUTE_ONLY_CODE)
336
+ add_compile_definitions(_LIBUNWIND_EXECUTE_ONLY_CODE)
337
+ endif()
338
+
339
+ add_custom_target(unwind-test-depends
340
+ COMMENT "Build dependencies required to run the libunwind test suite.")
341
+
342
+ #===============================================================================
343
+ # Setup Source Code
344
+ #===============================================================================
345
+
346
+ add_subdirectory(include)
347
+
348
+ add_subdirectory(src)
349
+
350
+ if (LIBUNWIND_INCLUDE_DOCS)
351
+ add_subdirectory(docs)
352
+ endif()
353
+
354
+ if (LIBUNWIND_INCLUDE_TESTS AND EXISTS ${LLVM_CMAKE_DIR})
355
+ add_subdirectory(test)
356
+ endif()
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/LICENSE.TXT ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ==============================================================================
2
+ The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
3
+ ==============================================================================
4
+
5
+ Apache License
6
+ Version 2.0, January 2004
7
+ http://www.apache.org/licenses/
8
+
9
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10
+
11
+ 1. Definitions.
12
+
13
+ "License" shall mean the terms and conditions for use, reproduction,
14
+ and distribution as defined by Sections 1 through 9 of this document.
15
+
16
+ "Licensor" shall mean the copyright owner or entity authorized by
17
+ the copyright owner that is granting the License.
18
+
19
+ "Legal Entity" shall mean the union of the acting entity and all
20
+ other entities that control, are controlled by, or are under common
21
+ control with that entity. For the purposes of this definition,
22
+ "control" means (i) the power, direct or indirect, to cause the
23
+ direction or management of such entity, whether by contract or
24
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
25
+ outstanding shares, or (iii) beneficial ownership of such entity.
26
+
27
+ "You" (or "Your") shall mean an individual or Legal Entity
28
+ exercising permissions granted by this License.
29
+
30
+ "Source" form shall mean the preferred form for making modifications,
31
+ including but not limited to software source code, documentation
32
+ source, and configuration files.
33
+
34
+ "Object" form shall mean any form resulting from mechanical
35
+ transformation or translation of a Source form, including but
36
+ not limited to compiled object code, generated documentation,
37
+ and conversions to other media types.
38
+
39
+ "Work" shall mean the work of authorship, whether in Source or
40
+ Object form, made available under the License, as indicated by a
41
+ copyright notice that is included in or attached to the work
42
+ (an example is provided in the Appendix below).
43
+
44
+ "Derivative Works" shall mean any work, whether in Source or Object
45
+ form, that is based on (or derived from) the Work and for which the
46
+ editorial revisions, annotations, elaborations, or other modifications
47
+ represent, as a whole, an original work of authorship. For the purposes
48
+ of this License, Derivative Works shall not include works that remain
49
+ separable from, or merely link (or bind by name) to the interfaces of,
50
+ the Work and Derivative Works thereof.
51
+
52
+ "Contribution" shall mean any work of authorship, including
53
+ the original version of the Work and any modifications or additions
54
+ to that Work or Derivative Works thereof, that is intentionally
55
+ submitted to Licensor for inclusion in the Work by the copyright owner
56
+ or by an individual or Legal Entity authorized to submit on behalf of
57
+ the copyright owner. For the purposes of this definition, "submitted"
58
+ means any form of electronic, verbal, or written communication sent
59
+ to the Licensor or its representatives, including but not limited to
60
+ communication on electronic mailing lists, source code control systems,
61
+ and issue tracking systems that are managed by, or on behalf of, the
62
+ Licensor for the purpose of discussing and improving the Work, but
63
+ excluding communication that is conspicuously marked or otherwise
64
+ designated in writing by the copyright owner as "Not a Contribution."
65
+
66
+ "Contributor" shall mean Licensor and any individual or Legal Entity
67
+ on behalf of whom a Contribution has been received by Licensor and
68
+ subsequently incorporated within the Work.
69
+
70
+ 2. Grant of Copyright License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ copyright license to reproduce, prepare Derivative Works of,
74
+ publicly display, publicly perform, sublicense, and distribute the
75
+ Work and such Derivative Works in Source or Object form.
76
+
77
+ 3. Grant of Patent License. Subject to the terms and conditions of
78
+ this License, each Contributor hereby grants to You a perpetual,
79
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80
+ (except as stated in this section) patent license to make, have made,
81
+ use, offer to sell, sell, import, and otherwise transfer the Work,
82
+ where such license applies only to those patent claims licensable
83
+ by such Contributor that are necessarily infringed by their
84
+ Contribution(s) alone or by combination of their Contribution(s)
85
+ with the Work to which such Contribution(s) was submitted. If You
86
+ institute patent litigation against any entity (including a
87
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
88
+ or a Contribution incorporated within the Work constitutes direct
89
+ or contributory patent infringement, then any patent licenses
90
+ granted to You under this License for that Work shall terminate
91
+ as of the date such litigation is filed.
92
+
93
+ 4. Redistribution. You may reproduce and distribute copies of the
94
+ Work or Derivative Works thereof in any medium, with or without
95
+ modifications, and in Source or Object form, provided that You
96
+ meet the following conditions:
97
+
98
+ (a) You must give any other recipients of the Work or
99
+ Derivative Works a copy of this License; and
100
+
101
+ (b) You must cause any modified files to carry prominent notices
102
+ stating that You changed the files; and
103
+
104
+ (c) You must retain, in the Source form of any Derivative Works
105
+ that You distribute, all copyright, patent, trademark, and
106
+ attribution notices from the Source form of the Work,
107
+ excluding those notices that do not pertain to any part of
108
+ the Derivative Works; and
109
+
110
+ (d) If the Work includes a "NOTICE" text file as part of its
111
+ distribution, then any Derivative Works that You distribute must
112
+ include a readable copy of the attribution notices contained
113
+ within such NOTICE file, excluding those notices that do not
114
+ pertain to any part of the Derivative Works, in at least one
115
+ of the following places: within a NOTICE text file distributed
116
+ as part of the Derivative Works; within the Source form or
117
+ documentation, if provided along with the Derivative Works; or,
118
+ within a display generated by the Derivative Works, if and
119
+ wherever such third-party notices normally appear. The contents
120
+ of the NOTICE file are for informational purposes only and
121
+ do not modify the License. You may add Your own attribution
122
+ notices within Derivative Works that You distribute, alongside
123
+ or as an addendum to the NOTICE text from the Work, provided
124
+ that such additional attribution notices cannot be construed
125
+ as modifying the License.
126
+
127
+ You may add Your own copyright statement to Your modifications and
128
+ may provide additional or different license terms and conditions
129
+ for use, reproduction, or distribution of Your modifications, or
130
+ for any such Derivative Works as a whole, provided Your use,
131
+ reproduction, and distribution of the Work otherwise complies with
132
+ the conditions stated in this License.
133
+
134
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
135
+ any Contribution intentionally submitted for inclusion in the Work
136
+ by You to the Licensor shall be under the terms and conditions of
137
+ this License, without any additional terms or conditions.
138
+ Notwithstanding the above, nothing herein shall supersede or modify
139
+ the terms of any separate license agreement you may have executed
140
+ with Licensor regarding such Contributions.
141
+
142
+ 6. Trademarks. This License does not grant permission to use the trade
143
+ names, trademarks, service marks, or product names of the Licensor,
144
+ except as required for reasonable and customary use in describing the
145
+ origin of the Work and reproducing the content of the NOTICE file.
146
+
147
+ 7. Disclaimer of Warranty. Unless required by applicable law or
148
+ agreed to in writing, Licensor provides the Work (and each
149
+ Contributor provides its Contributions) on an "AS IS" BASIS,
150
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
151
+ implied, including, without limitation, any warranties or conditions
152
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
153
+ PARTICULAR PURPOSE. You are solely responsible for determining the
154
+ appropriateness of using or redistributing the Work and assume any
155
+ risks associated with Your exercise of permissions under this License.
156
+
157
+ 8. Limitation of Liability. In no event and under no legal theory,
158
+ whether in tort (including negligence), contract, or otherwise,
159
+ unless required by applicable law (such as deliberate and grossly
160
+ negligent acts) or agreed to in writing, shall any Contributor be
161
+ liable to You for damages, including any direct, indirect, special,
162
+ incidental, or consequential damages of any character arising as a
163
+ result of this License or out of the use or inability to use the
164
+ Work (including but not limited to damages for loss of goodwill,
165
+ work stoppage, computer failure or malfunction, or any and all
166
+ other commercial damages or losses), even if such Contributor
167
+ has been advised of the possibility of such damages.
168
+
169
+ 9. Accepting Warranty or Additional Liability. While redistributing
170
+ the Work or Derivative Works thereof, You may choose to offer,
171
+ and charge a fee for, acceptance of support, warranty, indemnity,
172
+ or other liability obligations and/or rights consistent with this
173
+ License. However, in accepting such obligations, You may act only
174
+ on Your own behalf and on Your sole responsibility, not on behalf
175
+ of any other Contributor, and only if You agree to indemnify,
176
+ defend, and hold each Contributor harmless for any liability
177
+ incurred by, or claims asserted against, such Contributor by reason
178
+ of your accepting any such warranty or additional liability.
179
+
180
+ END OF TERMS AND CONDITIONS
181
+
182
+ APPENDIX: How to apply the Apache License to your work.
183
+
184
+ To apply the Apache License to your work, attach the following
185
+ boilerplate notice, with the fields enclosed by brackets "[]"
186
+ replaced with your own identifying information. (Don't include
187
+ the brackets!) The text should be enclosed in the appropriate
188
+ comment syntax for the file format. We also recommend that a
189
+ file or class name and description of purpose be included on the
190
+ same "printed page" as the copyright notice for easier
191
+ identification within third-party archives.
192
+
193
+ Copyright [yyyy] [name of copyright owner]
194
+
195
+ Licensed under the Apache License, Version 2.0 (the "License");
196
+ you may not use this file except in compliance with the License.
197
+ You may obtain a copy of the License at
198
+
199
+ http://www.apache.org/licenses/LICENSE-2.0
200
+
201
+ Unless required by applicable law or agreed to in writing, software
202
+ distributed under the License is distributed on an "AS IS" BASIS,
203
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+ See the License for the specific language governing permissions and
205
+ limitations under the License.
206
+
207
+
208
+ ---- LLVM Exceptions to the Apache 2.0 License ----
209
+
210
+ As an exception, if, as a result of your compiling your source code, portions
211
+ of this Software are embedded into an Object form of such source code, you
212
+ may redistribute such embedded portions in such Object form without complying
213
+ with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
214
+
215
+ In addition, if you combine or link compiled forms of this Software with
216
+ software that is licensed under the GPLv2 ("Combined Software") and if a
217
+ court of competent jurisdiction determines that the patent provision (Section
218
+ 3), the indemnity provision (Section 9) or other Section of the License
219
+ conflicts with the conditions of the GPLv2, you may retroactively and
220
+ prospectively choose to deem waived or otherwise exclude such Section(s) of
221
+ the License, but only in their entirety and only with respect to the Combined
222
+ Software.
223
+
224
+ ==============================================================================
225
+ Software from third parties included in the LLVM Project:
226
+ ==============================================================================
227
+ The LLVM Project contains third party software which is under different license
228
+ terms. All such code will be identified clearly using at least one of two
229
+ mechanisms:
230
+ 1) It will be in a separate directory tree with its own `LICENSE.txt` or
231
+ `LICENSE` file at the top containing the specific license and restrictions
232
+ which apply to that software, or
233
+ 2) It will contain specific license and restriction terms at the top of every
234
+ file.
235
+
236
+ ==============================================================================
237
+ Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
238
+ ==============================================================================
239
+
240
+ The libunwind library is dual licensed under both the University of Illinois
241
+ "BSD-Like" license and the MIT license. As a user of this code you may choose
242
+ to use it under either license. As a contributor, you agree to allow your code
243
+ to be used under both.
244
+
245
+ Full text of the relevant licenses is included below.
246
+
247
+ ==============================================================================
248
+
249
+ University of Illinois/NCSA
250
+ Open Source License
251
+
252
+ Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT
253
+
254
+ All rights reserved.
255
+
256
+ Developed by:
257
+
258
+ LLVM Team
259
+
260
+ University of Illinois at Urbana-Champaign
261
+
262
+ http://llvm.org
263
+
264
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
265
+ this software and associated documentation files (the "Software"), to deal with
266
+ the Software without restriction, including without limitation the rights to
267
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
268
+ of the Software, and to permit persons to whom the Software is furnished to do
269
+ so, subject to the following conditions:
270
+
271
+ * Redistributions of source code must retain the above copyright notice,
272
+ this list of conditions and the following disclaimers.
273
+
274
+ * Redistributions in binary form must reproduce the above copyright notice,
275
+ this list of conditions and the following disclaimers in the
276
+ documentation and/or other materials provided with the distribution.
277
+
278
+ * Neither the names of the LLVM Team, University of Illinois at
279
+ Urbana-Champaign, nor the names of its contributors may be used to
280
+ endorse or promote products derived from this Software without specific
281
+ prior written permission.
282
+
283
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
284
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
285
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
286
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
287
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
288
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
289
+ SOFTWARE.
290
+
291
+ ==============================================================================
292
+
293
+ Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
294
+
295
+ Permission is hereby granted, free of charge, to any person obtaining a copy
296
+ of this software and associated documentation files (the "Software"), to deal
297
+ in the Software without restriction, including without limitation the rights
298
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
299
+ copies of the Software, and to permit persons to whom the Software is
300
+ furnished to do so, subject to the following conditions:
301
+
302
+ The above copyright notice and this permission notice shall be included in
303
+ all copies or substantial portions of the Software.
304
+
305
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
306
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
307
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
308
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
309
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
310
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
311
+ THE SOFTWARE.
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/README_RUST_SGX.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Libunwind customizations for linking with x86_64-fortanix-unknown-sgx Rust target.
2
+
3
+ ## Description
4
+ ### Initial Fork
5
+ Initial Fork has been made from 5.0 release of llvm (commit: 6a075b6de4)
6
+ ### Detailed Description
7
+ #### Header files that we do not include for this target
8
+ 1. pthread.h
9
+ #### Library that we do not link to for this target.
10
+ 1. pthread (Locks used by libunwind is provided by rust stdlib for this target)
11
+
12
+ ## Building unwind for rust-sgx target
13
+ ### Generate Make files:
14
+ * `cd where you want to build libunwind`
15
+ * `mkdir build`
16
+ * `cd build`
17
+ * `cmake -DCMAKE_BUILD_TYPE="RELEASE" -DRUST_SGX=1 -G "Unix Makefiles" -DLLVM_ENABLE_WARNINGS=1 -DLIBUNWIND_ENABLE_PEDANTIC=0 -DLLVM_PATH=<path/to/llvm> <path/to/libunwind>`
18
+ * `"DEBUG"` could be used instead of `"RELEASE"` to enable debug logs of libunwind.
19
+
20
+ ### Build:
21
+ * `make unwind_static`
22
+ * `build/lib/` will have the built library.
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/cmake/config-ix.cmake ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ include(CMakePushCheckState)
2
+ include(CheckCCompilerFlag)
3
+ include(CheckCXXCompilerFlag)
4
+ include(CheckLibraryExists)
5
+ include(LLVMCheckCompilerLinkerFlag)
6
+ include(CheckSymbolExists)
7
+ include(CheckCSourceCompiles)
8
+
9
+ # The compiler driver may be implicitly trying to link against libunwind, which
10
+ # might not work if libunwind doesn't exist yet. Try to check if
11
+ # --unwindlib=none is supported, and use that if possible.
12
+ llvm_check_compiler_linker_flag(C "--unwindlib=none" CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG)
13
+
14
+ if (HAIKU)
15
+ check_library_exists(root fopen "" LIBUNWIND_HAS_ROOT_LIB)
16
+ else()
17
+ check_library_exists(c fopen "" LIBUNWIND_HAS_C_LIB)
18
+ endif()
19
+
20
+ if (NOT LIBUNWIND_USE_COMPILER_RT)
21
+ if (ANDROID)
22
+ check_library_exists(gcc __gcc_personality_v0 "" LIBUNWIND_HAS_GCC_LIB)
23
+ else ()
24
+ check_library_exists(gcc_s __gcc_personality_v0 "" LIBUNWIND_HAS_GCC_S_LIB)
25
+ check_library_exists(gcc __absvdi2 "" LIBUNWIND_HAS_GCC_LIB)
26
+ endif ()
27
+ endif()
28
+
29
+ if (CXX_SUPPORTS_NOSTDLIBXX_FLAG OR C_SUPPORTS_NODEFAULTLIBS_FLAG)
30
+ if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize)
31
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all")
32
+ endif ()
33
+ if (CMAKE_C_FLAGS MATCHES -fsanitize-coverage OR CMAKE_CXX_FLAGS MATCHES -fsanitize-coverage)
34
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fsanitize-coverage=0")
35
+ endif ()
36
+ endif ()
37
+
38
+ # Check compiler pragmas
39
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
40
+ cmake_push_check_state()
41
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unknown-pragmas")
42
+ check_c_source_compiles("
43
+ #pragma comment(lib, \"c\")
44
+ int main(void) { return 0; }
45
+ " C_SUPPORTS_COMMENT_LIB_PRAGMA)
46
+ cmake_pop_check_state()
47
+ endif()
48
+
49
+ # Check compiler flags
50
+ check_cxx_compiler_flag(-nostdinc++ CXX_SUPPORTS_NOSTDINCXX_FLAG)
51
+
52
+ # Check symbols
53
+ check_symbol_exists(__arm__ "" LIBUNWIND_TARGET_ARM)
54
+ check_symbol_exists(__USING_SJLJ_EXCEPTIONS__ "" LIBUNWIND_USES_SJLJ_EXCEPTIONS)
55
+ check_symbol_exists(__ARM_DWARF_EH__ "" LIBUNWIND_USES_DWARF_EH)
56
+
57
+ if(LIBUNWIND_TARGET_ARM AND NOT LIBUNWIND_USES_SJLJ_EXCEPTIONS AND NOT LIBUNWIND_USES_DWARF_EH)
58
+ # This condition is copied from __libunwind_config.h
59
+ set(LIBUNWIND_USES_ARM_EHABI ON)
60
+ endif()
61
+
62
+ # Check libraries
63
+ if(FUCHSIA)
64
+ set(LIBUNWIND_HAS_DL_LIB NO)
65
+ set(LIBUNWIND_HAS_PTHREAD_LIB NO)
66
+ else()
67
+ check_library_exists(dl dladdr "" LIBUNWIND_HAS_DL_LIB)
68
+ check_library_exists(pthread pthread_once "" LIBUNWIND_HAS_PTHREAD_LIB)
69
+ endif()
70
+
71
+ if(HAIKU)
72
+ check_library_exists(bsd dl_iterate_phdr "" LIBUNWIND_HAS_BSD_LIB)
73
+ endif()
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/docs/BuildingLibunwind.rst ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _BuildingLibunwind:
2
+
3
+ ==================
4
+ Building libunwind
5
+ ==================
6
+
7
+ .. contents::
8
+ :local:
9
+
10
+ .. _build instructions:
11
+
12
+ Getting Started
13
+ ===============
14
+
15
+ On Mac OS, the easiest way to get this library is to link with -lSystem.
16
+ However if you want to build tip-of-trunk from here (getting the bleeding
17
+ edge), read on.
18
+
19
+ The basic steps needed to build libunwind are:
20
+
21
+ #. Checkout LLVM, libunwind, and related projects:
22
+
23
+ * ``cd where-you-want-llvm-to-live``
24
+ * ``git clone https://github.com/llvm/llvm-project.git``
25
+
26
+ #. Configure and build libunwind:
27
+
28
+ CMake is the only supported configuration system.
29
+
30
+ Clang is the preferred compiler when building and using libunwind.
31
+
32
+ * ``cd where you want to build llvm``
33
+ * ``mkdir build``
34
+ * ``cd build``
35
+ * ``cmake -G <generator> -DLLVM_ENABLE_RUNTIMES=libunwind [options] <llvm-monorepo>/runtimes``
36
+
37
+ For more information about configuring libunwind see :ref:`CMake Options`.
38
+
39
+ * ``make unwind`` --- will build libunwind.
40
+ * ``make check-unwind`` --- will run the test suite.
41
+
42
+ Shared and static libraries for libunwind should now be present in llvm/build/lib.
43
+
44
+ #. **Optional**: Install libunwind
45
+
46
+ If your system already provides an unwinder, it is important to be careful
47
+ not to replace it. Remember Use the CMake option ``CMAKE_INSTALL_PREFIX`` to
48
+ select a safe place to install libunwind.
49
+
50
+ * ``make install-unwind`` --- Will install the libraries and the headers
51
+
52
+
53
+ .. _CMake Options:
54
+
55
+ CMake Options
56
+ =============
57
+
58
+ Here are some of the CMake variables that are used often, along with a
59
+ brief explanation and LLVM-specific notes. For full documentation, check the
60
+ CMake docs or execute ``cmake --help-variable VARIABLE_NAME``.
61
+
62
+ **CMAKE_BUILD_TYPE**:STRING
63
+ Sets the build type for ``make`` based generators. Possible values are
64
+ Release, Debug, RelWithDebInfo and MinSizeRel. On systems like Visual Studio
65
+ the user sets the build type with the IDE settings.
66
+
67
+ **CMAKE_INSTALL_PREFIX**:PATH
68
+ Path where LLVM will be installed if "make install" is invoked or the
69
+ "INSTALL" target is built.
70
+
71
+ **CMAKE_CXX_COMPILER**:STRING
72
+ The C++ compiler to use when building and testing libunwind.
73
+
74
+
75
+ .. _libunwind-specific options:
76
+
77
+ libunwind specific options
78
+ --------------------------
79
+
80
+ .. option:: LIBUNWIND_ENABLE_ASSERTIONS:BOOL
81
+
82
+ **Default**: ``ON``
83
+
84
+ Toggle assertions independent of the build mode.
85
+
86
+ .. option:: LIBUNWIND_ENABLE_PEDANTIC:BOOL
87
+
88
+ **Default**: ``ON``
89
+
90
+ Compile with -Wpedantic.
91
+
92
+ .. option:: LIBUNWIND_ENABLE_WERROR:BOOL
93
+
94
+ **Default**: ``OFF``
95
+
96
+ Compile with -Werror
97
+
98
+ .. option:: LIBUNWIND_ENABLE_SHARED:BOOL
99
+
100
+ **Default**: ``ON``
101
+
102
+ Build libunwind as a shared library.
103
+
104
+ .. option:: LIBUNWIND_ENABLE_STATIC:BOOL
105
+
106
+ **Default**: ``ON``
107
+
108
+ Build libunwind as a static archive.
109
+
110
+ .. option:: LIBUNWIND_ENABLE_CROSS_UNWINDING:BOOL
111
+
112
+ **Default**: ``OFF``
113
+
114
+ Enable cross-platform unwinding support.
115
+
116
+ .. option:: LIBUNWIND_ENABLE_ARM_WMMX:BOOL
117
+
118
+ **Default**: ``OFF``
119
+
120
+ Enable unwinding support for ARM WMMX registers.
121
+
122
+ .. option:: LIBUNWIND_ENABLE_THREADS:BOOL
123
+
124
+ **Default**: ``ON``
125
+
126
+ Build libunwind with threading support.
127
+
128
+ .. option:: LIBUNWIND_INSTALL_LIBRARY_DIR:PATH
129
+
130
+ **Default**: ``lib${LIBUNWIND_LIBDIR_SUFFIX}``
131
+
132
+ Path where built libunwind libraries should be installed. If a relative path,
133
+ relative to ``CMAKE_INSTALL_PREFIX``.
134
+
135
+ .. option:: LIBUNWIND_ENABLE_RUST_SGX:BOOL
136
+
137
+ **Default**: ``OFF``
138
+
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/docs/CMakeLists.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ include(FindSphinx)
2
+ if (SPHINX_FOUND AND LLVM_ENABLE_SPHINX)
3
+ include(AddSphinxTarget)
4
+ if (${SPHINX_OUTPUT_HTML})
5
+ add_sphinx_target(html libunwind)
6
+ endif()
7
+ endif()
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/docs/conf.py ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # libunwind documentation build configuration file.
4
+ #
5
+ # This file is execfile()d with the current directory set to its containing dir.
6
+ #
7
+ # Note that not all possible configuration values are present in this
8
+ # autogenerated file.
9
+ #
10
+ # All configuration values have a default; values that are commented out
11
+ # serve to show the default.
12
+
13
+ import sys, os
14
+ from datetime import date
15
+
16
+ # If extensions (or modules to document with autodoc) are in another directory,
17
+ # add these directories to sys.path here. If the directory is relative to the
18
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
19
+ # sys.path.insert(0, os.path.abspath('.'))
20
+
21
+ # -- General configuration -----------------------------------------------------
22
+
23
+ # If your documentation needs a minimal Sphinx version, state it here.
24
+ # needs_sphinx = '1.0'
25
+
26
+ # Add any Sphinx extension module names here, as strings. They can be extensions
27
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28
+ extensions = ["sphinx.ext.intersphinx", "sphinx.ext.todo"]
29
+
30
+ # Add any paths that contain templates here, relative to this directory.
31
+ templates_path = ["_templates"]
32
+
33
+ # The suffix of source filenames.
34
+ source_suffix = ".rst"
35
+
36
+ # The encoding of source files.
37
+ # source_encoding = 'utf-8-sig'
38
+
39
+ # The master toctree document.
40
+ master_doc = "index"
41
+
42
+ # General information about the project.
43
+ project = "libunwind"
44
+ copyright = "2011-%d, LLVM Project" % date.today().year
45
+
46
+ # The version info for the project you're documenting, acts as replacement for
47
+ # |version| and |release|, also used in various other places throughout the
48
+ # built documents.
49
+ #
50
+ # The short X.Y version.
51
+ version = "17.0"
52
+ # The full version, including alpha/beta/rc tags.
53
+ release = "17.0"
54
+
55
+ # The language for content autogenerated by Sphinx. Refer to documentation
56
+ # for a list of supported languages.
57
+ # language = None
58
+
59
+ # There are two options for replacing |today|: either, you set today to some
60
+ # non-false value, then it is used:
61
+ # today = ''
62
+ # Else, today_fmt is used as the format for a strftime call.
63
+ today_fmt = "%Y-%m-%d"
64
+
65
+ # List of patterns, relative to source directory, that match files and
66
+ # directories to ignore when looking for source files.
67
+ exclude_patterns = ["_build"]
68
+
69
+ # The reST default role (used for this markup: `text`) to use for all documents.
70
+ # default_role = None
71
+
72
+ # If true, '()' will be appended to :func: etc. cross-reference text.
73
+ # add_function_parentheses = True
74
+
75
+ # If true, the current module name will be prepended to all description
76
+ # unit titles (such as .. function::).
77
+ # add_module_names = True
78
+
79
+ # If true, sectionauthor and moduleauthor directives will be shown in the
80
+ # output. They are ignored by default.
81
+ show_authors = True
82
+
83
+ # The name of the Pygments (syntax highlighting) style to use.
84
+ pygments_style = "friendly"
85
+
86
+ # A list of ignored prefixes for module index sorting.
87
+ # modindex_common_prefix = []
88
+
89
+
90
+ # -- Options for HTML output ---------------------------------------------------
91
+
92
+ # The theme to use for HTML and HTML Help pages. See the documentation for
93
+ # a list of builtin themes.
94
+ html_theme = "haiku"
95
+
96
+ # Theme options are theme-specific and customize the look and feel of a theme
97
+ # further. For a list of options available for each theme, see the
98
+ # documentation.
99
+ # html_theme_options = {}
100
+
101
+ # Add any paths that contain custom themes here, relative to this directory.
102
+ # html_theme_path = []
103
+
104
+ # The name for this set of Sphinx documents. If None, it defaults to
105
+ # "<project> v<release> documentation".
106
+ # html_title = None
107
+
108
+ # A shorter title for the navigation bar. Default is the same as html_title.
109
+ # html_short_title = None
110
+
111
+ # The name of an image file (relative to this directory) to place at the top
112
+ # of the sidebar.
113
+ # html_logo = None
114
+
115
+ # The name of an image file (within the static path) to use as favicon of the
116
+ # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
117
+ # pixels large.
118
+ # html_favicon = None
119
+
120
+ # Add any paths that contain custom static files (such as style sheets) here,
121
+ # relative to this directory. They are copied after the builtin static files,
122
+ # so a file named "default.css" will overwrite the builtin "default.css".
123
+ html_static_path = []
124
+
125
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
126
+ # using the given strftime format.
127
+ # html_last_updated_fmt = '%b %d, %Y'
128
+
129
+ # If true, SmartyPants will be used to convert quotes and dashes to
130
+ # typographically correct entities.
131
+ # html_use_smartypants = True
132
+
133
+ # Custom sidebar templates, maps document names to template names.
134
+ # html_sidebars = {}
135
+
136
+ # Additional templates that should be rendered to pages, maps page names to
137
+ # template names.
138
+ # html_additional_pages = {}
139
+
140
+ # If false, no module index is generated.
141
+ # html_domain_indices = True
142
+
143
+ # If false, no index is generated.
144
+ # html_use_index = True
145
+
146
+ # If true, the index is split into individual pages for each letter.
147
+ # html_split_index = False
148
+
149
+ # If true, links to the reST sources are added to the pages.
150
+ # html_show_sourcelink = True
151
+
152
+ # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
153
+ # html_show_sphinx = True
154
+
155
+ # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
156
+ # html_show_copyright = True
157
+
158
+ # If true, an OpenSearch description file will be output, and all pages will
159
+ # contain a <link> tag referring to it. The value of this option must be the
160
+ # base URL from which the finished HTML is served.
161
+ # html_use_opensearch = ''
162
+
163
+ # This is the file name suffix for HTML files (e.g. ".xhtml").
164
+ # html_file_suffix = None
165
+
166
+ # Output file base name for HTML help builder.
167
+ htmlhelp_basename = "libunwinddoc"
168
+
169
+
170
+ # -- Options for LaTeX output --------------------------------------------------
171
+
172
+ latex_elements = {
173
+ # The paper size ('letterpaper' or 'a4paper').
174
+ #'papersize': 'letterpaper',
175
+ # The font size ('10pt', '11pt' or '12pt').
176
+ #'pointsize': '10pt',
177
+ # Additional stuff for the LaTeX preamble.
178
+ #'preamble': '',
179
+ }
180
+
181
+ # Grouping the document tree into LaTeX files. List of tuples
182
+ # (source start file, target name, title, author, documentclass [howto/manual]).
183
+ latex_documents = [
184
+ ("contents", "libunwind.tex", "libunwind Documentation", "LLVM project", "manual"),
185
+ ]
186
+
187
+ # The name of an image file (relative to this directory) to place at the top of
188
+ # the title page.
189
+ # latex_logo = None
190
+
191
+ # For "manual" documents, if this is true, then toplevel headings are parts,
192
+ # not chapters.
193
+ # latex_use_parts = False
194
+
195
+ # If true, show page references after internal links.
196
+ # latex_show_pagerefs = False
197
+
198
+ # If true, show URL addresses after external links.
199
+ # latex_show_urls = False
200
+
201
+ # Documents to append as an appendix to all manuals.
202
+ # latex_appendices = []
203
+
204
+ # If false, no module index is generated.
205
+ # latex_domain_indices = True
206
+
207
+
208
+ # -- Options for manual page output --------------------------------------------
209
+
210
+ # One entry per manual page. List of tuples
211
+ # (source start file, name, description, authors, manual section).
212
+ man_pages = [("contents", "libunwind", "libunwind Documentation", ["LLVM project"], 1)]
213
+
214
+ # If true, show URL addresses after external links.
215
+ # man_show_urls = False
216
+
217
+
218
+ # -- Options for Texinfo output ------------------------------------------------
219
+
220
+ # Grouping the document tree into Texinfo files. List of tuples
221
+ # (source start file, target name, title, author,
222
+ # dir menu entry, description, category)
223
+ texinfo_documents = [
224
+ (
225
+ "contents",
226
+ "libunwind",
227
+ "libunwind Documentation",
228
+ "LLVM project",
229
+ "libunwind",
230
+ "LLVM Unwinder",
231
+ "Miscellaneous",
232
+ ),
233
+ ]
234
+
235
+ # Documents to append as an appendix to all manuals.
236
+ # texinfo_appendices = []
237
+
238
+ # If false, no module index is generated.
239
+ # texinfo_domain_indices = True
240
+
241
+ # How to display URL addresses: 'footnote', 'no', or 'inline'.
242
+ # texinfo_show_urls = 'footnote'
243
+
244
+
245
+ # FIXME: Define intersphinx configuration.
246
+ intersphinx_mapping = {}
247
+
248
+
249
+ # -- Options for extensions ----------------------------------------------------
250
+
251
+ # Enable this if you want TODOs to show up in the generated documentation.
252
+ todo_include_todos = True
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/llvm-project/libunwind/docs/index.rst ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _index:
2
+
3
+ =======================
4
+ libunwind LLVM Unwinder
5
+ =======================
6
+
7
+ Overview
8
+ ========
9
+
10
+ libunwind is an implementation of the interface defined by the HP libunwind
11
+ project. It was contributed by Apple as a way to enable clang++ to port to
12
+ platforms that do not have a system unwinder. It is intended to be a small and
13
+ fast implementation of the ABI, leaving off some features of HP's libunwind
14
+ that never materialized (e.g. remote unwinding).
15
+
16
+ The unwinder has two levels of API. The high level APIs are the `_Unwind_*`
17
+ functions which implement functionality required by `__cxa_*` exception
18
+ functions. The low level APIs are the `unw_*` functions which are an interface
19
+ defined by the old HP libunwind project.
20
+
21
+ Getting Started with libunwind
22
+ ------------------------------
23
+
24
+ .. toctree::
25
+ :maxdepth: 2
26
+
27
+ BuildingLibunwind
28
+
29
+ Current Status
30
+ --------------
31
+
32
+ libunwind is a production-quality unwinder, with platform support for DWARF
33
+ unwind info, SjLj, and ARM EHABI.
34
+
35
+ The low level libunwind API was designed to work either in-process (aka local)
36
+ or to operate on another process (aka remote), but only the local path has been
37
+ implemented. Remote unwinding remains as future work.
38
+
39
+ Platform and Compiler Support
40
+ -----------------------------
41
+
42
+ libunwind is known to work on the following platforms:
43
+
44
+ ============ ======================== ============ ========================
45
+ OS Arch Compilers Unwind Info
46
+ ============ ======================== ============ ========================
47
+ Any i386, x86_64, ARM Clang SjLj
48
+ Bare Metal ARM Clang, GCC EHABI
49
+ FreeBSD i386, x86_64, ARM64 Clang DWARF CFI
50
+ iOS ARM Clang SjLj
51
+ Linux ARM Clang, GCC EHABI
52
+ Linux i386, x86_64, ARM64 Clang, GCC DWARF CFI
53
+ macOS i386, x86_64 Clang, GCC DWARF CFI
54
+ NetBSD x86_64 Clang, GCC DWARF CFI
55
+ Windows i386, x86_64, ARM, ARM64 Clang DWARF CFI
56
+ ============ ======================== ============ ========================
57
+
58
+ The following minimum compiler versions are strongly recommended.
59
+
60
+ * Clang 3.5 and above
61
+ * GCC 4.7 and above.
62
+
63
+ Anything older *may* work.
64
+
65
+ Notes and Known Issues
66
+ ----------------------
67
+
68
+ * TODO
69
+
70
+
71
+ Getting Involved
72
+ ================
73
+
74
+ First please review our `Developer's Policy <https://llvm.org/docs/DeveloperPolicy.html>`__
75
+ and `Getting started with LLVM <https://llvm.org/docs/GettingStarted.html>`__.
76
+
77
+ **Bug Reports**
78
+
79
+ If you think you've found a bug in libunwind, please report it using
80
+ the `LLVM bug tracker`_. If you're not sure, you
81
+ can ask for support on the `Runtimes forum`_ or on Discord.
82
+ Please use the tag "libunwind" for new threads.
83
+
84
+ **Patches**
85
+
86
+ If you want to contribute a patch to libunwind, please start by reading the LLVM
87
+ `documentation about contributing <https://www.llvm.org/docs/Contributing.html>`__.
88
+
89
+ **Discussion and Questions**
90
+
91
+ Send discussions and questions to the `Runtimes forum`_. Please add the tag "libunwind" to your post.
92
+
93
+
94
+ Quick Links
95
+ ===========
96
+ * `LLVM Homepage <https://llvm.org/>`_
97
+ * `LLVM Bug Tracker <https://github.com/llvm/llvm-project/labels/libunwind/>`_
98
+ * `Clang Discourse Forums <https://discourse.llvm.org/c/clang/6>`_
99
+ * `cfe-commits Mailing List <http://lists.llvm.org/mailman/listinfo/cfe-commits>`_
100
+ * `Runtimes Forum <https://discourse.llvm.org/tags/c/runtimes>`_
101
+ * `Browse libunwind Sources <https://github.com/llvm/llvm-project/blob/main/libunwind/>`_
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libcfg_if-66ccf9e220034f42.rlib ADDED
Binary file (4.05 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libcfg_if-66ccf9e220034f42.rmeta ADDED
Binary file (5.5 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libhashbrown-d671ea03f4f2cb7f.rlib ADDED
Binary file (30.8 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_abort-59292eecd8b1d16e.rlib ADDED
Binary file (8.8 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_abort-59292eecd8b1d16e.rmeta ADDED
Binary file (2.91 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_unwind-2405f2c51aa3033f.rlib ADDED
Binary file (29.9 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libpanic_unwind-2405f2c51aa3033f.rmeta ADDED
Binary file (19.7 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libprofiler_builtins-adc74bbcd604917d.rmeta ADDED
Binary file (1.34 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_demangle-eda3326d6d941958.rmeta ADDED
Binary file (91.3 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_literal_escaper-26a66b580b06d1b8.rlib ADDED
Binary file (4.27 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_alloc-fd50af2c77fb0ff8.rlib ADDED
Binary file (4.39 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_alloc-fd50af2c77fb0ff8.rmeta ADDED
Binary file (2.15 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_core-70fce068d6af51d0.rlib ADDED
Binary file (4.39 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_core-70fce068d6af51d0.rmeta ADDED
Binary file (5.81 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_std-444efa70010dce55.rlib ADDED
Binary file (4.37 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/librustc_std_workspace_std-444efa70010dce55.rmeta ADDED
Binary file (6.68 kB). View file
 
rust/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib/libstd_detect-9997abfbe12e9a5a.rlib ADDED
Binary file (54.4 kB). View file