This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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]

[Bug python/11324] New: python pretty-printers uglify backtraces


This a slightly lame bug report since it is just going on a backtrace provided
by a user and I don't actually have the binary myself:
https://bugzilla.redhat.com/attachment.cgi?id=396257

See the backtrace of thread 1 (starting from frame 11 and later):

#11 0x000000375102a6ca in g_hash_table_lookup_node (hash_table=
    Traceback (most recent call last):
  File "/usr/share/glib-2.0/gdb/glib.py", line 155, in pretty_printer_lookup
    return GHashPrinter(val)
  File "/usr/share/glib-2.0/gdb/glib.py", line 122, in __init__
    if self.val != 0 and string_hash != None and self.val["hash_func"] ==
string_hash:
RuntimeError: Cannot access memory at address 0xaaaaaaaaaaaaaaca
0xaaaaaaaaaaaaaaaa, key=0x3755031684) at ghash.c:195
        node = <value optimized out>
        node_index = <value optimized out>
        hash_value = <value optimized out>
        step = 0

Instead of having the the python backtrace in the middle of the values printed I
would expect a fallback to the "raw gdb" value print for hash_table, probably
just hash_table=0xaaaaaaaaaaaaaaca. Which is likely what it is, it is a bogus
address. No need to tell me that with a python backtrace. Or if you do, please
report just something simple like: hash_table="<error:couldn't pythonfy>"

Having the full python backtrace might be interesting for a pretty-printer
plugin writer, but it should be an option off by default.

-- 
           Summary: python pretty-printers uglify backtraces
           Product: gdb
           Version: archer
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: mjw at redhat dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=11324

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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