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/12109] New: gdb when asked for backtrace produces pythontraceback


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

           Summary: gdb when asked for backtrace produces python traceback
           Product: gdb
           Version: 7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com


by Michal Hlavinka:

I've opened coredump with gdb, asked it for backtrace, but during the backtrace
there is printed also some python Traceback despite that application does not
use python at all, so I guess this is caused by gdb itself.

(gdb) bt
#0  0x000000329e431a7a in g_hash_table_lookup_node (hash_table=Traceback (most
recent call last):
  File "/usr/share/glib-2.0/gdb/glib.py", line 152, in pretty_printer_lookup
    return GHashPrinter(val)
  File "/usr/share/glib-2.0/gdb/glib.py", line 119, in __init__
    if self.val != 0 and string_hash != None and self.val["hash_func"] ==
string_hash:
RuntimeError: Cannot access memory at address 0x5cd00007273
0x5cd00007253, key=0x416ef6) at ghash.c:312
#1  g_hash_table_lookup (hash_table=Traceback (most recent call last):
  File "/usr/share/glib-2.0/gdb/glib.py", line 152, in pretty_printer_lookup
    return GHashPrinter(val)
  File "/usr/share/glib-2.0/gdb/glib.py", line 119, in __init__
    if self.val != 0 and string_hash != None and self.val["hash_func"] ==
string_hash:
RuntimeError: Cannot access memory at address 0x5cd00007273
0x5cd00007253, key=0x416ef6) at ghash.c:901
#2  0x0000000000409998 in cb_util_line_chart_refresh_control (pm=0x1718c00) at
gapcmon.c:1622


I think it should be printed as <corrupted> or something. It was quite odd when
I've faced it for first time, hard to tell what was happening. Sometimes I'm
sending backtraces to upstreams that knows that there is something like Linux
out there and sometimes they have "basic" questions about gdb output, I guess
they won't understand what is that traceback doing there. Also don't forget
there are other tools using gdb as backend. For example kdbg which shows just
"hash_table = Traceback" and that's all. This should be reported the same way
as <value optimized out> for example as <structure corrupted>

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Downstream Bug: https://bugzilla.redhat.com/show_bug.cgi?id=640985

Maybe to suppress Python output during `bt' but display it later for:
(gdb) print hash_table
?

Also why is Python pretty printer applied at all when it gets output just as:

#0  g_hash_table_lookup (hash_table=0x123f5e0 = {...}, key=0x7fffb2ca8830) at
ghash.c:895

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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