This is a followup on the following commit...
commit b4be1b0648
Date: Wed Mar 13 15:13:03 2019 -0400
Subject: Fix MI output for multi-location breakpoints
... which mistakenly added NEWS entries in the "in gdb-8.3" section,
rather than in the "since gdb-8.3" one.
gdb/ChangeLog:
* NEWS: Move entries about default MI version now being
version 3, and about the GDB/MI fix for multi-location
breakpoints to the "since GDB 8.3" section.
For the lui and auipc relaxations, since the symbol value of an undefined weak
symbol is always be zero, we can optimize the patterns into a single LI/MV/ADDI
instruction.
bfd/
* elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
(riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
Set undefined_weak field from it.
(relax_func_t): New parameter undefined_weak.
(_bfd_riscv_relax_call): New ignored parameter undefined_weak.
(_bfd_riscv_relax_tls_le): Likewise.
(_bfd_riscv_relax_align): Likewise.
(_bfd_riscv_relax_delete): Likewise.
(_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
(_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
reloc.
(_bfd_riscv_relax_section): New local undefined_weak. Set for
undef weak relocs that can be relaxed. Pass to relax_func call.
ld/
* testsuite/ld-riscv-elf/weakref32.s: Add relaxable undef weak code.
* testsuite/ld-riscv-elf/weakref64.s: Likewise.
* testsuite/ld-riscv-elf/weakref32.d: Updated.
* testsuite/ld-riscv-elf/weakref64.d: Updated.
The TUI window-related commands like "focus" are case insensitive.
This is not the norm in gdb, and I don't see a good reason to have it
here. This patch changes the TUI to be case sensitive, like the rest
of gdb.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* NEWS: Mention case-sensitivity of TUI commands.
* tui/tui-win.c (tui_set_focus_command): Now case-sensitive.
(tui_set_win_height_command, parse_scrolling_args): Likewise.
* tui/tui-layout.c (tui_layout_command): Now case-sensitive.
This changes a couple of spots in the TUI to use make_unique_xstrdup.
This simplifies the code slightly.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-source.c (tui_source_window::set_contents): Use
make_unique_xstrdup.
* tui/tui-disasm.c (tui_disasm_window::set_contents): Use
make_unique_xstrdup.
This removes various separator comments from the TUI. These aren't
used elsewhere in gdb, and they were incorrect in some cases as well.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-data.c: Remove separator comments.
* tui/tui-layout.c: Remove separator comments.
* tui/tui-win.c: Remove separator comments.
* tui/tui-wingeneral.c: Remove separator comments.
An earlier patch in the series removed the last call to strcat_to_buf,
so this patch removes the function entirely.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui.h (strcat_to_buf): Don't declare.
* tui/tui.c (strcat_to_buf): Remove.
This renames tui_source_window::fullname to add the "m_" prefix, as it
is a private data member.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-source.h (struct tui_source_window) <m_fullname>: Rename
from "fullname".
* tui/tui-source.c (tui_source_window::set_contents)
(tui_source_window::location_matches_p)
(tui_source_window::maybe_update): Update.
As Pedro suggested, this patch renames the private data members of
tui_data_window to use the "m_" prefix.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_window) <get_current_group>:
Update.
<m_regs_content, m_regs_column_count, m_current_group>: Add "m_"
prefix.
* tui/tui-regs.c (tui_data_window::last_regs_line_no)
(tui_data_window::line_from_reg_element_no)
(tui_data_window::first_reg_element_no_inline)
(tui_data_window::show_registers)
(tui_data_window::show_register_group)
(tui_data_window::display_registers_from)
(tui_data_window::display_registers_from_line)
(tui_data_window::first_data_item_displayed)
(tui_data_window::delete_data_content_windows)
(tui_data_window::erase_data_content)
(tui_data_window::do_scroll_vertical)
(tui_data_window::refresh_window)
(tui_data_window::check_register_values): Update.
This changes two members of tui_locator_window to have type
std::string. This removes a static limit.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (MAX_LOCATOR_ELEMENT_LEN): Remove define.
(struct tui_locator_window) <full_name, proc_name>: Now
std::string.
* tui/tui-stack.c (tui_locator_window::make_status_line)
(tui_locator_window::set_locator_fullname)
(tui_locator_window::set_locator_info): Update.
* tui/tui-source.c (tui_source_window::set_contents)
(tui_source_window::showing_source_p): Update.
Commit e594a5d1 ("Turn two locator functions into methods") turned
set_locator_fullname into a method on tui_locator_window. I missed it
at the time, but this change allows for the removal of a call to
tui_locator_win_info_ptr.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-stack.c (tui_locator_window::set_locator_fullname):
Don't call tui_locator_win_info_ptr.
There's no reason to call refresh in tui_resize_all. This call
flushes the curses window contents to the terminal -- but, because
we're about the resize all the windows, we're going to be sending more
data to the terminal momentarily. This patch removes the call.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-win.c (tui_resize_all): Don't call refresh.
The TUI has long had code to resize the locator, using 2 as the
height. However the code has "1" in a comment, like:
locator->resize (2 /* 1 */ ,
This patch fixes the resizing code to set the height to 1. Doing this
revealed what was probably the reason for setting the height to 2 in
the first place: this caused the locator window to scroll. However,
this is easily handled by calling scrollok on the locator window.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Use 1 as
height for locator.
* tui/tui-stack.c (tui_locator_window::rerender): Call scrollok.
* tui/tui-layout.c (show_source_disasm_command, show_data)
(show_source_or_disasm_and_command): Use 1 as height for locator.
This changes the "win_resized" global to be a bool and then updates
the uses.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui.c (tui_enable): Update.
* tui/tui-win.c (tui_sigwinch_handler, tui_async_resize_screen):
Update.
* tui/tui-data.h (tui_win_resized, tui_set_win_resized_to):
Update.
* tui/tui-data.c (win_resized): Now bool.
(tui_win_resized): Return bool.
(tui_set_win_resized_to): Accept a bool.
This changes tui_data_window::show_register_group to use "bool" rather
than "int".
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_window) <show_register_group>:
Change type of "refresh_values_only".
* tui/tui-regs.c (tui_data_window::show_register_group): Change
type of "refresh_values_only".
tui_source_window_base::show_source_content is not used outside the
class any more, so this makes it private. Examining the callers shows
that it can't be called without source contents, so it can be
simplified as well.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<show_source_content>: Now private.
* tui/tui-winsource.c
(tui_source_window_base::show_source_content): Don't handle empty
content case.
A couple of spots in tui-layout.c still call the show_source_content
method. However, now that re-rendering is done by the resize method,
these calls are no longer needed.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-layout.c (show_source_disasm_command)
(show_source_or_disasm_and_command): Don't call
show_source_content.
This changes tui_make_status_line to be a method on
tui_locator_window. This is a minor cleanup.
This also changes the new method to use the locator's width, rather
than the terminal width. This is important if we ever want to allow
windows to be made more narrow.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <make_status_line>:
Declare.
* tui/tui-stack.c (tui_locator_window::make_status_line): Rename
from tui_make_status_line.
(tui_locator_window::rerender): Update.
This changes tui_make_status_line to return std::string. This cleans
it up a bit, and removes some explicit memory management.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-stack.c (tui_make_status_line): Return std::string.
(tui_locator_window::rerender): Update.
The "fullname" field in tui_source_window_base is only used by one
subclass. This patch moves the field to that subclass, and changes it
to be a unique_xmalloc_ptr.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<~tui_source_window_base>: Don't declare.
<fullname>: Remove.
* tui/tui-winsource.c (~tui_source_window_base): Remove.
* tui/tui-source.h (struct tui_source_window) <fullname>: New
member.
* tui/tui-source.c (tui_source_window::set_contents): Update.
(tui_source_window::location_matches_p)
(tui_source_window::maybe_update): Update.
The calls to tui_clear_source_windows_detail in tui_add_win_to_layout
aren't needed, because (after the resize unification) resizing will
update the window contents. Removing these calls lets us remove
several other things as well.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-data.h (tui_clear_source_windows_detail): Don't
declare.
* tui/tui-layout.c (tui_add_win_to_layout): Don't call
tui_clear_source_windows_detail.
* tui/tui-winsource.h (struct tui_source_window_base)
<clear_detail>: Don't declare.
* tui/tui-winsource.c (tui_source_window_base::clear_detail):
Remove.
* tui/tui-data.c (tui_clear_source_windows_detail): Remove.
PR ada/24919 concerns a crash that Tom de Vries noticed when running
the "catch_ex" Ada test case. He sent a test executable and tracked
this down to commit f21c2bd7b7 ("Fix Fortran regression with variables
in nested functions").
Looking at that patch, you can see the obvious error:
- return 0;
+ return true;
Oops! This patch fixes the bug.
Tested on x86-64 Fedora 29.
gdb/ChangeLog
2019-09-20 Tom Tromey <tromey@adacore.com>
PR ada/24919:
* block.c (contained_in): Fix final return value.
This one exposed a bug in tic6x gas, found with inline function
parameter type checking. struct bfd_section and struct bfd_symbol
both have a flags field, so bfd_is_com_section (symbol) compiled OK
when bfd_is_com_section was a macro but didn't special case common
symbols.
bfd/
* bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
(bfd_section_lma, bfd_section_alignment, bfd_section_flags),
(bfd_section_userdata, bfd_is_com_section, discarded_section),
(bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
* bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
(bfd_section_list_remove, bfd_section_list_append),
(bfd_section_list_prepend, bfd_section_list_insert_after),
(bfd_section_list_insert_before, bfd_section_removed_from_list):
New inline functions.
* section.c (bfd_is_und_section, bfd_is_abs_section),
(bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
(bfd_section_list_append, bfd_section_list_prepend),
(bfd_section_list_insert_after, bfd_section_list_insert_before),
(bfd_section_removed_from_list): Delete macros.
(bfd_section_name, bfd_section_size, bfd_section_vma),
(bfd_section_lma, bfd_section_alignment, bfd_section_flags),
(bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
(bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
(discarded_section): New inline functions.
* bfd-in2.h: Regenerate.
gas/
* config/tc-tic6x.c (tc_gen_reloc): Correct common symbol check.
ld/
* emultempl/xtensaelf.em (xtensa_get_section_deps): Comment.
Use bfd_section_userdata.
(xtensa_set_section_deps): Use bfd_set_section_userdata.
* ldlang.c (lang_output_section_get): Use bfd_section_userdata.
(sort_def_symbol): Likewise, and bfd_set_section_userdata.
(init_os): Use bfd_set_section_userdata.
(print_all_symbols): Use bfd_section_userdata.
* ldlang.h (get_userdata): Delete.
Commit 21df382b91 ("x86: fold SReg{2,3}") went too far: Folding 64-bit
PUSH/POP templates into non-64-bit ones isn't correct, due to the
different operand widths, and hence suffixes permitted. Restore the
separate templates.
Add tests of PUSH/POP with q suffix and %fs/%gs operands to the
testsuite. While doing so also add PUSHF/POPF ones _without_ suffix.
lto_slim_object_ was unitialized. I also thought it worth adding
a sanity check on the .gnu.lto_.lto.* section size, and made some
other tidies.
PR 24768
* layout.cc (Layout::Layout): Init lto_slim_object_.
* object.cc (Sized_relobj_file::do_layout): Wrap overlong line.
Don't use C cast. Validate section size. Don't copy contents.
This patch corrects the set of dynamic relocations recognised by gold
as supported by glibc, and teaches ld.bfd to report an error similar
to the gold error. Note that ld --noinhibit-exec can be used to
produce an output, supporting older ld with newer glibc if the set of
supported glibc dynamic relocations changes.
bfd/
* elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
(ppc64_elf_relocate_section): Error if emitting unsupported
dynamic relocations.
gold/
* powerpc.cc (Target_powerpc::Scan::check_non_pic): Move REL24
to 32-bit supported.
The variable is defined in valops.c and has an extern decl in
eval.c; move it to the header file.
gdb/ChangeLog:
2019-09-19 Christian Biesinger <cbiesinger@google.com>
* eval.c: Move declaration of overload_resolution to...
* value.h: ...here.
Instead of having several extern declarations for arm_apcs_32
in a few .c files, declare it in arm-tdep.h. This file is already
included from these .c files.
gdb/ChangeLog:
2019-09-19 Christian Biesinger <cbiesinger@google.com>
* arm-linux-nat.c: Remove extern declaration for arm_apcs_32.
* arm-linux-tdep.c: Likewise.
* arm-nbsd-nat.c: Likewise.
* arm-tdep.h: Declare arm_apcs_32.
And remove the declaration from dwarf2loc.c, for better typesafety.
gdb/ChangeLog:
2019-09-19 Christian Biesinger <cbiesinger@google.com>
* dwarf2loc.c: Remove extern declaration of dwarf_always_disassemble.
* dwarf2read.h: Declare dwarf_always_disassemble.
If gdb_test is used with fewer than five arguments, then the question_string
defaults to "^FOOBAR$":
...
if [llength $args]==5 {
set question_string [lindex $args 3]
set response_string [lindex $args 4]
} else {
set question_string "^FOOBAR$"
}
...
This can however match "FOOBAR", so perhaps "\$FOOBAR^" would have been a
better choice.
Eliminate the FOOBAR pattern from gdb_test by instead of defining a default
regexp, conditionally appending the regexp matching to a user_code variable.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-09-19 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (gdb_test): Eliminate "^FOOBAR$" pattern.
Currently in source_cache::ensure we catch the exception that triggers when
highlighter->highlight is called:
...
try
{
std::istringstream input (contents);
std::ostringstream output;
highlighter->highlight (input, output, lang_name, fullname);
...
and the file used earlier in the construction of the highlighter:
...
highlighter = new srchilite::SourceHighlight ("esc.outlang");
...
is missing.
The fact that this exception triggers when highlighter->highlight is called is
an implementation artefact of libsource-highlight.so though, and this could be
different for older or newer versions.
Make things more robust by also catching exceptions thrown during construction
of the highlighter. This makes the handling on master equivalent with what
has been committed for 8.3.1.
Tested on x86_64-linux.
gdb/ChangeLog:
2019-09-19 Tom de Vries <tdevries@suse.de>
PR gdb/25009
* source-cache.c (source_cache::ensure): Catch exception thrown during
construction of the highlighter.
These NEWS entries had been missed when the instructions were added.
gas/ChangeLog:
2019-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
* NEWS: Add SVE2 and TME entries.
The newly added objdump -S tests check for source line mapping of a static
variable. But the test doesn't dump any data sections so this should never
pass.
This changes the test to dump all sections so the source mapping can be found.
binutils/ChangeLog:
* testsuite/binutils-all/objdump.exp (objdump -S): Update testcases.
In commit 81dc3ab594 "[gdb/testsuite] Handle unreachable network in
server-connect.exp" a regression was introduced in gdb_target_cmd, causing
ERRORs like this:
...
ERROR: tcl error sourcing src/gdb/testsuite/gdb.server/abspath.exp.
ERROR: wrong # args: should be "gdb_target_cmd {$args}"
while executing
"gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport"
...
Fix the argument passing in gdb_target_cmd.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-09-19 Tom de Vries <tdevries@suse.de>
* lib/gdbserver-support.exp (gdb_target_cmd): Fix argument passing.
When running gdb.server/server-connect.exp I run into:
...
FAIL: gdb.server/server-connect.exp: tcp6: connect to gdbserver using tcp6:::1
FAIL: gdb.server/server-connect.exp: tcp6-with-brackets: connect to gdbserver \
using tcp6:[::1]
FAIL: gdb.server/server-connect.exp: udp6: connect to gdbserver using udp6:::1
FAIL: gdb.server/server-connect.exp: udp6-with-brackets: connect to gdbserver \
using udp6:[::1]
...
The FAIL is caused by the fact that the ipv6 loopback address is not available:
...
PASS: gdb.server/server-connect.exp: tcp6: start gdbserver
target remote tcp6:::1:2347^M
A program is being debugged already. Kill it? (y or n) y^M
tcp6:::1:2347: Network is unreachable.^M
(gdb) FAIL: gdb.server/server-connect.exp: tcp6: connect to gdbserver using tcp6:::1
...
This should be marked UNSUPPORTED rather than FAIL.
Furthermore, the test-case takes about 4 minutes, because the 'Network is
unreachable' response is not explicitly handled in gdb_target_cmd, so instead
it runs into the timeout case.
Fix this by handling the 'Network is unreachable' response as UNSUPPORTED.
This reduces testing time from 4 minutes to about 2 seconds.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-09-19 Tom de Vries <tdevries@suse.de>
* lib/gdbserver-support.exp (gdb_target_cmd_ext): Return 2 (meaning
UNSUPPORTED) for 'Network is unreachable' message. Factor out of ...
(gdb_target_cmd): ... here.
* gdb.server/server-connect.exp: Use gdb_target_cmd_ext, handle return
value 2.
... to include PR breakpoints/24541 (for documentation purposes).
For the reader's convenience, the commit in question was the following:
commit 677052f2a5
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date: Thu May 16 16:23:24 2019 -0400
Subject: Make stap-probe.c:stap_parse_register_operand's "regname"
an std::string
Readline 8.0 has a feature that lets an application name a keymap.
This in turn makes it simpler for users to bind keys in keymaps in
their .inputrc.
This patch gives a name to the TUI SingleKey keymap, so that
additional bindings can be made there. For example:
$if gdb
set keymap SingleKey
"X": "echo hello\\n\n"
$endif
The call to rl_initialize, in tui_initialize_readline, had to be
removed so that .inputrc was not read too early. Note that Readline
explicitly documents that this call is not needed.
gdb/ChangeLog
2019-09-18 Tom Tromey <tom@tromey.com>
* NEWS: Add entry.
* tui/tui.c (tui_initialize_readline): Set name of keymap. Do not
call rl_initialize.
(tui_enable): Do not call rl_initialize.
gdb/doc/ChangeLog
2019-09-18 Tom Tromey <tom@tromey.com>
* gdb.texinfo (Editing): Document readline application name.
(TUI Single Key Mode): Document TUI SingleKey keymap name.
Fixes:
CXX alpha-linux-nat.o
alpha-linux-nat.c: In member function 'virtual CORE_ADDR alpha_linux_nat_target::register_u_offset(gdbarch*, int, int)':
alpha-linux-nat.c:93:16: error: 'gdbarch_pc_regnum' was not declared in this scope
if (regno == gdbarch_pc_regnum (gdbarch))
^~~~~~~~~~~~~~~~~
alpha-linux-nat.c:93:16: note: suggested alternative: 'gdbarch_info'
if (regno == gdbarch_pc_regnum (gdbarch))
^~~~~~~~~~~~~~~~~
gdbarch_info
alpha-linux-nat.c:97:15: error: 'gdbarch_fp0_regnum' was not declared in this scope
if (regno < gdbarch_fp0_regnum (gdbarch))
^~~~~~~~~~~~~~~~~~
alpha-linux-nat.c:97:15: note: suggested alternative: 'gdbarch_info'
if (regno < gdbarch_fp0_regnum (gdbarch))
^~~~~~~~~~~~~~~~~~
gdbarch_info
make[2]: *** [Makefile:1638: alpha-linux-nat.o] Error 1
make[2]: Leaving directory '/home/chris/tmp/binutils-gdb/gdb'
2019-09-12 Christian Groessler <chris@groessler.org>
* alpha-linux-nat.c: Include gdbarch.h.
Following the int -> bool conversion of boolean options (commit
491144b5e2 ("Change boolean options to bool instead of int")), I see
this ASAN error:
==357543==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55555b25d440 at pc 0x5555583ce9e1 bp 0x7fffffffd390 sp 0x7fffffffd380
READ of size 4 at 0x55555b25d440 thread T0
#0 0x5555583ce9e0 in term_cli_styling /home/simark/src/binutils-gdb/gdb/ui-file.c:111
#1 0x5555583cf8b0 in stdio_file::can_emit_style_escape() /home/simark/src/binutils-gdb/gdb/ui-file.c:308
#2 0x5555584450d2 in set_output_style /home/simark/src/binutils-gdb/gdb/utils.c:1442
#3 0x5555584491af in fprintf_styled(ui_file*, ui_file_style const&, char const*, ...) /home/simark/src/binutils-gdb/gdb/utils.c:2143
#4 0x5555582fa13c in print_gdb_version(ui_file*, bool) /home/simark/src/binutils-gdb/gdb/top.c:1339
#5 0x555557b723ab in captured_main_1 /home/simark/src/binutils-gdb/gdb/main.c:981
#6 0x555557b7353b in captured_main /home/simark/src/binutils-gdb/gdb/main.c:1172
#7 0x555557b735d0 in gdb_main(captured_main_args*) /home/simark/src/binutils-gdb/gdb/main.c:1197
#8 0x55555700a53d in main /home/simark/src/binutils-gdb/gdb/gdb.c:32
#9 0x7ffff64c9ee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)
#10 0x55555700a30d in _start (/home/simark/build/binutils-gdb/gdb/gdb+0x1ab630d)
0x55555b25d441 is located 0 bytes to the right of global variable 'cli_styling' defined in '/home/simark/src/binutils-gdb/gdb/cli/cli-style.c:31:6' (0x55555b25d440) of size 1
The reason of this is that we have this declaration of cli_styling in cli/cli-style.h:
extern bool cli_styling;
but ui-file.c uses its own local declaration:
extern int cli_styling;
Because of that, the code in ui-file.c thinks the variable is 4 bytes
long, when it is actually 1 byte long, so the generated code reads past
the variable.
Fix it by removing the declaration and making ui-file.c include
cli/cli-style.h.
gdb/ChangeLog:
* ui-file.c: Include cli/cli-style.h.
(term_cli_styling): Remove cli_styling declaration.
Give a test an actual name in order to avoid having a directory name
in the .sum file.
gdb/testsuite/ChangeLog:
* gdb.base/source-dir.exp: Avoid having directory names in test
names.