[PATCH] gdbhooks.py: Fix UnicodeDecodeErrors when printing trees with corrupt codes

Jeff Law law@redhat.com
Fri Apr 26 15:58:00 GMT 2019


On 4/18/19 6:47 AM, Eugene Sharygin wrote:
> Hi,
> 
> This silences UnicodeDecodeError Python exceptions raised when trying to
> print a tree with a corrupt (or uninitialized) code in Gdb:
> 
>     Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xb8 in position 0: invalid start byte:
> 
> With this patch, TreePrinter would print such trees generically like
> this (in the format it uses for null trees):
> 
>      <tree 0x7f8459c76500>
> 
> Eugene
> 
> 2018-04-18  Eugene Sharygin  <eush@ispras.ru>
> 
>         * gdbhooks.py: Fix UnicodeDecodeErrors when printing trees with
>           corrupt codes.
THanks.  I've committed this to the trunk.
jeff



More information about the Gcc-patches mailing list