Re: Fix pretty printers for versioned namespace

2017-11-01 Thread François Dumont
On 30/10/2017 19:15, Jonathan Wakely wrote: @@ -1227,7 +1227,12 @@ class Printer(object):    def add_version(self, base, name, function):    self.add(base + name, function)    if _versioned_namespace: -    self.add(base + _versioned_namespace + name, function) +   

Re: Fix pretty printers for versioned namespace

2017-10-30 Thread Jonathan Wakely
On 30/10/17 17:59 +, Jonathan Wakely wrote: On 30/10/17 18:13 +0100, François Dumont wrote: On 26/10/2017 22:41, Jonathan Wakely wrote: On 26/10/17 21:37 +0100, Jonathan Wakely wrote: On 26/10/17 21:30 +0100, Jonathan Wakely wrote: On 26/10/17 22:19 +0200, François Dumont wrote: @@

Re: Fix pretty printers for versioned namespace

2017-10-30 Thread Jonathan Wakely
On 30/10/17 18:13 +0100, François Dumont wrote: On 26/10/2017 22:41, Jonathan Wakely wrote: On 26/10/17 21:37 +0100, Jonathan Wakely wrote: On 26/10/17 21:30 +0100, Jonathan Wakely wrote: On 26/10/17 22:19 +0200, François Dumont wrote: @@ -1232,7 +1232,7 @@ class Printer(object):   # Add a

Re: Fix pretty printers for versioned namespace

2017-10-30 Thread François Dumont
On 26/10/2017 22:41, Jonathan Wakely wrote: On 26/10/17 21:37 +0100, Jonathan Wakely wrote: On 26/10/17 21:30 +0100, Jonathan Wakely wrote: On 26/10/17 22:19 +0200, François Dumont wrote: @@ -1232,7 +1232,7 @@ class Printer(object):   # Add a name using _GLIBCXX_BEGIN_NAMESPACE_CONTAINER.  

Re: Fix pretty printers for versioned namespace

2017-10-26 Thread Jonathan Wakely
On 26/10/17 21:37 +0100, Jonathan Wakely wrote: On 26/10/17 21:30 +0100, Jonathan Wakely wrote: On 26/10/17 22:19 +0200, François Dumont wrote: @@ -1232,7 +1232,7 @@ class Printer(object): # Add a name using _GLIBCXX_BEGIN_NAMESPACE_CONTAINER. def add_container(self, base, name, function):

Re: Fix pretty printers for versioned namespace

2017-10-26 Thread Jonathan Wakely
On 26/10/17 21:30 +0100, Jonathan Wakely wrote: On 26/10/17 22:19 +0200, François Dumont wrote: @@ -1232,7 +1232,7 @@ class Printer(object): # Add a name using _GLIBCXX_BEGIN_NAMESPACE_CONTAINER. def add_container(self, base, name, function): self.add_version(base, name, function)

Re: Fix pretty printers for versioned namespace

2017-10-26 Thread Jonathan Wakely
On 26/10/17 22:19 +0200, François Dumont wrote: @@ -1232,7 +1232,7 @@ class Printer(object): # Add a name using _GLIBCXX_BEGIN_NAMESPACE_CONTAINER. def add_container(self, base, name, function): self.add_version(base, name, function) -self.add_version(base +

Fix pretty printers for versioned namespace

2017-10-26 Thread François Dumont
Hi     When restoring versioned namespace feature I forgot to check for the pretty printer tests which are now broken.     Here is the patch to fix those. Tested under Linux x86_64 normal and versioned namepace modes, ok to commit ? François diff --git

Re: Pretty printers for versioned namespace

2017-02-16 Thread Jonathan Wakely
On 15/02/17 22:44 +0100, François Dumont wrote: Hi Here is the end result. I eventually chose to detect usage of versioned namespace while generating the .gdb file. I haven't use any caching mecanism considering the limited number of test cases. Tested under Linux x86_64 with and

Re: Pretty printers for versioned namespace

2017-01-19 Thread Jonathan Wakely
On 19/01/17 22:01 +0100, François Dumont wrote: On 10/01/2017 13:39, Jonathan Wakely wrote: I've committed the attached patch, which passes the tests for the default configuration and the versioned namespace configuration. I added another helper function, strip_versioned_namespace, which is

Re: Pretty printers for versioned namespace

2017-01-19 Thread François Dumont
On 10/01/2017 13:39, Jonathan Wakely wrote: I've committed the attached patch, which passes the tests for the default configuration and the versioned namespace configuration. I added another helper function, strip_versioned_namespace, which is more expressive than doing

Re: Pretty printers for versioned namespace

2017-01-10 Thread Jonathan Wakely
On 09/01/17 21:25 +0100, François Dumont wrote: On 04/01/2017 13:52, Jonathan Wakely wrote: On 24/12/16 14:47 +0100, François Dumont wrote: I'd prefer not to have to use the regex matches in libstdc++.exp as they complicate things. For the two examples above, the whatis results are bad even

Re: Pretty printers for versioned namespace

2017-01-09 Thread François Dumont
On 04/01/2017 13:52, Jonathan Wakely wrote: On 24/12/16 14:47 +0100, François Dumont wrote: I'd prefer not to have to use the regex matches in libstdc++.exp as they complicate things. For the two examples above, the whatis results are bad even for the non-versioned namespace. For

Re: Pretty printers for versioned namespace

2017-01-04 Thread Jonathan Wakely
On 24/12/16 14:47 +0100, François Dumont wrote: On 15/12/2016 15:57, Jonathan Wakely wrote: And we could avoid three re.match expressions with complicated regular expressions by creating a helper function to do the "startswith" checks: def is_specialization_of(type, template_name): return

Re: Pretty printers for versioned namespace

2016-12-24 Thread François Dumont
On 15/12/2016 15:57, Jonathan Wakely wrote: And we could avoid three re.match expressions with complicated regular expressions by creating a helper function to do the "startswith" checks: def is_specialization_of(type, template_name): return re.match('^std::(%s)?%s<.*>$' % (vers_nsp,

Re: Pretty printers for versioned namespace

2016-12-15 Thread Jonathan Wakely
On 14/12/16 22:49 +0100, François Dumont wrote: On 09/12/2016 16:18, Jonathan Wakely wrote: But I don't know how to fix this so for the moment I just adapt it to correctly handle std::__7::string. But that's not correct. Please try to understand the point I'm making: The name

Re: Pretty printers for versioned namespace

2016-12-15 Thread Jonathan Wakely
On 14/12/16 22:49 +0100, François Dumont wrote: @@ -1321,7 +1328,7 @@ def register_type_printers(obj): if not _use_type_printing: return -for pfx in ('', 'w'): +for pfx in ('', 'w', vers_nsp, vers_nsp + 'w'): add_one_type_printer(obj, 'basic_string', pfx + 'string')

Re: Pretty printers for versioned namespace

2016-12-15 Thread Jonathan Wakely
On 14/12/16 22:49 +0100, François Dumont wrote: On 09/12/2016 16:18, Jonathan Wakely wrote: But I don't know how to fix this so for the moment I just adapt it to correctly handle std::__7::string. But that's not correct. Please try to understand the point I'm making: The name

Re: Pretty printers for versioned namespace

2016-12-14 Thread François Dumont
On 09/12/2016 16:18, Jonathan Wakely wrote: But I don't know how to fix this so for the moment I just adapt it to correctly handle std::__7::string. But that's not correct. Please try to understand the point I'm making: The name "std::__7::string" does not appear in a symbol name. Ok, the

Re: Pretty printers for versioned namespace

2016-12-09 Thread Jonathan Wakely
On 09/12/16 13:55 +0100, François Dumont wrote: On 02/12/2016 01:41, Jonathan Wakely wrote: On 01/12/16 22:51 +0100, François Dumont wrote: We needed the StdExpVerAnyPrinter just because of the loopkup for 'std::string' which has to be 'std::__7::string'. But I used similar technique exposed

Re: Pretty printers for versioned namespace

2016-12-09 Thread François Dumont
On 02/12/2016 01:41, Jonathan Wakely wrote: On 01/12/16 22:51 +0100, François Dumont wrote: We needed the StdExpVerAnyPrinter just because of the loopkup for 'std::string' which has to be 'std::__7::string'. But I used similar technique exposed previously to get rid of it. But I don't see

Re: Pretty printers for versioned namespace

2016-12-01 Thread Jonathan Wakely
On 01/12/16 22:51 +0100, François Dumont wrote: On 29/11/2016 21:17, Jonathan Wakely wrote: On 28/11/16 22:19 +0100, François Dumont wrote: I am not fully happy with the replication in printers.py of StdRbtreeIteratorPrinter and StdExpAnyPrinter(SingleObjContainerPrinter in respectively

Re: Pretty printers for versioned namespace

2016-12-01 Thread François Dumont
On 29/11/2016 21:17, Jonathan Wakely wrote: On 28/11/16 22:19 +0100, François Dumont wrote: Hi Here is a patch to fix pretty printers when versioned namespace is activated. You will see that I have hesitated in making the fix independant of the version being used. In source files you

Re: Pretty printers for versioned namespace

2016-11-29 Thread Jonathan Wakely
On 28/11/16 22:19 +0100, François Dumont wrote: Hi Here is a patch to fix pretty printers when versioned namespace is activated. You will see that I have hesitated in making the fix independant of the version being used. In source files you will find (__7::)? patterns while

Pretty printers for versioned namespace

2016-11-28 Thread François Dumont
Hi Here is a patch to fix pretty printers when versioned namespace is activated. You will see that I have hesitated in making the fix independant of the version being used. In source files you will find (__7::)? patterns while in xmethods.py I chose (__\d+::)? making it ready