Discussion:
[Bug tui/9765] Scrolling to end of program in asm layout is broken
palves at redhat dot com
2015-07-02 13:14:50 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=9765

--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
Still happens with 7.9.50.20150630-cvs.
--
You are receiving this mail because:
You are on the CC list for the bug.
palves at redhat dot com
2016-08-09 20:57:04 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=9765

Pedro Alves <palves at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|palves at redhat dot com |unassigned at sourceware dot org
Target Milestone|6.8 |---

--- Comment #2 from Pedro Alves <palves at redhat dot com> ---
I'm not actually working on this.
--
You are receiving this mail because:
You are on the CC list for the bug.
anwilli5 at ncsu dot edu
2017-09-01 05:11:20 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=9765

anwilli5 at ncsu dot edu changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |anwilli5 at ncsu dot edu

--- Comment #3 from anwilli5 at ncsu dot edu ---
This happens for me as well (with gdb 8.0) except that gdb aborts with error
message "(gdb) terminate called after throwing an instance of
'gdb_exception_RETURN_MASK_ERROR'" instead of just getting into a bad state as
described by Pedro.
--
You are receiving this mail because:
You are on the CC list for the bug.
palves at redhat dot com
2017-09-01 12:13:26 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=9765

--- Comment #4 from Pedro Alves <palves at redhat dot com> ---
Sounds like we're letting C++ exceptions cross ncurses (in this case the memory
error exception). We can't, because it's a C library that may have not been
built with unwind info. [we had a similar problem with readline].
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-02 18:05:09 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=9765

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org

--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
Uncaught exception beneath tui_disassemble:


(top-gdb) bt
#0 0x00007f779fc219fb in raise () at /lib64/libc.so.6
#1 0x00007f779fc23800 in abort () at /lib64/libc.so.6
#2 0x00007f77a0269025 in __gnu_cxx::__verbose_terminate_handler() () at
/lib64/libstdc++.so.6
#3 0x00007f77a0266c16 in () at /lib64/libstdc++.so.6
#4 0x00007f77a0265b19 in () at /lib64/libstdc++.so.6
#5 0x00007f77a0266508 in __gxx_personality_v0 () at /lib64/libstdc++.so.6
#6 0x00007f779ffcfee3 in () at /lib64/libgcc_s.so.1
#7 0x00007f779ffd070e in _Unwind_Resume () at /lib64/libgcc_s.so.1
#8 0x000000000062269c in tui_disassemble(gdbarch*, tui_asm_line*, CORE_ADDR,
int) (gdbarch=0x3d6a2c0, asm_lines=0x7ffd7590cc68, pc=0x4009d2, count=32) at
../../binutils-gdb/gdb/tui/tui-disasm.c:57
#9 0x0000000000622aee in tui_set_disassem_content(gdbarch*, unsigned long)
(gdbarch=0x3d6a2c0, pc=0x4009c5) at ../../binutils-gdb/gdb/tui/tui-disasm.c:200
#10 0x00000000006359f8 in tui_update_source_window_as_is(tui_win_info*,
gdbarch*, symtab*, tui_line_or_address, int) (win_info=0x3d90ed0,
gdbarch=0x3d6a2c0, s=0x0, line_or_addr=..., noerror=0) at
../../binutils-gdb/gdb/tui/tui-winsource.c:98
#11 0x00000000006232e2 in tui_vertical_disassem_scroll(tui_scroll_direction,
int) (scroll_direction=FORWARD_SCROLL, num_to_scroll=35) at
../../binutils-gdb/gdb/tui/tui-disasm.c:396
#12 0x0000000000632d20 in tui_scroll_forward(tui_win_info*, int)
(win_to_scroll=0x3d90ed0, num_to_scroll=0) at
../../binutils-gdb/gdb/tui/tui-win.c:598
#13 0x0000000000621207 in tui_dispatch_ctrl_char(unsigned int) (ch=338) at
../../binutils-gdb/gdb/tui/tui-command.c:60
#14 0x000000000062bf5a in tui_getc(FILE*) (fp=0x7f779ffba8a0 <_IO_2_1_stdin_>)
at ../../binutils-gdb/gdb/tui/tui-io.c:883
#15 0x0000000000acb234 in rl_read_key () at
../../binutils-gdb/readline/input.c:479
#16 0x0000000000ab766d in readline_internal_char () at
../../binutils-gdb/readline/readline.c:517
#17 0x0000000000acb88d in rl_callback_read_char () at
../../binutils-gdb/readline/callback.c:201
#18 0x0000000000876552 in gdb_rl_callback_read_char_wrapper_noexcept() () at
../../binutils-gdb/gdb/event-top.c:175
#19 0x00000000008765ae in gdb_rl_callback_read_char_wrapper(gdb_client_data)
(client_data=0x3231840) at ../../binutils-gdb/gdb/event-top.c:192
#20 0x0000000000876c91 in stdin_event_handler(int, void*) (error=0,
client_data=0x3231840) at ../../binutils-gdb/gdb/event-top.c:511
#21 0x0000000000874df9 in handle_file_event(file_handler*, int)
(file_ptr=0x3bcad90, ready_mask=1) at ../../binutils-gdb/gdb/event-loop.c:733
#22 0x000000000087539c in gdb_wait_for_event(int) (block=1) at
../../binutils-gdb/gdb/event-loop.c:859
#23 0x0000000000874283 in gdb_do_one_event() () at
../../binutils-gdb/gdb/event-loop.c:347
#24 0x00000000008742bb in start_event_loop() () at
../../binutils-gdb/gdb/event-loop.c:371
#25 0x0000000000907d3e in captured_command_loop() () at
../../binutils-gdb/gdb/main.c:330
#26 0x0000000000909126 in captured_main(void*) (data=0x7ffd7590d4c0) at
../../binutils-gdb/gdb/main.c:1173
#27 0x00000000009091e2 in gdb_main(captured_main_args*) (args=0x7ffd7590d4c0)
at ../../binutils-gdb/gdb/main.c:1189
#28 0x0000000000418a6e in main(int, char**) (argc=5, argv=0x7ffd7590d5c8) at
../../binutils-gdb/gdb/gdb.c:32
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-02 23:47:39 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=9765

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
A simple fix makes this strange though.
You can scroll off the end and then the window is empty.
And if you try to scroll back, you can't.

tui_find_disassembly_address has logic to deal with this.
It seems like it must be disagreeing with tui_set_disassem_content
somehow.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-03 02:17:37 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=9765

--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Tom Tromey from comment #6)
Post by tromey at sourceware dot org
tui_find_disassembly_address has logic to deal with this.
It seems like it must be disagreeing with tui_set_disassem_content
somehow.
I was just misreading this.
When scrolling forward nothing special happens here.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-02 22:58:28 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=9765

--- Comment #8 from Tom Tromey <tromey at sourceware dot org> ---
I have a better patch now but I can also provoke a crash
by scrolling backward. In this situation the problem is
that it trips across unreadable memory.

Currently I made it "jump" back to memory that is readable;
but then you can't scroll forward again. Still looking into
it a bit.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-03 04:58:39 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=9765

--- Comment #9 from Tom Tromey <tromey at sourceware dot org> ---
Don't know what to do here. Also the code is weird.

Is it really that useful to scroll back before the start
of the current function?
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...