Age | Commit message (Collapse) | Author | Files | Lines |
|
This changes tui_data_item_window::content to be a unique_xmalloc_ptr
and fixes up the fallout. It also removes a parameter from
tui_expand_tabs, as it was only ever given one value.
This also removes some tab-handling code from
tui_data_window::display_registers_from. Because the content can only
be set by tui_register_format, and because that calls tui_expand_tabs,
it's not possible to see a tab here.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_item_window)
<~tui_data_item_window>: Remove.
<content>: Now a unique_xmalloc_ptr.
* tui/tui-regs.c (tui_register_format): Return a
unique_xmalloc_ptr.
(tui_get_register): Update.
(~tui_data_item_window): Remove.
(tui_data_window::display_registers_from, tui_display_register):
Update.
* tui/tui-io.h (tui_expand_tabs): Update.
* tui/tui-io.c (tui_expand_tabs): Return a unique_xmalloc_ptr.
Remove "col" parameter.
|
|
The field tui_data_item_window::value is not used, so remove it.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_item_window) <value>: Remove
field.
* tui/tui-regs.c (~tui_data_item_window): Update.
|
|
This moves a couple of functions earlier in tui-regs.c. Previously
they were in the "command" section of the file, but really they belong
in the "window implementation" section.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_register_format, tui_get_register): Move
earlier.
|
|
tui_reg_command has an unnecessary NULL check. The preceding call to
tui_reg_layout will ensure the window exists. This patch removes the
check.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_reg_command): Remove NULL check.
|
|
The TUI has a few #defines that hold user-visible strings. As these
are only used in a single spot, this patch removes the defines,
preferring direct use of the string where needed. Furthermore, now
the strings are wrapped in _(), which is friendlier for i18n purposes.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-source.h (struct tui_source_window): Update.
* tui/tui-regs.c (tui_show_registers): Update.
* tui/tui-disasm.h (struct tui_disasm_window): Update.
* tui/tui-data.h (NO_SRC_STRING, NO_DISASSEM_STRING)
(NO_REGS_STRING): Remove defines.
|
|
for ARM CPU additions.
|
|
Cortex-A77, Cortex-A76AE, Cortex-A34, Cortex-A65, and Cortex-A65AE.
Related specifications can be found at
https://developer.arm.com/ip-products/processors.
gas * NEWS: Mention the Arm and AArch64 new processors.
* config/tc-aarch64.c: New entries for Cortex-A34, Cortex-A65,
Cortex-A77, cortex-A65AE, and Cortex-A76AE.
* doc/c-aarch64.texi: Document new CPUs.
* testsuite/gas/aarch64/cpu-cortex-a34.d: New test.
* testsuite/gas/aarch64/cpu-cortex-a65.d: New test.
* testsuite/gas/aarch64/cpu-cortex-a65ae.d: New test.
* testsuite/gas/aarch64/cpu-cortex-a76ae.d: New test.
* testsuite/gas/aarch64/cpu-cortex-a77.d: New test.
* testsuite/gas/aarch64/nop-asm.s: New test.
bfd * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
Cortex-A77, cortex-A65AE, and Cortex-A76AE.
|
|
We currently use a padding NOP after a Thumb to Arm interworking veneer (BX pc).
The NOP is never executed but may result in a performance penalty on some cores.
For this reason this patch changes the NOPs after Thumb to Arm veneers into B .-2
and adds a note to this in the source code for future reference.
bfd/ChangeLog:
* elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
elf32_arm_stub_long_branch_v4t_thumb_thumb,
elf32_arm_stub_long_branch_v4t_thumb_arm,
elf32_arm_stub_short_branch_v4t_thumb_arm,
elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
previous instruction.
ld/ChangeLog:
* testsuite/ld-arm/cortex-a8-fix-b-plt.d: Update Testcase.
* testsuite/ld-arm/cortex-a8-fix-b-rel-arm.d: Likewise.
* testsuite/ld-arm/cortex-a8-fix-bcc-plt.d: Likewise.
* testsuite/ld-arm/farcall-cond-thumb-arm.d: Likewise.
* testsuite/ld-arm/farcall-mixed-app.d: Likewise.
* testsuite/ld-arm/farcall-mixed-app2.d: Likewise.
* testsuite/ld-arm/farcall-mixed-lib-v4t.d: Likewise.
* testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d: Likewise.
* testsuite/ld-arm/farcall-thumb-arm-short.d: Likewise.
* testsuite/ld-arm/farcall-thumb-arm.d: Likewise.
* testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise.
* testsuite/ld-arm/farcall-thumb-thumb.d: Likewise.
* testsuite/ld-arm/fix-arm1176-on.d: Likewise.
* testsuite/ld-arm/ifunc-10.dd: Likewise.
* testsuite/ld-arm/ifunc-2.dd: Likewise.
* testsuite/ld-arm/ifunc-4.dd: Likewise.
* testsuite/ld-arm/ifunc-6.dd: Likewise.
* testsuite/ld-arm/ifunc-8.dd: Likewise.
* testsuite/ld-arm/jump-reloc-veneers-long.d: Likewise.
* testsuite/ld-arm/mixed-app.d: Likewise.
* testsuite/ld-arm/thumb2-b-interwork.d: Likewise.
* testsuite/ld-arm/tls-longplt.d: Likewise.
* testsuite/ld-arm/tls-thumb1.d: Likewise.
|
|
When running a pascal test with the stabs target board:
...
$ test=gdb.pascal/case-insensitive-symbols.exp
$ cd build/gdb/testsuite
$ make check RUNTESTFLAGS="$test --target_board=stabs"
...
we get:
...
nr of untested testcases 1
nr of unsupported tests 1
...
due to:
...
Error: Illegal parameter: -gstabs+^M
Error: /usr/bin/ppcx64 returned an error exitcode^M
...
OTOH, when running the same pascal test without the stabs target board:
...
$ make check RUNTESTFLAGS="$test"
...
we get:
...
nr of expected passes 20
...
But when subsequently again running with the stabs target board:
...
$ make check RUNTESTFLAGS="$test --target_board=stabs"
...
we now get:
...
nr of expected passes 20
...
The problem is that gdb_compile_pascal determines success based on existence
of the exec after compilation:
...
if ![file exists $destfile] {
unsupported "Pascal compilation failed: $result"
return "Pascal compilation failed."
}
...
without removing the exec before compilation, which allows a stale exec to
make it seem as if compilation has succeeded.
Fix this by removing the stale exec before compilation.
gdb/testsuite/ChangeLog:
2019-08-20 Tom de Vries <tdevries@suse.de>
* lib/pascal.exp (gdb_compile_pascal): Remove $destfile before
compilation.
|
|
For remotes which do not support btrace at all, we can save several
round trips for each thread. This is especially significant when your
remote is a kernel with 100s or 1000s of threads and latency is
intercontinental.
Previously, with target, remote, and infrun debugging enabled, one
might see:
Sending packet: $Hg18aee#43...Ack
Packet received: OK
Sending packet: $Hg186f7#eb...Ack
Packet received: OK
remote:target_xfer_partial (24, , 0x805454000, 0x0, 0x0, 4096) = -1, 0
repeated for all non-exited threads.
Afterwards, if the remote does not specify 'qXfer:btrace-conf:read+'
in qSupported stub features, these unnecessary thread switches are
avoided.
gdb/ChangeLog:
* remote.c (remote_target::remote_btrace_maybe_reopen): Avoid
unnecessary thread walk if remote doesn't support the packet.
|
|
|
|
gas/
* config/tc-mips.c (fix_bad_misaligned_address): New function.
(fix_validate_branch): Call fix_bad_misaligned address_to
calculate the target address.
(md_apply_fix): Likewise.
(md_convert_frag): Update misaligned address calculation to
disregard ISA mode bit.
|
|
gas/
* config/tc-mips.c (mips_move_labels): Retain ISA mode bit
when moving labels in text segments.
(mips_align): Indicate text mode when aligning labels in
text segments.
* gas/testsuite/gas/mips/insn-isa-mode.d: New test.
* gas/testsuite/gas/mips/insn-isa-mode.s: New test source.
* gas/testsuite/gas/mips/mips.exp: Run the new test.
|
|
value_has_field had a mis-indented line. This fixes it.
gdb/ChangeLog
2019-08-19 Tom Tromey <tromey@adacore.com>
* python/py-value.c (value_has_field): Fix indentation.
|
|
Sergio pointed out that commit commit aa3b6533 ("Allow nested function
displays") regressed a few gdb.fortran tests. I was able to reproduce
these failures with gcc head.
The bug is that some spots calling contained_in will in fact do the
wrong thing if nested functions are considered as contained. In the
particular case of the Fortran regression, it was the call in
block_innermost_frame, being called from get_hosting_frame -- in this
case, the caller is specifically trying to avoid the nested case.
This patch fixes the problem by adding an "allow_nested" parameter to
contained_in, essentially reverting the change for most callers.
gdb/ChangeLog
2019-08-19 Tom Tromey <tromey@adacore.com>
* printcmd.c (do_one_display, info_display_command): Update.
* block.h (contained_in): Return bool. Add allow_nested
parameter.
* block.c (contained_in): Return bool. Add allow_nested
parameter.
|
|
Currently, no release of GNU Source Highlight supports Rust. However,
I've checked in a patch to do so there, and I plan to make a new
release sometime this summer.
This patch prepares gdb for that by adding support for Rust to the
source highlighting code.
Because Source Highlight will throw an exception if the language is
unrecognized, this also changes gdb to ignore exceptions here. This
will cause gdb to fall back to un-highlighted source text.
This updates gdb's configure script to reject the combination of
Source Highlight and -static-libstdc++. This is done because it's not
possible to use -static-libstdc++ and then catch exceptions from a
shared library.
Tested with the current and development versions of Source Highlight.
gdb/ChangeLog
2019-08-19 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Disallow the combination of -static-libstdc++ and
source highlight.
* source-cache.c (get_language_name): Handle rust.
(source_cache::get_source_lines): Ignore highlighting exceptions.
|
|
gdb should normally not be linked with -static-libstdc++. Currently
this has not caused problems, but it's incompatible with catching an
exception thrown from a shared library -- and a subsequent patch
changes gdb to do just this.
This patch adds a new --with-static-standard-libraries flag to the
top-level configure. It defaults to "auto", which means enabled if
gcc is being built, and disabled otherwise.
ChangeLog
2019-08-19 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Add --with-static-standard-libraries.
|
|
A customer reported a case where addr2line was very slow. We tracked
this down to some N^2 behavior in _bfd_dwarf2_find_symbol_bias in the
unusual case where no function can be found.
This patch fixes the bug, and reduces the runtime for a particular
request from 127 seconds to 1 second.
bfd/ChangeLog
2019-08-19 Tom Tromey <tromey@adacore.com>
* dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
holding symbols.
|
|
Given 32-bit pointers and a 64-bit bfd_size_type, it is relatively
easy to construct a value of augmentation_data_len (eg. 0x100000000)
that won't fail pointer checks but will print without bounds.
PR 24898
* dwarf.c (display_debug_frames): Use the read_cie check and error
for augmentation data length.
|
|
These are done in ppc64_elf_edit_toc, which now also garbage collects
unused GOT entries. The checks for legitimate instructions weren't
being done for the GOT relocs, unless the file also happened to have a
toc section.
* elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
to has_optrel.
(struct _ppc64_elf_section_data): Likewise.
(ppc64_elf_check_relocs): Set has_optrel for more relocs.
(ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
than TOC loop. Check PLT16 insns too.
|
|
The tests were failing due to md_atof trying to do word-wise endian
switching on the float16 (for little-endian targets sometimes
multi word values have their word order changed).
However since a float16 is only 1 word wide, it would end up writing
incorrect data, as you cannot switch the word order of just one word.
* config/tc-arm.c (md_atof): Add precision check. Formatting.
|
|
|
|
|
|
The actual args to this function are "pointers to pointers to
debug_info".
PR 24911
* dwarf.c (comp_addr_base): Dereference args.
|
|
|
|
When running gdb.base/compare-sections.exp with target board -fPIE/-pie, we
get:
...
FAIL: gdb.base/compare-sections.exp: after run to main: compare-sections -r
...
The test expects the read-only sections to have the same contents as in the
file:
...
# Assume startup code doesn't change read-only sections.
compare_sections "-r"
...
but that's not the case for PIE executables.
Fix this by allowing mismatched read-only sections for PIE executables.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-08-16 Tom de Vries <tdevries@suse.de>
* gdb.base/compare-sections.exp ("after run to main"): Allow
mismatched read-only sections for PIE executables.
|
|
commit 83924b3846361f2f76f9a6e7b5afa01c0eebbd4f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Feb 5 18:45:23 2019 -0800
x86-64: Restore PIC check for PCREL reloc against protected symbol
moved PIC check for PC-relative relocations to elf_x86_64_check_relocs.
Since linker defined symbols may not be processed at the time, we need
to move the check back to elf_x86_64_relocate_section.
bfd/
PR ld/24905
* elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
PC-relative relocations back to ...
(elf_x86_64_relocate_section): Here.
ld/
PR ld/24905
* testsuite/ld-x86-64/pr24905-x32.d: New file.
* testsuite/ld-x86-64/pr24905.d: Likewise.
* testsuite/ld-x86-64/pr24905.s: Likewise.
* testsuite/ld-x86-64/pr24905.t: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr24905 and pr24905-x32.
|
|
The TUI execution info window is unusual in that it is always linked
to a source or disassembly window. Even updates of its content are
handled by the source window, so it really has no life of its own.
This patch removes this window entirely and puts its functionality
directly into the source window. This simplifies the code somewhat.
This is a user-visible change, because now the box around the source
(or disassembly) window encloses the execution info as well. I
consider this an improvement as well, though.
Note that this patch caused ncurses to start emitting the "CSI Z"
sequence, so I've added this to the test suite terminal
implementation.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui.h (enum tui_win_type) <EXEC_INFO_WIN>: Remove.
* tui/tui-winsource.h (struct tui_exec_info_window): Remove.
(struct tui_source_window_base) <make_visible, refresh_window,
resize>: Remove methods.
<execution_info>: Remove field.
* tui/tui-winsource.c (tui_source_window_base::do_erase_source_content)
(tui_show_source_line, tui_source_window_base)
(~tui_source_window_base): Update.
(tui_source_window_base::resize)
(tui_source_window_base::make_visible)
(tui_source_window_base::refresh_window): Remove.
(tui_source_window_base::update_exec_info): Update.
* tui/tui-source.c (tui_source_window::set_contents): Update.
* tui/tui-disasm.c (tui_disasm_window::set_contents): Update.
gdb/testsuite/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* lib/tuiterm.exp (_csi_Z): New proc.
* gdb.tui/basic.exp: Update window positions.
* gdb.tui/empty.exp: Update window positions.
|
|
tui_remove_hooks clears deprecated_query_hook, but nothing in the TUI
ever sets it; so remove the assignment.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-hooks.c (tui_remove_hooks): Don't set
deprecated_query_hook.
|
|
This changes tui_show_symtab_source to be a method on
tui_source_window.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_update_source_windows_with_addr)
(tui_update_source_windows_with_line): Update.
* tui/tui-source.h (struct tui_source_window)
<show_symtab_source>: Declare.
(tui_show_symtab_source): Don't declare.
* tui/tui-source.c (tui_show_symtab_source): Rename from
tui_show_symtab_source.
|
|
This introduces the tui_source_window_base::set_contents method and
implements it in the subclasses. This removes a check of the window
type.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<set_contents>: Declare.
* tui/tui-winsource.c
(tui_source_window_base::update_source_window_as_is): Update.
* tui/tui-source.h (struct tui_source_window) <set_contents>:
Declare.
(tui_set_source_content): Don't declare.
* tui/tui-source.c (tui_source_window::set_contents): Rename from
tui_set_source_content.
* tui/tui-disasm.h (struct tui_disasm_window) <set_contents>:
Declare.
(tui_set_disassem_content): Don't declare.
* tui/tui-disasm.c (tui_disasm_window::set_contents): Rename from
tui_set_disassem_content.
|
|
This changes tui_update_breakpoint_info to be a method on
tui_source_window_base.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<update_breakpoint_info>: Declare.
(tui_update_breakpoint_info): Don't declare.
* tui/tui-winsource.c (tui_source_window_base::update_source_window_as_is)
(tui_update_all_breakpoint_info): Update.
(tui_source_window_base::update_breakpoint_info): Rename from
tui_update_breakpoint_info.
(tui_source_window_base::update_exec_info): Update.
|
|
This changes tui_update_source_window to be a method on
tui_source_window_base.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<update_source_window>: Declare.
(tui_update_source_window): Don't declare.
* tui/tui-winsource.c
(tui_source_window_base::update_source_window): Rename from
tui_update_source_window.
(tui_source_window_base::rerender): Update.
* tui/tui-source.c (tui_source_window::maybe_update): Update.
* tui/tui-disasm.c (tui_show_disassem)
(tui_show_disassem_and_update_source)
(tui_disasm_window::maybe_update): Update.
|
|
This changes tui_update_source_window_as_is to be a method on
tui_source_window_base.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<update_source_window_as_is>: Declare.
(tui_update_source_window_as_is): Don't declare.
* tui/tui-winsource.c (tui_update_source_window): Update
(tui_source_window_base::update_source_window_as_is): Rename from
tui_update_source_window_as_is.
(tui_source_window_base::refill): Update.
* tui/tui-source.c (tui_show_symtab_source): Update.
* tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical):
Update.
|
|
A few TUI functions take a "noerror" parameter. This is only checked
in one spot: in tui_set_source_content, if noerror is false, and if an
error occurs, then the function will call print_sys_errmsg.
This seems misguided to me, so this patch removes that code and this
parameter.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (tui_update_source_window)
(tui_update_source_window_as_is): Remove "noerror" parameter.
* tui/tui-winsource.c (tui_update_source_window)
(tui_update_source_window_as_is): Remove "noerror" parameter.
(tui_update_source_windows_with_addr)
(tui_update_source_windows_with_line)
(tui_source_window_base::rerender)
(tui_source_window_base::refill): Update.
* tui/tui-source.h (tui_set_source_content)
(tui_show_symtab_source): Remove "noerror" parameter.
* tui/tui-source.c (tui_set_source_content): Remove "noerror"
parameter.
(tui_show_symtab_source): Likewise.
(tui_source_window::maybe_update): Update.
* tui/tui-disasm.c (tui_show_disassem)
(tui_show_disassem_and_update_source)
(tui_disasm_window::do_scroll_vertical)
(tui_disasm_window::maybe_update): Update.
|
|
TUI windows keep track of their visibility in a boolean field.
However, this is not needed, because a window is visible if and only
if it has an underlying curses handle. So, we can remove this
separate field.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui.c (tui_is_window_visible): Update.
* tui/tui-wingeneral.c (tui_make_window)
(tui_gen_win_info::make_visible, tui_refresh_all): Update.
* tui/tui-win.c (window_name_completer, tui_refresh_all_win)
(tui_set_focus_command, tui_all_windows_info, update_tab_width)
(tui_set_win_height_command, parse_scrolling_args): Update.
* tui/tui-source.c (tui_source_window::style_changed): Update.
* tui/tui-regs.c (tui_show_registers)
(tui_data_window::first_data_item_displayed)
(tui_data_window::delete_data_content_windows)
(tui_check_register_values, tui_reg_command): Update.
* tui/tui-disasm.c (tui_show_disassem): Update.
* tui/tui-data.h (struct tui_gen_win_info) <is_visible>: New
method.
<is_visible>: Remove field.
* tui/tui-data.c (tui_next_win, tui_prev_win)
(tui_delete_invisible_windows): Update.
|
|
The previous patch removed the only use of m_has_locator, so this
member can now be removed.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<m_has_locator>: Remove.
* tui/tui-layout.c (show_source_disasm_command, show_data)
(show_source_or_disasm_and_command): Update.
|
|
2019-08-16 Martin Liska <mliska@suse.cz>
PR ld/24912
* elflink.c: Report error only for not relocatable.
* linker.c (_bfd_generic_link_add_one_symbol): Do not handle
here lto_slim_object as it's handled in caller.
2019-08-16 Martin Liska <mliska@suse.cz>
PR ld/24912
* object.cc (big_endian>::do_layout): Do not report error,
but only set a flag.
(big_endian>::do_add_symbols): Report error only for when
relocatable.
|
|
Add a new print_pc which prints both the PC and a new field addr_flags.
Call this wherever the PC is printed in stack.c.
Add a new gdbarch method get_pc_address_flags to obtain the addr_flag
contents. By default returns an empty string, on AArch64 this returns
PAC if the address has been masked in the frame.
Document this in the manual and NEWS file.
gdb/ChangeLog:
* NEWS (Other MI changes): New subsection.
* aarch64-tdep.c (aarch64_get_pc_address_flags): New function.
(aarch64_gdbarch_init): Add aarch64_get_pc_address_flags.
* arch-utils.c (default_get_pc_address_flags): New function.
* arch-utils.h (default_get_pc_address_flags): New declaration.
* gdbarch.sh: Add get_pc_address_flags.
* gdbarch.c: Regenerate.
* gdbarch.h: Likewise.
* stack.c (print_pc): New function.
(print_frame_info) (print_frame): Call print_pc.
gdb/doc/ChangeLog:
* gdb.texinfo (AArch64 Pointer Authentication)
(GDB/MI Breakpoint Information) (Frame Information): Document
addr_field.
|
|
2019-08-16 Christophe Lyon <christophe.lyon@linaro.org>
* emulparams/armelf.sh (OTHER_SECTIONS): Add support for noinit
section.
Change-Id: Ib293f28cc5f21e9e9a13abf4d4e37f0a0eec41c0
|
|
PR 24909
PR 23499
* readelf.c (get_symbol_version_string): Set sym_info earlier.
|
|
git commit 3e04d7655b introduced a bug by sizing output sections
earlier in ppc_before_allocation. That meant PLT (and GOT) sizes were
not included when calculating total executable section sizes.
* emultempl/ppc32elf.em (ppc_before_allocation): Force running
prelim_size_sections before deciding whether branch trampolines
might be needed.
|
|
Given R_PPC_ADDR32 or R_PPC_UADDR32 relocs, this patch generates
R_PPC_ADDR32 or R_PPC_UADDR32 dynamic relocs from either type
depending on whether r_offset is 4-byte aligned, and similarly for
R_PPC_ADDR16/R_PPC_UADDR16.
* elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
|
|
This patch fixes a paste-o that was introduced in commit
c8ad9b9a31aa3e6039567fc1f152dd454c946d5f. Previously the regexp for
the "examine 3 bytes backward from ${address_zero}" test correctly
matched 3 "${byte}" patterns, but in that commit the 6-byte regexp
from the previous test was mistakenly repeated here instead.
2019-08-15 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* gdb.base/examine-backward.exp: Correct regexp for
"examine 3 bytes backward from ${address_zero}".
|
|
|
|
When running gdb.base/compare-sections.exp with -fPIE/-pie, we get:
...
print /u *(unsigned char *) 0x00000238^M
Cannot access memory at address 0x238^M
(gdb) FAIL: gdb.base/compare-sections.exp: read-only: get value of read-only section
...
The problem is that that "maint info sections" prints an unrelocated address:
...
[0] 0x00000238->0x00000254 at 0x00000238: .interp ALLOC LOAD READONLY \
DATA HAS_CONTENTS
...
while the test expects a relocated address.
Given that the documentation states that the command displays "the section
information displayed by info files", and that info files shows relocated
addresses:
...
0x0000555555554238 - 0x0000555555554254 is .interp
...
fix this by showing relocated addresses for maint info sections as
well.
Build and tested on x86_64-linux.
gdb/ChangeLog:
2019-08-16 Tom de Vries <tdevries@suse.de>
* maint.c (maintenance_info_sections): Also handle !ALLOBJ case using
print_objfile_section_info.
|
|
The TUI currently has two different ways to resize a window: the
resize method, and the methods make_invisible_and_set_new_height and
make_visible_with_new_height.
There's no deep reason to have two different ways to resize a window,
so this patch unifies them, leaving just the "resize" method.
This also changes the locator to be handled more like an ordinary
window and less like an adjunct of the associated source window.
gdb/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* tui/tui-io.c (tui_puts_internal): Check TUI_CMD_WIN before
calling update_cmdwin_start_line.
* tui/tui-winsource.h (struct tui_source_window_base)
<do_make_visible_with_new_height, set_new_height>: Don't declare.
<rerender>: Declare.
* tui/tui-winsource.c (tui_source_window_base::update_tab_width):
Call rerender.
(tui_source_window_base::set_new_height): Remove.
(tui_source_window_base::rerender): Rename from
do_make_visible_with_new_height.
* tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Use
resize method.
(tui_win_info::make_invisible_and_set_new_height)
(tui_win_info::make_visible_with_new_height): Remove.
* tui/tui-stack.h (struct tui_locator_window) <rerender>:
Declare.
* tui/tui-stack.c (tui_locator_window::rerender): New method.
* tui/tui-regs.h (struct tui_data_window) <set_new_height,
do_make_visible_with_new_height>: Don't declare.
<rerender>: Declare.
* tui/tui-regs.c (tui_data_window::rerender): Rename from
set_new_height.
(tui_data_window::do_make_visible_with_new_height): Remove.
* tui/tui-layout.c (show_source_disasm_command, show_data): Don't
call tui_show_locator_content.
(tui_gen_win_info::resize): Call rerender.
(show_source_or_disasm_and_command): Don't call
tui_show_locator_content.
* tui/tui-data.h (struct tui_gen_win_info) <rerender>: New
method.
(struct tui_win_info) <rerender>: Declare.
<set_new_height, make_invisible_and_set_new_height,
make_visible_with_new_height>: Don't declare.
* tui/tui-data.c (tui_win_list::rerender): New method.
* tui/tui-command.h (struct tui_cmd_window)
<do_make_visible_with_new_height>: Don't declare.
* tui/tui-command.c
(tui_cmd_window::do_make_visible_with_new_height): Remove.
gdb/testsuite/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* gdb.tui/empty.exp: Enable resizing tests.
|
|
gnat encodes character enumeration literals using a few different
schemes. The gnat compiler documented the "QU" and "QW" encodings,
but failed to document that a simpler encoding was used for certain
characters.
This patch updates gdb to handle this simple Q encoding. Note that
wide character literals are still not handled.
gdb/ChangeLog
2019-08-15 Tom Tromey <tromey@adacore.com>
* ada-exp.y (convert_char_literal): Handle "Q%c" encoding.
* ada-lang.c (ada_enum_name): Likewise.
gdb/testsuite/ChangeLog
2019-08-15 Tom Tromey <tromey@adacore.com>
* gdb.ada/char_enum.exp: Add regression tests.
* gdb.ada/char_enum/foo.adb (Char_Enum_Type): Use '_'
and '0'.
(Char, Gchar): Update.
* gdb.ada/char_enum/pck.ads (Global_Enum_Type): Use '+'.
|
|
I could not tell if GdbSetPythonDirectory is internal or not because
I could not find any references to it, so I left it as-is.
Tested by running the testsuite on gdb.python/*.exp; everything still
passes.
2019-08-15 Christian Biesinger <cbiesinger@google.com>
* python/lib/gdb/__init__.py (GdbOutputFile): Rename to have a
leading underscore.
(GdbOutputErrorFile): Likewise.
(global scope): Adjust constructor calls to GdbOutput{,Error}File
accordingly.
(execute_unwinders): Rename to have a leading underscore.
(auto_load_packages): Likewise.
(global scope): Adjust call to auto_load_packages accordingly.
(GdbSetPythonDirectory): Likewise.
* python/py-unwind.c (pyuw_sniffer): Call _execute_unwinders
instead of execute_unwinders.
gdb/testsuite/ChangeLog:
2019-08-15 Christian Biesinger <cbiesinger@google.com>
* gdb.python/python.exp: Expect a leading underscore on
GdbOutput{,Error}File.
|
|
This fixes a problem originally reported at
https://github.com/riscv/riscv-binutils-gdb/issues/173
If you have code linked at address zero, you can have a lui instruction
loading a value 0x800 which gets relaxed to a c.lui which is valid (c.lui 0x1
followed by addi -0x800). Relaxation can reduce the value below 0x800 at which
point the c.lui 0x0 is no longer valid. We can fix this by converting the
c.lui to a c.li which can load 0.
bfd/
* elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
to c.li instruction, and use ENCODE_RVC_IMM to set value.
ld/
* testsuite/ld-riscv-elf/c-lui-2.d: New.
* testsuite/ld-riscv-elf/c-lui-2.ld: New.
* testsuite/ld-riscv-elf/c-lui-2.s: New.
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run the c-lui-2 test.
|