public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [0/4] RFC: add DWARF index support
Date: Thu, 22 Jul 2010 04:28:00 -0000	[thread overview]
Message-ID: <AANLkTi=uZLE2+bdP70T9N+cCnkQsYhkokMD=c7Krj5p2@mail.gmail.com> (raw)
In-Reply-To: <m3aapvru5e.fsf@fleche.redhat.com>

On Tue, Jul 13, 2010 at 1:42 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
>
> Tom> This patch series adds support for a DWARF index to gdb.

I am seeing crashes in code which appears to have been committed in this patch:

(top) r
warning: no loadable sections found in added symbol-file
/usr/lib/debug/lib/ld-2.7.so
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
GNU gdb (GDB) 7.2.50.20100722-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/google/fortuneseeker...done.
(gdb) b eventmanager::TaskInfo::GetThreadState

Program received signal SIGSEGV, Segmentation fault.
0x0000000000582ce5 in process_full_comp_unit (per_cu=0x2c9c640) at
../../src/gdb/dwarf2read.c:4106
4106	  baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
(top) p objfile
$9 = (struct objfile *) 0x0
(top) p *per_cu
$10 = {offset = 603943, length = 425, queued = 1, load_all_dies = 0,
from_debug_types = 1, cu = 0x47cec30, type_hash = 0x0, objfile = 0x0,
v = {psymtab = 0x2710fe0, quick = 0x2710fe0}}

I've briefly perused dwarf2read.c, and didn't find a place that
insures that per_cu->objfile is initialized :-(

Clues appreciated.

(top) bt
#0  0x0000000000582ce5 in process_full_comp_unit (per_cu=0x2c9c640)
    at ../../src/gdb/dwarf2read.c:4106
#1  0x00000000005828a7 in process_queue (objfile=0xd09a40)
    at ../../src/gdb/dwarf2read.c:3943

... Note: objfile here is not NULL, and is the "fortuneseeker"
executable I am debugging...

#2  0x000000000057d6c6 in dw2_do_instantiate_symtab (
    objfile=0xd09a40, per_cu=0x2c9c640)
    at ../../src/gdb/dwarf2read.c:1582
#3  0x0000000000582aaf in psymtab_to_symtab_1 (pst=0x2710fe0)
    at ../../src/gdb/dwarf2read.c:4019
#4  0x0000000000582775 in dwarf2_psymtab_to_symtab (pst=0x2710fe0)
    at ../../src/gdb/dwarf2read.c:3900
#5  0x000000000050f8e6 in psymtab_to_symtab (pst=0x2710fe0)
    at ../../src/gdb/psymtab.c:531
#6  0x000000000050f59b in lookup_symbol_aux_psymtabs (
    objfile=0xd09a40, block_index=0,
    name=0x7fffffffd020 "eventmanager::TaskInfo",
    domain=STRUCT_DOMAIN) at ../../src/gdb/psymtab.c:418
#7  0x0000000000508c60 in lookup_symbol_aux_quick (objfile=0xd09a40,
    kind=0, name=0x7fffffffd020 "eventmanager::TaskInfo",
    domain=STRUCT_DOMAIN) at ../../src/gdb/symtab.c:1387
#8  0x0000000000508e9d in lookup_symbol_global (
    name=0x7fffffffd020 "eventmanager::TaskInfo", block=0x0,
    domain=STRUCT_DOMAIN) at ../../src/gdb/symtab.c:1505
#9  0x00000000006081b2 in lookup_symbol_file (
    name=0x7fffffffd020 "eventmanager::TaskInfo", block=0x0,
    domain=STRUCT_DOMAIN, anonymous_namespace=0)
    at ../../src/gdb/cp-namespace.c:528
#10 0x0000000000607ba6 in cp_lookup_symbol_in_namespace (
    namespace=0x7fffffffce40 "",
    name=0x7fffffffd020 "eventmanager::TaskInfo", block=0x0,
    domain=STRUCT_DOMAIN) at ../../src/gdb/cp-namespace.c:261
#11 0x000000000060810e in lookup_namespace_scope (
    name=0x7fffffffd020 "eventmanager::TaskInfo", block=0x0,
    domain=STRUCT_DOMAIN, scope=0x7779c9 "", scope_len=0)
    at ../../src/gdb/cp-namespace.c:495
#12 0x0000000000607b2c in cp_lookup_symbol_nonlocal (
    name=0x7fffffffd020 "eventmanager::TaskInfo", block=0x0,
    domain=STRUCT_DOMAIN) at ../../src/gdb/cp-namespace.c:243
#13 0x0000000000508762 in lookup_symbol_aux (
    name=0x7fffffffd020 "eventmanager::TaskInfo", block=0x0,
    domain=STRUCT_DOMAIN, language=language_cplus,
    is_a_field_of_this=0x0) at ../../src/gdb/symtab.c:1170
#14 0x0000000000508537 in lookup_symbol_in_language (
    name=0x7fffffffd020 "eventmanager::TaskInfo", block=0x0,
    domain=STRUCT_DOMAIN, lang=language_cplus,
    is_a_field_of_this=0x0) at ../../src/gdb/symtab.c:1077
#15 0x000000000050859a in lookup_symbol (
    name=0x7fffffffd020 "eventmanager::TaskInfo", block=0x0,
    domain=STRUCT_DOMAIN, is_a_field_of_this=0x0)
    at ../../src/gdb/symtab.c:1091
#16 0x000000000051d53e in lookup_prefix_sym (argptr=0x7fffffffd4c0,
    p=0xb4422a "GetThreadState") at ../../src/gdb/linespec.c:1522
#17 0x000000000051cc48 in decode_compound (argptr=0x7fffffffd4c0,
    funfirstline=1, canonical=0x7fffffffd588,
    saved_arg=0xb44212 "eventmanager::TaskInfo::GetThreadState",
    p=0xb44238 "", not_found_ptr=0x7fffffffd5b4)
    at ../../src/gdb/linespec.c:1337
#18 0x000000000051bd16 in decode_line_1 (argptr=0x7fffffffd4c0,
    funfirstline=1, default_symtab=0x0, default_line=0,
    canonical=0x7fffffffd588, not_found_ptr=0x7fffffffd5b4)
    at ../../src/gdb/linespec.c:800
#19 0x00000000004d28d2 in parse_breakpoint_sals (
    address=0x7fffffffd4c0, sals=0x7fffffffd540,
    addr_string=0x7fffffffd588, not_found_ptr=0x7fffffffd5b4)
    at ../../src/gdb/breakpoint.c:7250
#20 0x00000000004d2b29 in do_captured_parse_breakpoint (ui=0xcdc7f0,
    data=0x7fffffffd510) at ../../src/gdb/breakpoint.c:7320
#21 0x000000000053b5d1 in catch_exception (uiout=0xcdc7f0,
    func=0x4d2aed <do_captured_parse_breakpoint>,
    func_args=0x7fffffffd510, mask=6)
    at ../../src/gdb/exceptions.c:468
#22 0x00000000004d32a4 in create_breakpoint (gdbarch=0xcf5e20,
    arg=0xb4422a "GetThreadState", cond_string=0x0, thread=0,
    parse_condition_and_thread=1, tempflag=0,
    type_wanted=bp_breakpoint, ignore_count=0,
    pending_break_support=AUTO_BOOLEAN_AUTO, ops=0x0, from_tty=0,
    enabled=1) at ../../src/gdb/breakpoint.c:7502
#23 0x00000000004d39ef in break_command_1 (
    arg=0xb44212 "eventmanager::TaskInfo::GetThreadState", flag=0,
    from_tty=0) at ../../src/gdb/breakpoint.c:7723
#24 0x00000000004d3b83 in break_command (
    arg=0xb44212 "eventmanager::TaskInfo::GetThreadState",
    from_tty=0) at ../../src/gdb/breakpoint.c:7795
#25 0x000000000048d460 in do_cfunc (c=0xb87870,
    args=0xb44212 "eventmanager::TaskInfo::GetThreadState",
    from_tty=0) at ../../src/gdb/cli/cli-decode.c:67
#26 0x0000000000490306 in cmd_func (cmd=0xb87870,
    args=0xb44212 "eventmanager::TaskInfo::GetThreadState",
    from_tty=0) at ../../src/gdb/cli/cli-decode.c:1771
#27 0x0000000000412d86 in execute_command (p=0xb44237 "e",
    from_tty=1) at ../../src/gdb/top.c:422
#28 0x00000000005430b7 in command_handler (
    command=0xb44210 "b eventmanager::TaskInfo::GetThreadState")
    at ../../src/gdb/event-top.c:498
#29 0x000000000054365b in command_line_handler (
    rl=0xbbc4e0 " \257\326") at ../../src/gdb/event-top.c:702
#30 0x000000000064da01 in rl_callback_read_char ()
    at ../../src/readline/callback.c:205
#31 0x0000000000542711 in rl_callback_read_char_wrapper (
    client_data=0x0) at ../../src/gdb/event-top.c:178
#32 0x0000000000542fb0 in stdin_event_handler (error=0,
    client_data=0x0) at ../../src/gdb/event-top.c:433
#33 0x00000000005417a1 in handle_file_event (data=...)
    at ../../src/gdb/event-loop.c:817
#34 0x0000000000540e0d in process_event ()
    at ../../src/gdb/event-loop.c:399
#35 0x0000000000540eed in gdb_do_one_event (data=0x0)
    at ../../src/gdb/event-loop.c:464
#36 0x000000000053b77f in catch_errors (
    func=0x540e22 <gdb_do_one_event>, func_args=0x0,
    errstring=0x75ad6f "", mask=6) at ../../src/gdb/exceptions.c:518
#37 0x00000000004a39ff in tui_command_loop (data=0x0)
    at ../../src/gdb/tui/tui-interp.c:171
#38 0x000000000053bf27 in current_interp_command_loop ()
    at ../../src/gdb/interps.c:291
#39 0x0000000000408cd7 in captured_command_loop (data=0x0)
    at ../../src/gdb/main.c:227
#40 0x000000000053b77f in catch_errors (
    func=0x408cc6 <captured_command_loop>, func_args=0x0,
    errstring=0x737f3f "", mask=6) at ../../src/gdb/exceptions.c:518
#41 0x0000000000409c02 in captured_main (data=0x7fffffffdb80)
    at ../../src/gdb/main.c:910
#42 0x000000000053b77f in catch_errors (
    func=0x408d09 <captured_main>, func_args=0x7fffffffdb80,
    errstring=0x737f3f "", mask=6) at ../../src/gdb/exceptions.c:518
#43 0x0000000000409c35 in gdb_main (args=0x7fffffffdb80)
    at ../../src/gdb/main.c:919
#44 0x0000000000408a20 in main (argc=2, argv=0x7fffffffdc88)
    at ../../src/gdb/gdb.c:34


-- 
Paul Pluzhnikov

  reply	other threads:[~2010-07-22  4:28 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30 22:33 Tom Tromey
2010-07-09 17:31 ` Tom Tromey
2010-07-09 17:45   ` Eli Zaretskii
2010-07-09 20:26     ` Tom Tromey
2010-07-10  7:03       ` Eli Zaretskii
2010-07-12 16:52         ` Tom Tromey
2010-07-22 11:31   ` Jan Kratochvil
2010-07-22 15:54     ` Tom Tromey
2010-07-30 20:46   ` Tom Tromey
2010-08-02 18:10     ` Doug Evans
2010-08-05 16:30       ` Tom Tromey
2010-08-05 16:32         ` Doug Evans
2010-08-05 19:55           ` Tom Tromey
2010-08-05 19:57           ` Tom Tromey
2010-08-06 17:15             ` Doug Evans
2010-08-06 17:40               ` Tom Tromey
2010-08-06 20:53                 ` Doug Evans
2010-08-09 20:36                   ` Tom Tromey
2010-08-09 21:16                     ` Doug Evans
2010-08-10 18:46                       ` Tom Tromey
2010-08-10 18:57                         ` Doug Evans
2010-08-09 20:25                 ` Jan Kratochvil
2010-08-09 20:43                   ` Tom Tromey
2010-08-09 20:33                 ` Jan Kratochvil
2010-07-13 20:42 ` Tom Tromey
2010-07-22  4:28   ` Paul Pluzhnikov [this message]
2010-07-22 14:14     ` Tom Tromey
2010-07-22 15:54       ` Tom Tromey
2010-07-22 16:20         ` Paul Pluzhnikov
2010-07-22 20:54         ` Tom Tromey
2010-07-23 22:12           ` Tom Tromey
2010-07-26 18:41             ` Ken Werner
2010-07-26 18:50               ` Tom Tromey
2010-07-27  7:58                 ` Ken Werner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=uZLE2+bdP70T9N+cCnkQsYhkokMD=c7Krj5p2@mail.gmail.com' \
    --to=ppluzhnikov@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).