• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/simark/test
RSS
Rev. Time Author
1037b4b users/simark/test 2020-02-23 12:23:42 Simon Marchi

test test 12 12

5df4cba 2020-02-23 10:37:18 Simon Marchi

gdb: update gnulib import

This is mostly to get this commit from gnulib:

e22cd2677a4b7beacbf30b93bb0559f7b89f96ce
Add ‘extern "C"’ to count-one-bits.h etc.

... which fixes this compilation problem I observed with clang++:

CXXLD gdb
arch/arm-get-next-pcs.o:arm-get-next-pcs.c:function thumb_get_next_pcs_raw(arm_get_next_pcs*): error: undefined reference to 'count_one_bits(unsigned int)'
<more such undefined references>

I built-tested on GNU/Linux x86-64 (gcc-9 and clang-9) as well as with the
x86_64-w64-mingw32-gcc cross-compiler.

gnulib/ChangeLog:

* update-gnulib.sh (GNULIB_COMMIT_SHA1): Bump to
e22cd2677a4b7beacbf30b93bb0559f7b89f96ce.
* Makefile.in, config.in, configure, import/*: Re-generate.

7e70206 2020-02-23 09:01:37 GDB Administrator

Automatic date update in version.in

5707a07 2020-02-23 05:49:56 Tom Tromey

Make dwarf2_compile_expr_to_ax static

I noticed that dwarf2_compile_expr_to_ax can be static. Nothing
outside of loc.c calls it.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
* dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.

3b0fb49 2020-02-23 04:57:25 Tom Tromey

Fix cast in TUI_DISASM_WIN

I noticed that the TUI_DISASM_WIN macro cast the disassembly window to
a base type, rather than its correct type. This patch fixes this
oversight.

2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.

Change-Id: Ied3dbac9ef3dc48ceb9e0850fe4ada3c316dd769


283be8b 2020-02-23 04:57:25 Tom Tromey

Add "usage" text to all TUI command help

This adds "usage" text to the help for all all the TUI commands. In
some cases the usage is borderline, but I tend to think being complete
is preferable.

2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-win.c (_initialize_tui_win): Add usage text.
* tui/tui-stack.c (_initialize_tui_stack): Add usage text.
* tui/tui-regs.c (_initialize_tui_regs): Add usage text.
* tui/tui.c (_initialize_tui): Add usage text.

Change-Id: I727f7a7cfc03efa248ef98f30a18be393819e30b


ca793b9 2020-02-23 04:57:25 Tom Tromey

Use error_no_arg in TUI

This changes a couple of TUI commands to use error_no_arg. The
commands are also simplified a bit, and changed to use other gdb CLI
utility functions like skip_to_space. This lets us removes a couple
of defines that don't interact properly with gettext.

2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-win.c (tui_set_focus_command)
(tui_set_win_height_command): Use error_no_arg.
(_initialize_tui_win): Update help text.
(FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.

Change-Id: I2bf95c2e5cfe1472d068388fa39f0cf07591b76c


432b5c4 2020-02-23 04:57:25 Tom Tromey

Make some tui_source_window_base members "protected"

This renames a few members of tui_source_window_base, and makes them
"protected".

2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-layout.c (extract_display_start_addr): Rewrite.
* tui/tui-disasm.h (struct tui_disasm_window)
<display_start_addr>: Declare.
* tui/tui-source.h (struct tui_source_window)
<display_start_addr>: Declare.
* tui/tui-winsource.h (struct tui_source_window_base)
<show_source_line, display_start_addr>: New methods.
<m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
Rename and move to protected section.
* tui/tui-winsource.c (tui_source_window_base::update_source_window)
(tui_source_window_base::do_erase_source_content): Update.
(tui_source_window_base::show_source_line): Now a method.
(tui_source_window_base::show_source_content)
(tui_source_window_base::tui_source_window_base)
(tui_source_window_base::rerender)
(tui_source_window_base::refill)
(tui_source_window_base::do_scroll_horizontal)
(tui_source_window_base::set_is_exec_point_at)
(tui_source_window_base::update_breakpoint_info)
(tui_source_window_base::update_exec_info): Update.
* tui/tui-source.c (tui_source_window::set_contents)
(tui_source_window::showing_source_p)
(tui_source_window::do_scroll_vertical)
(tui_source_window::location_matches_p)
(tui_source_window::line_is_displayed): Update.
(tui_source_window::display_start_addr): New method.
* tui/tui-disasm.c (tui_disasm_window::set_contents)
(tui_disasm_window::do_scroll_vertical)
(tui_disasm_window::location_matches_p): Update.
(tui_disasm_window::display_start_addr): New method.

Change-Id: I74d72b9da5f458664427db643a108634690c6e19


01b1af3 2020-02-23 04:57:25 Tom Tromey

Allow TUI windows in Python

This patch adds support for writing new TUI windows in Python.

2020-02-22 Tom Tromey <tom@tromey.com>

* NEWS: Add entry for gdb.register_window_type.
* tui/tui-layout.h (window_factory): New typedef.
(tui_register_window): Declare.
* tui/tui-layout.c (saved_tui_windows): New global.
(tui_apply_current_layout): Use it.
(tui_register_window): New function.
* python/python.c (do_start_initialization): Call
gdbpy_initialize_tui.
(python_GdbMethods): Add "register_window_type" function.
* python/python-internal.h (gdbpy_register_tui_window)
(gdbpy_initialize_tui): Declare.
* python/py-tui.c: New file.
* Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.

gdb/doc/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* python.texi (Python API): Add menu item.
(TUI Windows In Python): New node.

gdb/testsuite/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* gdb.python/tui-window.exp: New file.
* gdb.python/tui-window.py: New file.

Change-Id: I85fbfb923a1840450a00a7dce113a05d7f048baa

fc96d20 2020-02-23 03:48:39 Tom Tromey

Remove the TUI annotation hack

do_tui_putc has some code to remove annotations from gdb output. This
was added in 2001, see commit a198b876bbcb.

However, I think this code is not needed. It seems very unlikely to
enable both annotations and the TUI, and in any case I think this is
something that should not be supported.

So, this patch removes this code.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-io.c (do_tui_putc): Don't omit annotations.

Change-Id: I05728110365a362d37c9821df9c8779316100bb8

935c78c 2020-02-23 03:48:38 Tom Tromey

Remove tui_set_win_with_focus

I noticed that the TUI had two functions with similar names:
tui_set_win_focus_to and tui_set_win_with_focus.

However, one was just an implementation detail of the latter. So,
this patch removes tui_set_win_with_focus entirely, to avoid any
temptation to call it.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
* tui/tui-data.h (tui_set_win_with_focus): Don't declare.
* tui/tui-data.c (tui_set_win_with_focus): Remove.
(tui_set_win_focus_to): Move from tui-win.c.

Change-Id: Idffddab773436bdf80d55480906d76b292981ef2

0240c8f 2020-02-23 03:48:38 Tom Tromey

Change how TUI windows are instantiated

This adds a new global that maps from window names to window
constructor functions, and then changes tui_get_window_by_name and
validate_window_name to use it. This is another step toward
user-defined window types.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-layout.c (make_standard_window, get_locator_window): New
functions.
(known_window_types): New global.
(tui_get_window_by_name): Reimplement.
(initialize_known_windows): New function.
(validate_window_name): Rewrite.
(_initialize_tui_layout): Call initialize_known_windows.

Change-Id: I9037aac550299b9d945899220a30c2d3af9dd0de

fdb01f0 2020-02-23 03:48:37 Tom Tromey

TUI windows do not need to store their type

TUI windows no longer need to store their type -- there's only a
single spot that uses this information, and it can be changed to use
dynamic_cast. (It could be cleaned up even more, by using a virtual
method, but I haven't done so.) This patch removes the "type" field
from tui_gen_win_info, and this in turn allows removing a couple of
enumerator constants.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
Remove constants.
* tui/tui-winsource.h (struct tui_source_window_base)
<tui_source_window_base>: Remove parameter.
* tui/tui-winsource.c
(tui_source_window_base::tui_source_window_base): Remove
parameter.
(tui_source_window_base::refill): Update.
* tui/tui-stack.h (struct tui_locator_window)
<tui_locator_window>: Update.
* tui/tui-source.h (struct tui_source_window) <tui_source_window>:
Default the constructor.
* tui/tui-regs.h (struct tui_data_item_window)
<tui_data_item_window>: Default the constructor.
(struct tui_data_window) <tui_data_window>: Likewise.
* tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
Default the constructor.
* tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
Default the constructor.
<type>: Remove.
(struct tui_win_info) <tui_win_info>: Default the constructor.
* tui/tui-data.c (tui_win_info::tui_win_info): Remove.
* tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
Default the constructor.

Change-Id: I594cd07d2e0bba71ad594a6fb263904ce2febcd6

865a5ae 2020-02-23 03:48:37 Tom Tromey

Remove tui_delete_invisible_windows and tui_make_all_invisible

tui_delete_invisible_windows is only needed after applying a layout,
and tui_make_all_invisible is only needed before applying a layout.

This patch removes these functions, in favor of doing this management
directly in tui_apply_current_layout. This is needed so that the
lifetimes of non-built-in windows will be properly managed.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
* tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
* tui/tui-win.c (tui_resize_all): Don't call
tui_delete_invisible_windows.
* tui/tui-layout.c (tui_apply_current_layout): Delete windows when
done.
(tui_set_layout): Update.
(tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
* tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
* tui/tui-data.c (tui_delete_invisible_windows): Remove.

Change-Id: Ia3603b021dcb7ec31700a4a32640cd09b00b8f3b

e098d18 2020-02-23 03:48:36 Tom Tromey

Handle ambiguity in tui_partial_win_by_name

This changes tui_partial_win_by_name to correctly handle an ambiguous
name prefix. This will be important once the user can register new
window types.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
correctly.

Change-Id: I59aaacd697eeab649164183457ef722dae58d60d

eb9c887 2020-02-23 03:48:35 Tom Tromey

Reimplement tui_next_win and tui_prev_win

This reimplements tui_next_win and tui_prev_win. Now they account for
the possibility of windows not on tui_win_list.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.

Change-Id: Ifcd402f76fe0a16e0fe9275a185d550279c01660

7eed1a8 2020-02-23 03:48:34 Tom Tromey

Change TUI window iteration

This changes the TUI to track all the instantiated windows in a new
global vector. After this, iteration over TUI windows is done by
simply iterating over this vector.

This approach makes it simpler to define new window types. In
particular, a subsequent patch will add the ability to define a TUI
window from Python.

Note that this series will not remove tui_win_list. This will
continue to exist in parallel, only because it was simpler to leave
this alone. Perhaps it could still be removed in the future.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-winsource.h (struct tui_source_window_iterator)
<inner_iterator>: New etytypedef.
<tui_source_window_iterator>: Take "end" parameter.
<tui_source_window_iterator>: Take iterator.
<operator*, advance>: Update.
<m_iter>: Change type.
<m_end>: New field.
(struct tui_source_windows) <begin, end>: Update.
* tui/tui-layout.c (tui_windows): New global.
(tui_apply_current_layout): Clear tui_windows.
(tui_layout_window::apply): Update tui_windows.
* tui/tui-data.h (tui_windows): Declare.
(all_tui_windows): Now inline function.
(class tui_window_iterator, struct all_tui_windows): Remove.

Change-Id: I6ab77976d6326f427178f725434f8f82046e0bbf

7c043ba 2020-02-23 03:48:33 Tom Tromey

Add horizontal splitting to TUI layout

This changes the TUI layout engine to add horizontal splitting. Now,
windows can be side-by-side.

A horizontal split is defined using the "-horizontal" parameter to
"tui new-layout".

This also adds the first "winheight" test to the test suite. One open
question is whether we want a new "winwidth" command, now that
horizontal layouts are possible. This is easily done using the
generic layout code.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

PR tui/17850:
* tui/tui-win.c (tui_gen_win_info::max_width): New method.
* tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
"height" argument.
(class tui_layout_window) <get_sizes>: Likewise.
(class tui_layout_split) <tui_layout_split>: Add "vertical"
argument.
<get_sizes>: Add "height" argument.
<m_vertical>: New field.
* tui/tui-layout.c (tui_layout_split::clone): Update.
(tui_layout_split::get_sizes): Add "height" argument.
(tui_layout_split::adjust_size, tui_layout_split::apply): Update.
(tui_new_layout_command): Parse "-horizontal".
(_initialize_tui_layout): Update help string.
(tui_layout_split::specification): Add "-horizontal" when needed.
* tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
argument.
* tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
New methods.

gdb/doc/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

PR tui/17850:
* gdb.texinfo (TUI Commands): Document horizontal layouts.

gdb/testsuite/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

PR tui/17850:
* gdb.tui/new-layout.exp: Add horizontal layout and winheight
tests.

Change-Id: I38b35e504f34698578af86686be03c0fefd954ae

6bc5664 2020-02-23 03:48:33 Tom Tromey

Change return type of tui_layout_base::adjust_size

This changes tui_layout_base::adjust_size to return a new enum type.
I broke this out into a separate patch because it simplifies a
subsequent patch.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-layout.h (enum tui_adjust_result): New.
(class tui_layout_base) <adjust_size>: Return tui_adjust_result.
(class tui_layout_window) <adjust_size>: Return
tui_adjust_result. Rewrite.
(class tui_layout_split) <adjust_size>: Return tui_adjust_result.
* tui/tui-layout.c (tui_layout_split::adjust_size): Update.

Change-Id: I821b48ab06a9b9485875e147bd08a3bc46b900a0

c22fef7 2020-02-23 03:48:32 Tom Tromey

Allow TUI sub-layouts in "new-layout" command

The new TUI layout engine has support for "sub-layouts" -- this is a
layout that includes another layout as a child. A sub-layout is
treated as a unit when allocating space.

There's not a very strong reason to use sub-layouts currently. This
patch exists to introduce the idea, and to simplify the subsequent
patch that adds horizontal layouts -- where sub-layouts are needed.

Because this patch won't go in on its own, I chose to defer
documenting this change until the subsequent horizontal layout patch.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-layout.h (class tui_layout_split) <add_split>: Change
parameter and return types.
(class tui_layout_base) <specification>: Add "depth".
(class tui_layout_window) <specification>: Add "depth".
(class tui_layout_split) <specification>: Add "depth".
* tui/tui-layout.c (tui_layout_split::add_split): Change parameter
and return types.
(tui_new_layout_command): Parse sub-layouts.
(_initialize_tui_layout): Update help string.
(tui_layout_window::specification): Add "depth".
(add_layout_command): Update.

gdb/testsuite/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* gdb.tui/new-layout.exp: Add sub-layout tests.

Change-Id: Iddf52d067a552c168b8a67f29caf7ac86404b10c

ee325b6 2020-02-23 03:48:31 Tom Tromey

Add the "tui new-layout" command

This adds a new command, "tui new-layout". This command can be used
to define a new TUI window layout.

The command is used like:

(gdb) tui new-layout name src 1 regs 1 status 0 cmd 1

The first argument is the name of the layout. In this example, it is
"name", so the new layout could be seen by "layout name".

Subsequent arguments come in pairs, where the first item in a pair is
the name of a window, and the second item in a pair is the window's
weight. A weight is just an integer -- a window's allocated size is
proportional to the total of the weights given. So, in the above
example, all windows will have the same size (the status windows's
weight does not matter, because it has fixed height).

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* NEWS: Add "tui new-layout" item.
* tui/tui-layout.c (add_layout_command): Return cmd_list_element.
Add new-layout command to help text.
(validate_window_name): New function.
(tui_new_layout_command): New function.
(_initialize_tui_layout): Register "new-layout".
(tui_layout_window::specification): New method.
(tui_layout_window::specification): New method.
* tui/tui-layout.h (class tui_layout_base) <specification>: New
method.
(class tui_layout_window) <specification>: New method.
(class tui_layout_split) <specification>: New method.

gdb/doc/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* gdb.texinfo (TUI Overview): Mention user layouts.
(TUI Commands): Document "tui new-layout".

gdb/testsuite/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* gdb.tui/new-layout.exp: New file.

Change-Id: Id7c3ace20ab1e8924f8f4ad788f40210f58a5c05

416eb92 2020-02-23 03:48:30 Tom Tromey

Remove hard-coded TUI layouts

This changes the TUI so that the available layouts are no longer
completely hard-coded. "enum tui_layout_type" is removed, and then
all the fallout from this is fixed up.

This patch also reimplements the "layout" command to be a prefix
command. The concrete layouts are simply sub-commands now. This
provides completion and correct abbreviation behavior for free.

Finally, this also changes the name of the locator window to "status".
This matches the documentation and will be exposed to the user in a
subsequent patch.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui.c (tui_enable): Call tui_set_initial_layout.
* tui/tui-win.c (window_name_completer): Update comment.
* tui/tui-layout.h (class tui_layout_base) <replace_window>:
Declare method.
(class tui_layout_window) <replace_window>: Likewise.
(class tui_layout_split) <replace_window>: Likewise.
(tui_set_layout): Don't declare.
(tui_set_initial_layout): Declare function.
* tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
(asm_regs_layout): New globals.
(tui_current_layout, show_layout): Remove.
(tui_set_layout, tui_add_win_to_layout): Rewrite.
(find_layout, tui_apply_layout): New function.
(layout_completer): Remove.
(tui_next_layout): Reimplement.
(tui_next_layout_command): New function.
(tui_set_initial_layout, tui_prev_layout_command): New functions.
(tui_regs_layout): Reimplement.
(tui_regs_layout_command): New function.
(extract_display_start_addr): Rewrite.
(next_layout, prev_layout): Remove.
(tui_layout_window::replace_window): New method.
(tui_layout_split::replace_window): New method.
(destroy_layout): New function.
(layout_list): New global.
(add_layout_command): New function.
(initialize_layouts): Update.
(tui_layout_command): New function.
(_initialize_tui_layout): Install "layout" commands.
* tui/tui-data.h (enum tui_layout_type): Remove.
(tui_current_layout): Don't declare.

Change-Id: I9b5f7ab3ce838d6b340b8c373ef649a8e0a74b73

0dbc2fc 2020-02-23 03:48:29 Tom Tromey

Reimplement "tui reg" command

This reimplements the low-level layout function that is used by the
"tui reg" command. Now it simply calls into the existing "layout"
command, though this will be changed again in a subsequent patch. The
rationale for this patch is that it makes it simpler to remove
"enum tui_layout_type".

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-regs.c (tui_reg_layout): Remove.
(tui_reg_command): Use tui_regs_layout.
* tui/tui-layout.h (tui_reg_command): Declare.
* tui/tui-layout.c (tui_reg_command): New function.

Change-Id: I0ca6884e2967005e7d3fbf5f13a0ac8f9c3298cf

5afe342 2020-02-23 03:48:29 Tom Tromey

Reimplement TUI "C-x 1" binding

The TUI "C-x 1" key binding removes TUI windows, based on the current
layout. With user-defined layouts, this is no longer easy to do.

This patch changes "C-x 1" to simply delete windows, leaving just the
focus window, the locator, and the command window.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui.c (tui_rl_delete_other_windows): Call
tui_remove_some_windows.
* tui/tui-layout.h (class tui_layout_base) <remove_windows>:
Declare method.
(class tui_layout_window) <remove_windows>: New method.
(class tui_layout_split) <remove_windows>: Declare.
(tui_remove_some_windows): Declare.
* tui/tui-layout.c (tui_remove_some_windows): New function.
(tui_layout_split::remove_windows): New method.

Change-Id: If186f9c3f263913e963b965204481d1b4385c6d4

427326a 2020-02-23 03:48:28 Tom Tromey

Simplify TUI C-x 2 binding

The TUI "C-x 2" binding tries to switch to a different layout based on
the current layout. Once user-defined layouts are available, this
won't really make sense. I wasn't entirely sure how to handle this.

This patch changes the binding to simply cycle through the existing
layouts. I considered this a reasonable, though not ideal,
compromise.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
* tui/tui-layout.h (tui_next_layout): Declare.
* tui/tui-layout.c (tui_next_layout): New function.

Change-Id: Ic101f0e3831a4235a048b3090ef60f025f7449bb

3fe12b6 2020-02-23 03:48:28 Tom Tromey

Fix latent display bug in tui_data_window

tui_data_window creates new curses windows, but does not pass in
coordinates relative to the data window's origin. This means that the
data window could only ever be displayed as the topmost window in a
layout. This is not a currently problem, because all the existing
layouts do this; but a subsequent patch will add user-defined layouts,
which could do otherwise.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-regs.c (tui_data_window::display_registers_from): Use
correct coordinates.

Change-Id: I5101f2b2869557b87381ebdeebd9b7fd28687831

59b8b5d 2020-02-23 03:48:27 Tom Tromey

Simplify tui_add_win_to_layout

tui_add_win_to_layout is only ever called for the source or assembly
windows. This simplifies the function by removing the DATA_WIN case.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-layout.h (tui_add_win_to_layout): Add comment.
* tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
DATA_WIN case.

Change-Id: Idfca902c6c90153acc5d19af4c33aa74bc3caf31

2a3d458 2020-02-23 03:48:27 Tom Tromey

Use TUI_DISASM_WIN instead of tui_win_list array

This is a minor cleanup to change tui_get_low_disassembly_address to
use TUI_DISASM_WIN, rather than the tui_win_list array. This is more
in line with what the rest of the TUI code does.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* tui/tui-disasm.c (tui_get_low_disassembly_address): Use
TUI_DISASM_WIN, not tui_win_list.

Change-Id: I999335ee3f63a4b570e84f320236b78f2bd5b780

3f0cbb0 2020-02-23 02:12:52 Tom Tromey

Style field names in "print"

This changes gdb to use the "variable" style when printing field
names. I've added new tests for C and Rust, but not other languages.

I chose "variable" because that seemed most straightforward. However,
another option would be to introduce a new "field" style. Similarly,
this patch uses the variable style for enumerator constants -- but
again, a new style could be used if that's preferred.

gdb/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* valprint.c (generic_val_print_enum_1)
(val_print_type_code_flags): Style member names.
* rust-lang.c (val_print_struct, rust_print_enum)
(rust_print_struct_def, rust_internal_print_type): Style member
names.
* p-valprint.c (pascal_object_print_value_fields): Style member
names. Only call fprintf_symbol_filtered for static members.
* m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
* f-valprint.c (f_val_print): Style member names.
* f-typeprint.c (f_type_print_base): Style member names.
* cp-valprint.c (cp_print_value_fields): Style member names. Only
call fprintf_symbol_filtered for static members.
(cp_print_class_member): Style member names.
* c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
member names.
* ada-valprint.c (ada_print_scalar): Style enum names.
(ada_val_print_enum): Likewise.
* ada-typeprint.c (print_enum_type): Style enum names.

gdb/testsuite/ChangeLog
2020-02-22 Tom Tromey <tom@tromey.com>

* gdb.rust/rust-style.rs: New file.
* gdb.rust/rust-style.exp: New file.
* gdb.base/style.exp: Test structure printing.
* gdb.base/style.c (struct some_struct): New type.
(enum etype): New type.
(struct_value): New global.

Change-Id: I070e1293c6cc830c9ea916af8243410aa384e944

7b3c271 2020-02-22 11:23:52 Alan Modra

PR25585, PHDR segment not covered by LOAD segment

I closed this bug as invalid, but I think it is worth mentioning in NEWS
that older linkers didn't check PT_PHDR very well. The patch also allows
people to force an output file with --noinhibit-exec after the error.

bfd/
PR 25585
* elf.c (assign_file_positions_for_load_sections): Continue linking
on "PHDR segment not covered by LOAD segment" errors.
ld/
PR 25585
* NEWS: Mention better "PHDR segment not covered by LOAD segment"
checking.