public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/9631] gdb crash in after "info local" when using public virtual derived class [not found] <20080916210801.9631.info@michaelzeilfelder.de> @ 2009-01-21 0:13 ` pedro at codesourcery dot com 2009-01-22 16:44 ` pedro at codesourcery dot com ` (4 subsequent siblings) 5 siblings, 0 replies; 6+ messages in thread From: pedro at codesourcery dot com @ 2009-01-21 0:13 UTC (permalink / raw) To: gdb-prs ------- Additional Comments From pedro at codesourcery dot com 2009-01-21 00:13 ------- I can reproduce this with both FSF gdb 6.8, and current mainline. Here's the trace on mainline: #0 0x00000000005d17f0 in gnuv3_baseclass_offset (type=0xbe6810, index=1, valaddr=0xbf2f60 "�\a@", address=140737488347904) at ../../src/gdb/gnu-v3-abi.c:466 #1 0x0000000000460a06 in baseclass_offset (type=0xbe6810, index=1, valaddr=0xbf2f60 "�\a@", address=140737488347904) at ../../src/gdb/cp-abi.c:78 #2 0x00000000005b9fc7 in cp_print_value (type=0xbe6810, real_type=0xbe6810, valaddr=0xbf2f60 "�\a@", offset=0, address=140737488347904, stream=0xbb1ae0, recurse=1, options=0x7fff3ad47640, dont_print_vb=0x0) at ../../src/gdb/cp-valprint.c:375 #3 0x00000000005b9264 in cp_print_value_fields (type=0xbe6810, real_type=0xbe6810, valaddr=0xbf2f60 "�\a@", offset=0, address=140737488347904, stream=0xbb1ae0, recurse=0, options=0x7fff3ad47640, dont_print_vb=0x0, dont_print_statmem=0) at ../../src/gdb/cp-valprint.c:169 #4 0x00000000005b8121 in c_val_print (type=0xbe6810, valaddr=0xbf2f60 "�\a@", embedded_offset=0, address=140737488347904, stream=0xbb1ae0, recurse=0, options=0x7fff3ad47640) at ../../src/gdb/c-valprint.c:342 #5 0x00000000004ecaa8 in val_print (type=0xbe6810, valaddr=0xbf2f60 "�\a@", embedded_offset=0, address=140737488347904, stream=0xbb1ae0, recurse=0, options=0x7fff3ad47780, language=0x76bf80) at ../../src/gdb/valprint.c:262 #6 0x00000000004ecc09 in common_val_print (val=0xc1e9c0, stream=0xbb1ae0, recurse=0, options=0x7fff3ad47780, language=0x76bf80) at ../../src/gdb/valprint.c:310 #7 0x00000000004f20c4 in print_variable_and_value (name=0xbf6eb0 "iAmTheBug", var=0xbf6e50, frame=0xb2c230, stream=0xbb1ae0, indent=0) at ../../src/gdb/printcmd.c:1754 #8 0x000000000051db8c in print_block_frame_locals (b=0xbf6ee0, frame=0xb2c230, num_tabs=0, stream=0xbb1ae0) at ../../src/gdb/stack.c:1377 #9 0x000000000051dd6e in print_frame_local_vars (frame=0xb2c230, num_tabs=0, stream=0xbb1ae0) at ../../src/gdb/stack.c:1449 #10 0x000000000051de1d in locals_info (args=0x0, from_tty=1) at ../../src/gdb/stack.c:1537 #11 0x000000000049dd34 in do_cfunc (c=0xb1dc00, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:67 #12 0x00000000004a0b3e in cmd_func (cmd=0xb1dc00, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:1732 #13 0x00000000004587cf in execute_command (p=0xae294c "", from_tty=1) at ../../src/gdb/top.c:449 #14 0x00000000005295a3 in command_handler (command=0xae2940 "info locals ") at ../../src/gdb/event-top.c:514 #15 0x0000000000529c66 in command_line_handler (rl=0xcd3080 "\220N�") at ../../src/gdb/event-top.c:739 #16 0x00000000006177f5 in rl_callback_read_char () at ../../src/readline/callback.c:205 #17 0x0000000000528b55 in rl_callback_read_char_wrapper (client_data=0x0) at ../../src/gdb/event-top.c:178 #18 0x0000000000529469 in stdin_event_handler (error=0, client_data=0x0) at ../../src/gdb/event-top.c:433 #19 0x0000000000527be5 in handle_file_event (data={ptr = 0x0, integer = 0}) at ../../src/gdb/event-loop.c:812 #20 0x0000000000527251 in process_event () at ../../src/gdb/event-loop.c:394 #21 0x0000000000527331 in gdb_do_one_event (data=0x0) at ../../src/gdb/event-loop.c:459 #22 0x0000000000521e07 in catch_errors (func=0x527266 <gdb_do_one_event>, func_args=0x0, errstring=0x72b20f "", mask=6) at ../../src/gdb/exceptions.c:516 #23 0x00000000004b1553 in tui_command_loop (data=0x0) at ../../src/gdb/tui/tui-interp.c:153 #24 0x000000000052242f in current_interp_command_loop () at ../../src/gdb/interps.c:290 #25 0x00000000004509a5 in captured_command_loop (data=0x0) at ../../src/gdb/main.c:99 #26 0x0000000000521e07 in catch_errors (func=0x450994 <captured_command_loop>, func_args=0x0, errstring=0x711f5d "", mask=6) at ../../src/gdb/exceptions.c:516 #27 0x0000000000451a89 in captured_main (data=0x7fff3ad48020) at ../../src/gdb/main.c:837 #28 0x0000000000521e07 in catch_errors (func=0x4509d7 <captured_main>, func_args=0x7fff3ad48020, errstring=0x711f5d "", mask=6) at ../../src/gdb/exceptions.c:516 #29 0x0000000000451abc in gdb_main (args=0x7fff3ad48020) at ../../src/gdb/main.c:846 #30 0x0000000000450990 in main (argc=2, argv=0x7fff3ad48128) at ../../src/gdb/gdb.c:33 The crash happens on the reference to: 466 if (vbasetype_vptr_fieldno >= 467 && TYPE_FIELD_BITPOS (vbasetype, vbasetype_vptr_fieldno) != 0) 468 error (_("Illegal vptr offset in class %s"), 469 TYPE_NAME (vbasetype) ? TYPE_NAME (vbasetype) : "<unknown>"); (gdb) p TYPE_FIELD_BITPOS (vbasetype, vbasetype_vptr_fieldno) Cannot access memory at address 0x0 (gdb) p vbasetype_vptr_fieldno $1 = 0 And, (gdb) p *TYPE_MAIN_TYPE (vbasetype) $10 = {code = TYPE_CODE_STRUCT, flag_unsigned = 0, flag_nosign = 0, flag_stub = 1, flag_target_stub = 0, flag_static = 0, flag_prototyped = 0, flag_incomplete = 0, flag_varargs = 0, flag_vector = 0, flag_stub_supported = 1, flag_nottext = 0, flag_fixed_instance = 0, nfields = 0, vptr_fieldno = -1, name = 0x0, tag_name = 0xbe6980 "foo::Base1", objfile = 0xbd6c30, target_type = 0x0, fields = 0x0, vptr_basetype = 0x0, type_specific = {cplus_stuff = 0xade3e0, floatformat = 0xade3e0, calling_convention = 11396064}} fields == NULL, and nfields = 0, and flag_stub == 1. -- http://sourceware.org/bugzilla/show_bug.cgi?id=9631 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9631] gdb crash in after "info local" when using public virtual derived class [not found] <20080916210801.9631.info@michaelzeilfelder.de> 2009-01-21 0:13 ` [Bug c++/9631] gdb crash in after "info local" when using public virtual derived class pedro at codesourcery dot com @ 2009-01-22 16:44 ` pedro at codesourcery dot com 2009-01-22 22:50 ` cvs-commit at gcc dot gnu dot org ` (3 subsequent siblings) 5 siblings, 0 replies; 6+ messages in thread From: pedro at codesourcery dot com @ 2009-01-22 16:44 UTC (permalink / raw) To: gdb-prs ------- Additional Comments From pedro at codesourcery dot com 2009-01-22 16:44 ------- I've posted a patch for this. -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at sourceware dot|pedro at codesourcery dot |org |com http://sourceware.org/bugzilla/show_bug.cgi?id=9631 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9631] gdb crash in after "info local" when using public virtual derived class [not found] <20080916210801.9631.info@michaelzeilfelder.de> 2009-01-21 0:13 ` [Bug c++/9631] gdb crash in after "info local" when using public virtual derived class pedro at codesourcery dot com 2009-01-22 16:44 ` pedro at codesourcery dot com @ 2009-01-22 22:50 ` cvs-commit at gcc dot gnu dot org 2009-01-22 22:52 ` pedro at codesourcery dot com ` (2 subsequent siblings) 5 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2009-01-22 22:50 UTC (permalink / raw) To: gdb-prs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2009-01-22 22:50 ------- Subject: Bug 9631 CVSROOT: /cvs/src Module name: src Changes by: palves@sourceware.org 2009-01-22 22:50:39 Modified files: gdb : ChangeLog gnu-v3-abi.c gdb/testsuite : ChangeLog Added files: gdb/testsuite/gdb.cp: pr9631.cc pr9631.exp Log message: 2009-01-22 Pedro Alves <pedro@codesourcery.com> PR c++/9631: * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on vbasetype. 2009-01-22 Pedro Alves <pedro@codesourcery.com> PR c++/9631: * gdb.cp/pr9631.cc, gdb.cp/pr9631.exp: New. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.10133&r2=1.10134 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/gnu-v3-abi.c.diff?cvsroot=src&r1=1.47&r2=1.48 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1789&r2=1.1790 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/pr9631.cc.diff?cvsroot=src&r1=NONE&r2=1.1 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/pr9631.exp.diff?cvsroot=src&r1=NONE&r2=1.1 -- http://sourceware.org/bugzilla/show_bug.cgi?id=9631 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9631] gdb crash in after "info local" when using public virtual derived class [not found] <20080916210801.9631.info@michaelzeilfelder.de> ` (2 preceding siblings ...) 2009-01-22 22:50 ` cvs-commit at gcc dot gnu dot org @ 2009-01-22 22:52 ` pedro at codesourcery dot com 2009-01-23 11:15 ` info at michaelzeilfelder dot de 2010-01-25 20:09 ` tromey at redhat dot com 5 siblings, 0 replies; 6+ messages in thread From: pedro at codesourcery dot com @ 2009-01-22 22:52 UTC (permalink / raw) To: gdb-prs ------- Additional Comments From pedro at codesourcery dot com 2009-01-22 22:52 ------- Patch checked in. New test included so we don't trip on this again. The next snapshot will have this fixed. Thanks! -- What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://sourceware.org/bugzilla/show_bug.cgi?id=9631 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9631] gdb crash in after "info local" when using public virtual derived class [not found] <20080916210801.9631.info@michaelzeilfelder.de> ` (3 preceding siblings ...) 2009-01-22 22:52 ` pedro at codesourcery dot com @ 2009-01-23 11:15 ` info at michaelzeilfelder dot de 2010-01-25 20:09 ` tromey at redhat dot com 5 siblings, 0 replies; 6+ messages in thread From: info at michaelzeilfelder dot de @ 2009-01-23 11:15 UTC (permalink / raw) To: gdb-prs ------- Additional Comments From info at michaelzeilfelder dot de 2009-01-23 11:15 ------- Thanks for the work! -- http://sourceware.org/bugzilla/show_bug.cgi?id=9631 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/9631] gdb crash in after "info local" when using public virtual derived class [not found] <20080916210801.9631.info@michaelzeilfelder.de> ` (4 preceding siblings ...) 2009-01-23 11:15 ` info at michaelzeilfelder dot de @ 2010-01-25 20:09 ` tromey at redhat dot com 5 siblings, 0 replies; 6+ messages in thread From: tromey at redhat dot com @ 2010-01-25 20:09 UTC (permalink / raw) To: gdb-prs ------- Additional Comments From tromey at redhat dot com 2010-01-25 20:09 ------- *** Bug 10295 has been marked as a duplicate of this bug. *** -- What |Removed |Added ---------------------------------------------------------------------------- CC| |tfogal at alumni dot unh dot | |edu http://sourceware.org/bugzilla/show_bug.cgi?id=9631 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-25 20:09 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20080916210801.9631.info@michaelzeilfelder.de> 2009-01-21 0:13 ` [Bug c++/9631] gdb crash in after "info local" when using public virtual derived class pedro at codesourcery dot com 2009-01-22 16:44 ` pedro at codesourcery dot com 2009-01-22 22:50 ` cvs-commit at gcc dot gnu dot org 2009-01-22 22:52 ` pedro at codesourcery dot com 2009-01-23 11:15 ` info at michaelzeilfelder dot de 2010-01-25 20:09 ` 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).