From: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
To: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v4 2/2] Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
Date: Mon, 27 Feb 2017 19:43:00 -0000 [thread overview]
Message-ID: <09bae426-d169-6300-0850-eb5d3d87da25@linux.vnet.ibm.com> (raw)
In-Reply-To: <737ff3d8-55f6-7e22-1658-06f79cd1ccf5@redhat.com>
On 02/01/2017 10:01 PM, Pedro Alves wrote:
> On 02/01/2017 11:23 PM, Luis Machado wrote:
>
>>
>> That looks better. Thanks.
>
> Great, thanks.
>
> If there are no further comments, I'll probably push this tomorrow.
>
> Thanks,
> Pedro Alves
>
>
Hi Pedro,
from bisect, it seems commit d7e747 introduced a problem when using
layout regs, that leads gdb to crash when issuing:
./gdb ./a.out -ex 'layout regs' -ex start
From the backtrace, it's caused by this 'delete' on tui_restore_gdbout():
(gdb) bt
#0 0x00007ffff6b962b2 in free () from /lib64/libc.so.6
#1 0x000000000059fa47 in tui_restore_gdbout (ui=0x22997b0) at ../../gdb/tui/tui-regs.c:714
#2 0x0000000000619996 in do_my_cleanups (pmy_chain=pmy_chain@entry=0x1e08320 <cleanup_chain>, old_chain=old_chain@entry=0x235b4b0) at ../../gdb/common/cleanups.c:154
#3 0x0000000000619b1d in do_cleanups (old_chain=old_chain@entry=0x235b4b0) at ../../gdb/common/cleanups.c:176
#4 0x000000000059fb0d in tui_register_format (frame=frame@entry=0x22564e0, regnum=regnum@entry=0) at ../../gdb/tui/tui-regs.c:747
#5 0x000000000059ffeb in tui_get_register (data=0x2434d18, changedp=0x0, regnum=0, frame=0x22564e0) at ../../gdb/tui/tui-regs.c:768
#6 tui_show_register_group (refresh_values_only=<optimized out>, frame=0x22564e0, group=0x1e09250 <general_group>) at ../../gdb/tui/tui-regs.c:287
#7 tui_show_registers (group=0x1e09250 <general_group>) at ../../gdb/tui/tui-regs.c:156
#8 0x00000000005a07cf in tui_check_register_values (frame=frame@entry=0x22564e0) at ../../gdb/tui/tui-regs.c:496
#9 0x00000000005a3e65 in tui_check_data_values (frame=frame@entry=0x22564e0) at ../../gdb/tui/tui-windata.c:232
#10 0x000000000059cf65 in tui_refresh_frame_and_register_information (registers_too_p=1) at ../../gdb/tui/tui-hooks.c:156
#11 0x00000000006d5c05 in generic_observer_notify (args=0x7fffffffdbe0, subject=<optimized out>) at ../../gdb/observer.c:167
#12 observer_notify_normal_stop (bs=<optimized out>, print_frame=print_frame@entry=1) at ./observer.inc:61
#13 0x00000000006a6409 in normal_stop () at ../../gdb/infrun.c:8364
#14 0x00000000006af8f5 in fetch_inferior_event (client_data=<optimized out>) at ../../gdb/infrun.c:3990
#15 0x000000000066f0fd in gdb_wait_for_event (block=block@entry=0) at ../../gdb/event-loop.c:859
#16 0x000000000066f237 in gdb_do_one_event () at ../../gdb/event-loop.c:322
#17 0x000000000066f386 in gdb_do_one_event () at ../../gdb/event-loop.c:353
#18 0x00000000007411bc in wait_sync_command_done () at ../../gdb/top.c:570
#19 0x0000000000741426 in maybe_wait_sync_command_done (was_sync=0) at ../../gdb/top.c:587
#20 execute_command (p=<optimized out>, p@entry=0x7fffffffe43a "start", from_tty=from_tty@entry=1) at ../../gdb/top.c:676
#21 0x00000000006c2048 in catch_command_errors (command=0x741200 <execute_command(char*, int)>, arg=0x7fffffffe43a "start", from_tty=1) at ../../gdb/main.c:376
#22 0x00000000006c2b60 in captured_main_1 (context=0x7fffffffde70) at ../../gdb/main.c:1119
#23 captured_main (data=0x7fffffffde70) at ../../gdb/main.c:1140
#24 gdb_main (args=args@entry=0x7fffffffdf90) at ../../gdb/main.c:1158
#25 0x0000000000408cf5 in main (argc=<optimized out>, argv=<optimized out>) at ../../gdb/gdb.c:32
(gdb) f 1
#1 0x000000000059fa47 in tui_restore_gdbout (ui=0x22997b0) at ../../gdb/tui/tui-regs.c:714
714 delete gdb_stdout;
--
Edjunior
next prev parent reply other threads:[~2017-02-27 19:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 0:30 [PATCH v4 0/2] Eliminate cleanups & make ui_file a C++ " Pedro Alves
2017-02-01 0:30 ` [PATCH v4 1/2] Add back gdb_pretty_print_insn Pedro Alves
2017-02-01 17:01 ` Luis Machado
2017-02-01 18:10 ` Simon Marchi
2017-02-01 18:26 ` Simon Marchi
2017-02-02 0:00 ` Pedro Alves
2017-02-01 20:02 ` Pedro Alves
2017-02-01 20:31 ` Pedro Alves
2017-02-01 23:50 ` Pedro Alves
2017-02-02 1:20 ` Simon Marchi
2017-02-02 11:37 ` [pushed] Reuse buffers across gdb_pretty_print_insn calls (Re: [PATCH v4 1/2] Add back gdb_pretty_print_insn) Pedro Alves
2017-02-01 0:31 ` [PATCH v4 2/2] Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy Pedro Alves
2017-02-01 17:37 ` Luis Machado
2017-02-01 22:49 ` Pedro Alves
2017-02-01 23:24 ` Luis Machado
2017-02-02 0:02 ` Pedro Alves
2017-02-27 19:43 ` Edjunior Barbosa Machado [this message]
2017-03-07 14:02 ` Pedro Alves
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=09bae426-d169-6300-0850-eb5d3d87da25@linux.vnet.ibm.com \
--to=emachado@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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).