]> git.lizzy.rs Git - rust.git/blobdiff - src/etc/debugger_pretty_printers_common.py
update
[rust.git] / src / etc / debugger_pretty_printers_common.py
index 1797f6708ac5b4745fcc2300fc3653b68c1320bc..385ce8efab87bee6cb4447e046e10e8489d07811 100644 (file)
@@ -1,13 +1,3 @@
-# Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
 """
 This module provides an abstraction layer over common Rust pretty printing
 functionality needed by both GDB and LLDB.
@@ -352,8 +342,7 @@ def extract_length_ptr_and_cap_from_std_vec(vec_val):
 
     vec_ptr_val = buf.get_child_at_index(0)
     capacity = buf.get_child_at_index(1).as_integer()
-    unique_ptr_val = vec_ptr_val.get_child_at_index(0)
-    data_ptr = unique_ptr_val.get_child_at_index(0)
+    data_ptr = vec_ptr_val.get_child_at_index(0)
     assert data_ptr.type.get_dwarf_type_kind() == DWARF_TYPE_CODE_PTR
     return (length, data_ptr, capacity)
 
@@ -370,37 +359,10 @@ def extract_tail_head_ptr_and_cap_from_std_vecdeque(vec_val):
 
     vec_ptr_val = buf.get_child_at_index(0)
     capacity = buf.get_child_at_index(1).as_integer()
-    unique_ptr_val = vec_ptr_val.get_child_at_index(0)
-    data_ptr = unique_ptr_val.get_child_at_index(0)
+    data_ptr = vec_ptr_val.get_child_at_index(0)
     assert data_ptr.type.get_dwarf_type_kind() == DWARF_TYPE_CODE_PTR
     return (tail, head, data_ptr, capacity)
 
-
-def extract_length_and_ptr_from_std_btreeset(vec_val):
-    assert vec_val.type.get_type_kind() == TYPE_KIND_STD_BTREESET
-    map = vec_val.get_child_at_index(0)
-    root = map.get_child_at_index(0)
-    length = map.get_child_at_index(1).as_integer()
-    node = root.get_child_at_index(0)
-    ptr = node.get_child_at_index(0)
-    unique_ptr_val = ptr.get_child_at_index(0)
-    data_ptr = unique_ptr_val.get_child_at_index(0)
-    assert data_ptr.type.get_dwarf_type_kind() == DWARF_TYPE_CODE_PTR
-    return (length, data_ptr)
-
-
-def extract_length_and_ptr_from_std_btreemap(vec_val):
-    assert vec_val.type.get_type_kind() == TYPE_KIND_STD_BTREEMAP
-    root = vec_val.get_child_at_index(0)
-    length = vec_val.get_child_at_index(1).as_integer()
-    node = root.get_child_at_index(0)
-    ptr = node.get_child_at_index(0)
-    unique_ptr_val = ptr.get_child_at_index(0)
-    data_ptr = unique_ptr_val.get_child_at_index(0)
-    assert data_ptr.type.get_dwarf_type_kind() == DWARF_TYPE_CODE_PTR
-    return (length, data_ptr)
-
-
 def extract_length_and_ptr_from_slice(slice_val):
     assert (slice_val.type.get_type_kind() == TYPE_KIND_SLICE or
             slice_val.type.get_type_kind() == TYPE_KIND_STR_SLICE)