Skip to content
Snippets Groups Projects
Commit 2b7f0378 authored by François Dumont's avatar François Dumont
Browse files

libstdc++: Fix gdb FilteringTypePrinter

Once we found a matching FilteringTypePrinter instance we look for the associated
typedef and check that the returned Python Type is equal to the Type to recognize.
But gdb Python Type includes properties to distinguish a typedef from the actual
type. So use gdb.types.get_basic_type to check if we are indeed on the same type.

Additionnaly enhance FilteringTypePrinter matching mecanism by introducing targ1 that,
if not None, will be used as the 1st template parameter.

libstdc++-v3/ChangeLog:

	* python/libstdcxx/v6/printers.py (FilteringTypePrinter): Rename 'match' field
	'template'. Add self.targ1 to specify the first template parameter of the instantiation
	to match.
	(add_one_type_printer): Add targ1 optional parameter, default to None.
	Use gdb.types.get_basic_type to compare the type to recognize and the type
	returned from the typedef lookup.
	(register_type_printers): Adapt calls to add_one_type_printers.
parent 63e1b2e7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment