@@ -29,7 +29,7 @@ def get_unqualified_type_name(self):
29
29
if qualified_name is None :
30
30
return qualified_name
31
31
32
- return extract_type_name (qualified_name ).replace ("&'static " , "&" )
32
+ return rustpp . extract_type_name (qualified_name ).replace ("&'static " , "&" )
33
33
34
34
def get_dwarf_type_kind (self ):
35
35
type_class = self .ty .GetTypeClass ()
@@ -204,7 +204,7 @@ def render_child(child_index):
204
204
# LLDB is not good at handling zero-sized values, so we have to help
205
205
# it a little
206
206
if field .GetType ().GetByteSize () == 0 :
207
- return this + extract_type_name (field .GetType ().GetName ())
207
+ return this + rustpp . extract_type_name (field .GetType ().GetName ())
208
208
else :
209
209
return this + "<invalid value>"
210
210
@@ -274,23 +274,6 @@ def print_std_string_val(val, internal_dict):
274
274
# Helper Functions
275
275
#=--------------------------------------------------------------------------------------------------
276
276
277
- UNQUALIFIED_TYPE_MARKERS = frozenset (["(" , "[" , "&" , "*" ])
278
-
279
- def extract_type_name (qualified_type_name ):
280
- '''Extracts the type name from a fully qualified path'''
281
- if qualified_type_name [0 ] in UNQUALIFIED_TYPE_MARKERS :
282
- return qualified_type_name
283
-
284
- end_of_search = qualified_type_name .find ("<" )
285
- if end_of_search < 0 :
286
- end_of_search = len (qualified_type_name )
287
-
288
- index = qualified_type_name .rfind ("::" , 0 , end_of_search )
289
- if index < 0 :
290
- return qualified_type_name
291
- else :
292
- return qualified_type_name [index + 2 :]
293
-
294
277
def print_array_of_values (array_name , data_ptr_val , length , internal_dict ):
295
278
'''Prints a contigous memory range, interpreting it as values of the
296
279
pointee-type of data_ptr_val.'''
0 commit comments