This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python] Pretty-printers and addressprint


On Tue, Nov 10, 2009 at 8:53 AM, Tom Tromey <tromey@redhat.com> wrote:

> What you want instead is repr(value.string()), at least if you want to
> try this route.

That of course can't work, since it's the value.string() which
raises exception. Here is the output:

$4 = Traceback (most recent call last):
  File "../../../src/gdb/testsuite/gdb.python/py-prettyprint.py", line
27, in to_string
    return repr(self.val['whybother']['contents'].string())
UnicodeDecodeError: 'ascii' codec can't decode byte 0x81 in position
9: ordinal not in range(128)


It also changes other output in the way I didn't expect:

print cstring
$5 = u'const string'

print c
$6 = container u'container' with 2 elements = {
  [0] = 23,
  [1] = 72
}

Thanks,
-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]