public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/12109] New: gdb when asked for backtrace produces python traceback
@ 2010-10-11  8:16 jan.kratochvil at redhat dot com
  2010-10-14 15:11 ` [Bug python/12109] " tromey at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: jan.kratochvil at redhat dot com @ 2010-10-11  8:16 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug python/12109] gdb when asked for backtrace produces python traceback
  2010-10-11  8:16 [Bug python/12109] New: gdb when asked for backtrace produces python traceback jan.kratochvil at redhat dot com
@ 2010-10-14 15:11 ` tromey at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: tromey at redhat dot com @ 2010-10-14 15:11 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |tromey at redhat dot com
         Resolution|                            |DUPLICATE

--- Comment #1 from Tom Tromey <tromey at redhat dot com> 2010-10-14 15:10:25 UTC ---
Dup.

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

Yeah, that seems reasonable.

> 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

The printer might change the abbreviated output, if it has a to_string method.

*** This bug has been marked as a duplicate of bug 11324 ***

-- 
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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-14 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-11  8:16 [Bug python/12109] New: gdb when asked for backtrace produces python traceback jan.kratochvil at redhat dot com
2010-10-14 15:11 ` [Bug python/12109] " tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).