Skip to content

Commit 5f13820

Browse files
committed
Auto merge of rust-lang#70205 - Centril:rollup-0jq9k4s, r=Centril
Rollup of 16 pull requests Successful merges: - rust-lang#65097 (Make std::sync::Arc compatible with ThreadSanitizer) - rust-lang#69033 (Use generator resume arguments in the async/await lowering) - rust-lang#69997 (add `Option::{zip,zip_with}` methods under "option_zip" gate) - rust-lang#70038 (Remove the call that makes miri fail) - rust-lang#70058 (can_begin_literal_maybe_minus: `true` on `"-"? lit` NTs.) - rust-lang#70111 (BTreeMap: remove shared root) - rust-lang#70139 (add delay_span_bug to TransmuteSizeDiff, just to be sure) - rust-lang#70165 (Remove the erase regions MIR transform) - rust-lang#70166 (Derive PartialEq, Eq and Hash for RangeInclusive) - rust-lang#70176 (Add tests for rust-lang#58319 and rust-lang#65131) - rust-lang#70177 (Fix oudated comment for NamedRegionMap) - rust-lang#70184 (expand_include: set `.directory` to dir of included file.) - rust-lang#70187 (more clippy fixes) - rust-lang#70188 (Clean up E0439 explanation) - rust-lang#70189 (Abi::is_signed: assert that we are a Scalar) - rust-lang#70194 (#[must_use] on split_off()) Failed merges: r? @ghost
2 parents 1057dc9 + 54285db commit 5f13820

File tree

136 files changed

+1478
-643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+1478
-643
lines changed

src/etc/gdb_rust_pretty_printing.py

+21-13
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,17 @@ def to_string(self):
370370
("(len: %i)" % self.__val.get_wrapped_value()['map']['length']))
371371

372372
def children(self):
373-
root = self.__val.get_wrapped_value()['map']['root']
374-
node_ptr = root['node']
375-
i = 0
376-
for child in children_of_node(node_ptr, root['height'], False):
377-
yield (str(i), child)
378-
i = i + 1
373+
prev_idx = None
374+
innermap = GdbValue(self.__val.get_wrapped_value()['map'])
375+
if innermap.get_wrapped_value()['length'] > 0:
376+
root = GdbValue(innermap.get_wrapped_value()['root'])
377+
type_name = str(root.type.ty.name).replace('core::option::Option<', '')[:-1]
378+
root = root.get_wrapped_value().cast(gdb.lookup_type(type_name))
379+
node_ptr = root['node']
380+
i = 0
381+
for child in children_of_node(node_ptr, root['height'], False):
382+
yield (str(i), child)
383+
i = i + 1
379384

380385

381386
class RustStdBTreeMapPrinter(object):
@@ -391,13 +396,16 @@ def to_string(self):
391396
("(len: %i)" % self.__val.get_wrapped_value()['length']))
392397

393398
def children(self):
394-
root = self.__val.get_wrapped_value()['root']
395-
node_ptr = root['node']
396-
i = 0
397-
for child in children_of_node(node_ptr, root['height'], True):
398-
yield (str(i), child[0])
399-
yield (str(i), child[1])
400-
i = i + 1
399+
if self.__val.get_wrapped_value()['length'] > 0:
400+
root = GdbValue(self.__val.get_wrapped_value()['root'])
401+
type_name = str(root.type.ty.name).replace('core::option::Option<', '')[:-1]
402+
root = root.get_wrapped_value().cast(gdb.lookup_type(type_name))
403+
node_ptr = root['node']
404+
i = 0
405+
for child in children_of_node(node_ptr, root['height'], True):
406+
yield (str(i), child[0])
407+
yield (str(i), child[1])
408+
i = i + 1
401409

402410

403411
class RustStdStringPrinter(object):

0 commit comments

Comments
 (0)