Age | Commit message (Collapse) | Author | Files | Lines |
|
This fixes remaking of these files and avoids unnecessary rebuilds.
Also add both to `make clean` to match other stamp files.
|
|
gdb/ChangeLog
2021-06-15 Carl Love <cel@us.ibm.com>
* testsuite/gdb.arch/vsx-regs.exp (gdb_test_no_output): Fix typo
in set \$vs$i.v2_double.
|
|
binutils * readelf.c (get_note_type): Add support for NT_GO_BUILDID.
include * elf/common.h (NT_GO_BUILDID): Define.
|
|
The testsuite uses the output to determine whether BFD64 is in effect.
--x32 is supported for ELF only; don't advertise it for PE/COFF. --64 is
also supported for Mach-O; advertise it. Adjust the testsuite's BFD64
check accordingly.
Also replace "code" by "object", since it's the object format that the
options primarily control. It's also _initial_ code bitness, but this
can be changed by directives.
|
|
First of all eliminate the disp{16,32,32s} static variables, which are
used solely for setting a temporary variable in build_modrm_byte(). The
effect there can be had without use of such a temporary and without
operand_type_or(), by just setting the single bit each that needs
setting.
Then use operand_type_and_not(..., anydisp) when all dispNN bits want
clearing together.
|
|
Applying a mask with all bits set (or its inverse, with hence all bits
clear) won't alter the result (or won't trigger the warning). Re-arrange
the code to eliminate two more of the somewhat odd (2 << width_minus_1)
constructs.
|
|
Certain disp values may trigger "... shortened to ..." warnings when
equivalent imm ones don't. In some of the cases there are also
differences (for non-64-bit code) between BFD64 and !BFD64 builds. The
resulting encodings (i.e. use [or not] of the shorter disp8 / imm8
forms) are also different in some cases. Make this handling consistent.
Note that using equivalent 16-bit mode displacements / immediates
continues to expose entirely different behavior (see the disp-imm-16
testcase added by an earlier patch). This may want to be the subject of
further changes, but it'll then quickly become obvious that e.g. keying
use of extend_to_32bit_address() to non-64-bit mode isn't appropriate
either: Once we allow wrapping operands, we would better do so
consistently, in which case all of this would need to become dependent
upon address or operand size instead of mode.
|
|
In case there is something which gets shortened (perhaps only on a BFD64
build targeting a 32-bit binary), seeing the full original value is
often helpful to understand what's actually going wrong. Of course for
non-64-bit binaries we better wouldn't be seeing such warnings at all,
as they're often indicative of a behavioral difference between BFD64 and
!BFD64 builds.
Prior to "gas: drop sprint_value()", which introduced the use of
bfd_sprintf_vma(), the output had other shortcomings.
|
|
Just like e.g. 0x10000 triggers a warning for size 2, -0x10000 ought to
as well.
Note that some of the encodings produced aren't ones one would expect,
and hence the generated code is not being checked for in the new
testcases.
|
|
The description of e68c3d59acd0 ("x86: better respect quotes in
parse_operands()") wrongly states:
"In i386_att_operand(), which needs adjustment to remain in sync, besides
respecting double quotes now, also change the logic such that we don't
count parentheses anymore: Finding any opening or closing parenthesis or
any double quote means we're done, because the subsequent parsing code
wouldn't accept (extra) instances of these anyway."
I didn't pay attention to the possibility of the scale factor being
specified as an expression, which may contain parentheses. Thanks to
Martin for pointing this out. Restore prior behavior or matching
parentheses (backwards), while giving the variable a more suitable name.
Note that this simple and immediate fix is not ging to be enough: This
expression could itself involve quoted symbols. However, to address this
backwards parsing needs to be done away with altogether here (such that
parentheses which are part of such a quoted symbol name can also
properly be accounted for), which is going to be a more intrusive
change.
|
|
I finally found time to teach readelf to identify PIEs in the file
header display and program header display. So in place of
"DYN (Shared object file)" which isn't completely true, show
"DYN (Position-Independent Executable file)".
It requires a little bit of untangling code in readelf due to
process_program_headers setting up dynamic_addr and dynamic_size,
needed to scan .dynamic for the DT_FLAGS_1 entry, and
process_program_headers itself wanting to display the file type in
some cases. At first I modified process_program_header using a
"probe" parameter similar to get_section_headers in order to inhibit
output, but decided it was cleaner to separate out
locate_dynamic_sections.
binutils/
* readelf.c (locate_dynamic_section, is_pie): New functions.
(get_file_type): Replace e_type parameter with filedata. Call
is_pie for ET_DYN. Update all callers.
(process_program_headers): Use local variables dynamic_addr and
dynamic_size, updating filedata on exit from function. Set
dynamic_size of 1 to indicate no dynamic section or segment.
Update tests of dynamic_size throughout.
* testsuite/binutils-all/x86-64/pr27708.dump: Update expected output.
ld/
* testsuite/ld-pie/vaddr-0.d: Update expected output.
gdb/
* testsuite/lib/gdb.exp (exec_is_pie): Match new PIE readelf output.
|
|
Now that all warnings are fixed in this port, enable -Werror by default.
|
|
This allows the caller to catch engine aborts if they want, and fixes
the warning about missing stdlib.h include by not using abort().
|
|
Add conditional logic around fcntl.h F_{G,S}ETFL usage to fix builds
on systems that don't have it (e.g. Windows). The code is only used
to save & restore limited terminal stdin state.
|
|
Add conditional logic around termios.h usage to fix builds on systems
that don't have it (e.g. Windows).
|
|
The common code already calls this, so no need to do so in arch dirs.
We leave the calls that disable -Werror. This will help unify the
configure scripts.
|
|
We only do the common code as automake simplifies the logic.
|
|
|
|
The current setting assumes that gnulib is only used by dirs
immediately under the source root. Trying to build it two or
more levels deep fails. Switch GNULIB_BUILDDIR to a relative
GNULIB_PARENT_DIR so that it can be used to construct both the
build & source paths.
|
|
Use procctl(2) with PROC_ASLR_CTL to disable address space
randomization in the current gdb process before forking a child
process for a new inferior when address space randomization is
disabled.
gdb/ChangeLog:
* configure.ac: Check for <sys/procctl.h>.
* config.in, configure: Regenerate.
* fbsd-nat.c: Include <sys/procctl.h> if present.
[PROC_ASLR_CTL] (maybe_disable_address_space_randomization): New.
(fbsd_nat_target::create_inferior)
(fbsd_nat_target::supports_disable_randomization): New.
* fbsd-nat.h (fbsd_nat_target::create_inferior)
(fbsd_nat_target::supports_disable_randomization): New.
|
|
This commit fixes a test coverage regression caused by:
commit b001de2320446ec803b4ee5e0b9710b025b84469
Author: Andrew Burgess <andrew.burgess@embecosm.com>
AuthorDate: Mon Nov 26 17:56:39 2018 +0000
Commit: Andrew Burgess <andrew.burgess@embecosm.com>
CommitDate: Wed Dec 12 17:33:52 2018 +0000
gdb: Update test pattern to deal with native-extended-gdbserver
While looking at a regression caused by a local patch I was working
on, I noticed this:
pre-prompt
(gdb)
prompt
PASS: gdb.base/annota1.exp: breakpoint info
PASS: gdb.base/annota1.exp: run until main breakpoint
run
post-prompt
Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/outputs/gdb.base/annota1/annota1
next
Note how above, we get the "run until main breakpoint" pass even
before "run" shows up in the log! The issue is that the test isn't
really testing anything, it always passes regardless of the gdb
output.
There are a few problems here, fixed by this commit:
- using {} to build the list for [join], when the strings we're
joining include variable names that must be expanded. Such list
need to be built with [list] instead.
- [join] joins strings with a space character by default. We need to
pass the empty string as second parameter so that it just concats
the strings.
- doing too much in a "-re" (calling procedures), which doesn't work
correctly. I've seen this before and never digged deeper into why.
Probably something to do with how gdb_test_multiple is implemented.
Regardless, easy and clear enough to build the pattern first into a
variable.
gdb/testsuite/ChangeLog:
yyyy-mm-dd Pedro Alves <pedro@palves.net>
* gdb.base/annota1.exp: Build list using [list] instead of {}.
Tell [join] to join with no character. Build expected pattern in
separate variable instead of in the -re expression directly.
Change-Id: Ib3c89290f0e9ae4a0a43422853fcd4a7a7e12b18
|
|
2021-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
* compile/compile.c: Include missing header signal.h.
|
|
If you look at the type used for implicit_const objects in binutils/dwarf.c,
you'll get sometimes bfd_signed_vma and sometimes dwarf_signed_vma.
They are the same on 64-bit hosts, but not on 32-bit hosts, and the latter
discrepancy, in particular in process_abbrev_set, is responsible for the
following error issued by objdump on some object files containing DWARF 5:
binutils/dwarf.c:1108: read LEB value is too large to store in destination
variable
binutis/
* dwarf.c (struct abbrev_attr): Change type of implicit_const.
(add_abbrev_attr): Likewise.
(process_abbrev_set): Likewise.
(display_debug_abbrev): Adjust to above change.
|
|
detection with musl libc, since it does not define these internal symbols.
This allows binutils to build with musl gettext rather than falling
back to the bundled version.
[0] https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=b67399b4
2021-06-13 Michael Forney <mforney@mforney.org>
config/ChangeLog:
* gettext.m4 (AM_GNU_GETTEXT): Skip checks for the internal
symbols _nl_msg_cat_cntr, _nl_domain_bindings, and
_nl_expand_alias, if __GNU_GETTEXT_SUPPORTED_REVISION is defined.
Backport of gettext serial 68 patch.
intl/ChangeLog:
* configure: Regenerate.
---
Thi
|
|
Simply use the available abstraction instead of, effectively, trying to
open-code it.
|
|
I've been repeatedly confused by, in particular, the .dc.a potable[]
entry being conditional. Grepping in gas/config/ reveals only very few
targets actually #define-ing it. But as of 7be1c4891a20 the symbol is
always defined, so #ifdef-s are pointless (and, as said, potentially
confusing).
Also adjust documentation to reflect this.
|
|
The common version.o we're building can be used for the ppc subdir,
so switch it over too.
|
|
This is the last unique setting that rx has in its config.h, so by
moving this to CPPFLAGS, we can drop its config.h entirely.
|
|
|
|
There are some functions that gnulib does not yet provide fallbacks
for, so start a common file of our own for holding existing stubs.
|
|
Since this file does not rely on any port-specific settings, move it
up to building as part of the common step so we only do it once in a
multibuild.
|
|
The common sim-profile option controls whether to keep track of
runtime execution (like cycle count), so switch the rx-specific
cycle-stats option over to that.
|
|
Now that gnulib provides this, assume it exists.
|
|
This BSDism was never accepted into standards, so replace it with the
portable void* type instead.
|
|
|
|
Currently, the sim-config module will abort if alignment settings
haven't been specified by the port's configure.ac. This is a bit
weird when we've allowed SIM_AC_OPTION_ALIGNMENT to seem like it's
optional to use. Thus everyone invokes it.
There are 4 alignment settings, but really only 2 matters: strict
and nonstrict. The "mixed" setting is just the default ("unset"),
and "forced" isn't used directly by anyone (it's available as a
runtime option for some ports).
The m4 macro has 2 args: the "wire" settings (which represents the
hardwired port behavior), and the default settings (which are used
if nothing else is specified). If none are specified, then the
build won't work (see above as if SIM_AC_OPTION_ALIGNMENT wasn't
called). If default settings are provided, then that is used, but
we allow the user to override at runtime. Otherwise, the "wire"
settings are used and user runtime options to change are ignored.
Most ports specify a default, or set the "wire" to nonstrict. A
few set "wire" to strict, but it's not clear that's necessary as
it doesn't make the code behavior, by default, any different. It
might make things a little faster, but we should provide the user
the choice of the compromises to make: force a specific mode at
compile time for faster runtime, or allow the choice at runtime.
More likely it seems like an oversight when these ports were
initially created, and/or copied & pasted from existing ports.
With all that backstory, let's get to what this commit does.
First kill off the idea of a compile-time default alignment and
set it to nonstrict in the common code. For any ports that want
strict alignment by default, that code is moved to sim_open while
initializing the sim. That means WITH_DEFAULT_ALIGNMENT can be
completely removed.
Moving the default alignment to the runtime also allows removal
of setting the "wire" settings at configure time. Which allows
removing of all arguments to SIM_AC_OPTION_ALIGNMENT and moving
that call to common code.
The macro logic can be reworked to not pass WITH_ALIGNMENT as -D
CPPFLAG and instead move it to config.h.
All of these taken together mean we can hoist the macro up to the
top level and share it among all sims so behavior is consistent
among all the ports.
|
|
Move these options up to the common dir so we only test & export
them once across all ports. The AC_INIT macro does a lot of the
heavy lifting already which allows further simplification.
|
|
Move these options up to the common dir so we only test & export
them once across all ports.
The ppc code needs a little extra care with its trace settings as
it's not exactly the same API as the common code. The other knobs
are the same though.
|
|
This follows existing organizational structure with one configure option
per m4 file, and will make it easier to move to the common configure dir.
|
|
|
|
Since ppc now shares a config.h with the top-level, move all of its
relevant settings up a level. The ppc port tests a lot more funcs,
but that's because its syscall emulation is a lot more complete.
We'll probably utilize some of these in the common code too.
|
|
gdb/remote.c:14541:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
if (current_inferior ()->in_initial_library_scan)
^
gdb/remote.c:14527:3: note: previous statement is here
if (remote == nullptr)
^
gdb/ChangeLog:
* remote.c (remote_new_objfile): Fix indentation.
|
|
The ppc port doesn't share a lot of the common logic, but there are
a few bits that bleed across. Have it use the common configure for
environment settings too to avoid duplicate define errors after the
recent unification with the other ports.
|
|
Move the --sim-enable-environment option up to the common dir so we
only test & export it once across all ports.
|
|
Move the --sim-enable-assert option up to the common dir so we only
test & export it once across all ports.
|
|
Move the various platform tests up a level to avoid duplication
across the ports. When building multiple versions, this speeds
things up a bit.
For now we move the obvious stuff up a level, but we don't turn
own the config.h entirely just yet -- we still have some tests
related to libraries that need consideration.
|
|
* readelf.c (process_file_header): Don't clear section_headers.
|
|
Fix commit 4de91c10cdd9, which cached the single section header read
to pick up file header extension fields. Also, testing e_shoff in
get_section_headers opened a hole for fuzzers where we'd end up with
segfaults due to non-zero e_shnum but NULL section_headers.
* readelf.c (get_section_headers): Don't test e_shoff here, leave
that to get_32bit_section_headers or get_64bit_section_headers.
(process_object): Throw away section header read to print file
header extension.
|
|
|
|
This ChangeLog entry is in the wrong file, fix that.
Change-Id: I43464e1bdb94d2f40d4c7dfaf425fc498851964c
|