diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-06 15:52:13 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-15 12:29:28 -0600 |
commit | 002f15c27779e154856fdf281360385f4d3be671 (patch) | |
tree | f0db85371f7c826f4c2ab54b0d19da9358379f9a /gdb/tui/tui-disasm.c | |
parent | c9033fe839e37a378ff86e614a7d6e939b94f6c9 (diff) | |
download | gdb-002f15c27779e154856fdf281360385f4d3be671.zip gdb-002f15c27779e154856fdf281360385f4d3be671.tar.gz gdb-002f15c27779e154856fdf281360385f4d3be671.tar.bz2 |
Remove tui_alloc_source_buffer
There is no longer any need for tui_alloc_source_buffer. The two
callers of this function immediately change the contents of the
window, undoing the work done by this function.
This required adding a move constructor to tui_source_element -- a
mildly surprising find, but without this, resizing the vector will
cause crashes. This issue was masked earlier because
tui_alloc_source_buffer handled this.
Note that a patch for this bug was submitted here:
https://sourceware.org/ml/gdb-patches/2019-08/msg00094.html
That patch is better, IMO, but the author as yet hasn't responded to a
request for a ChangeLog entry.
gdb/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (tui_alloc_source_buffer): Don't declare.
(struct tui_source_element): Add DISABLE_COPY_AND_ASSIGN, and move
constructor.
* tui/tui-winsource.c (tui_alloc_source_buffer): Remove.
* tui/tui-source.c (tui_set_source_content): Update.
* tui/tui-disasm.c (tui_set_disassem_content): Update.
Diffstat (limited to 'gdb/tui/tui-disasm.c')
-rw-r--r-- | gdb/tui/tui-disasm.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index e55f35d..2394394 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -179,8 +179,6 @@ tui_set_disassem_content (tui_source_window_base *win_info, if (pc == 0) return TUI_FAILURE; - tui_alloc_source_buffer (win_info); - win_info->gdbarch = gdbarch; win_info->start_line_or_addr.loa = LOA_ADDRESS; win_info->start_line_or_addr.u.addr = pc; |