• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

標籤
無標籤

Frequently used words (click to add to your profile)

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

RSS
修訂. 時間 作者
b64dc19 2022-10-20 09:42:13 Tsukasa OI

binutils: Remove unused substitution PROGRAM

Unlike other substitution, this substitution of @PROGRAM@ was done in
binutils/Makefile and it was intended for binutils/cxxfilt.man. @PROGRAM@
in binutils/cxxfilt.man is removed in the commit 0285c67df190 ("Automate
generate on man pages") in 2001 and @PROGRAM@ is ineffective since then.

Because PROGRAM substitution does nothing, removing this manual
substitution should be completely safe.

binutils/ChangeLog:

* doc/local.mk: Remove unused substitution PROGRAM.
* Makefile.in: Regenerate.

f2db12c 2022-10-20 09:00:07 GDB Administrator

Automatic date update in version.in

a4f02dc 2022-10-20 08:15:42 Alan Modra

Obsolete beos

* config.bfd: Obsolete *-*-beos*. Simplify x86 beos match.

f967242 2022-10-20 08:15:42 Alan Modra

Regen ld/po/BLD-POTFILES.in

508ccf9 2022-10-20 00:41:47 Tom de Vries

[gdb] Fix assert in handle_jit_event

With the cc-with-tweaks.sh patch submitted here (
https://sourceware.org/pipermail/gdb-patches/2022-October/192586.html ) we run
with:
...
$ export STRIP_ARGS_STRIP_DEBUG=--strip-all
$ make check RUNTESTFLAGS="gdb.base/jit-reader.exp \
--target_board cc-with-gnu-debuglink"
...
into the following assert:
...
(gdb) run ^M
Starting program: jit-reader ^M
gdb/jit.c:1247: internal-error: jit_event_handler: \
Assertion `jiter->jiter_data != nullptr' failed.^M
...

Fix this by handling the
jit_bp_sym.objfile->separate_debug_objfile_backlink != nullptr case in
handle_jit_event.

Tested on x86_64-linux.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29277

f34652d 2022-10-19 23:32:36 Pedro Alves

internal_error: remove need to pass __FILE__/__LINE__

Currently, every internal_error call must be passed __FILE__/__LINE__
explicitly, like:

internal_error (__FILE__, __LINE__, "foo %d", var);

The need to pass in explicit __FILE__/__LINE__ is there probably
because the function predates widespread and portable variadic macros
availability. We can use variadic macros nowadays, and in fact, we
already use them in several places, including the related
gdb_assert_not_reached.

So this patch renames the internal_error function to something else,
and then reimplements internal_error as a variadic macro that expands
__FILE__/__LINE__ itself.

The result is that we now should call internal_error like so:

internal_error ("foo %d", var);

Likewise for internal_warning.

The patch adjusts all calls sites. 99% of the adjustments were done
with a perl/sed script.

The non-mechanical changes are in gdbsupport/errors.h,
gdbsupport/gdb_assert.h, and gdb/gdbarch.py.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
Change-Id: Ia6f372c11550ca876829e8fd85048f4502bdcf06

5c831a3 2022-10-19 23:09:12 Nick Clifton

Fix an illegal memory access when parsing an ELF file containing corrupt symbol version information.

PR 29699
* elf.c (_bfd_elf_slurp_version_tables): Fail if the sh_info field
of the section header is zero.

feab6ab 2022-10-19 22:32:22 Andrew Burgess

sim/iq2000: silence pointer-sign warnings

When building the iq2000 simulator I see a few warnings like this:

/tmp/build/sim/../../src/sim/iq2000/iq2000.c: In function ‘fetch_str’:
/tmp/build/sim/../../src/sim/iq2000/iq2000.c:50:54: error: pointer targets in passing argument 3 of ‘sim_read’ differ in signedness [-Werror=pointer-sign]
50 | sim_read (CPU_STATE (current_cpu), CPU2DATA(addr), buf, nr);
| ^~~
| |
| char *

I've silenced these warnings by casting buf to 'unsigned char *'.
With this change I now see no warnings when compiling iq2000.c, so
I've removed the line from Makefile.in that disables -Werror.

Makefile.in was also disabling -Werror when compiling mloop.c,
however, I'm not seeing any warnings when compiling that file, so I've
removed the -Werror disable in that case too.

d0a7ca8 2022-10-19 22:32:22 Andrew Burgess

sim/erc32: avoid dereferencing type-punned pointer warnings

When building the erc32 simulator I get a few warnings like this:

/tmp/build/sim/../../src/sim/erc32/exec.c:1377:21: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
1377 | sregs->fs[rd] = *((float32 *) & ddata[0]);
| ~^~~~~~~~~~~~~~~~~~~~~~~

The type of '& ddata[0]' will be 'uint32_t *', which is what triggers
the warning.

This commit makes use of memcpy when performing the type-punning,
which resolves the above warnings.

With this change, I now see no warnings when compiling exec.c, which
means that the line in Makefile.in that disables -Werror can be
removed.

There should be no change in behaviour after this commit.

e5961d2 2022-10-19 22:32:22 Andrew Burgess

sim/ppc: mark device_error function as ATTRIBUTE_NORETURN

The device_error function always ends up calling the error function,
which is itself marked as ATTRIBUTE_NORETURN, so it makes sense that
device_error should also be marked ATTRIBUTE_NORETURN.

Doing this resolves a few warnings from hw_ide.c about possibly
uninitialized variables - the variables are only uninitialized after
passing through a call to device_error, which obviously means the
variables are never really used uninitialized, the simulation will
terminate with the device_error call.

744875d 2022-10-19 22:32:22 Andrew Burgess

sim/ppc: fix warnings related to printf format strings

This commit is a follow on to:

commit 182421c9d2eea8c4877d983a2124e591f0aca710
Date: Tue Oct 11 15:02:08 2022 +0100

sim/ppc: fixes for arguments to printf style functions

where commit 182421c9d2ee addressed issues with printf format
arguments that were causing the compiler to give an error, this commit
addresses issues that caused the compiler to emit a warning.

This commit is mostly either changing the format string to match the
argument, or in some cases, excess, unused arguments are removed.

cb9d160 2022-10-19 22:32:21 Andrew Burgess

sim/cgen: mask uninitialized variable warning in cgen-run.c

I see an uninitialized variable warning (with gcc 9.3.1) from
cgen-run.c, like this:

/tmp/build/sim/../../src/sim/cris/../common/cgen-run.c: In function ‘sim_resume’:
/tmp/build/sim/../../src/sim/cris/../common/cgen-run.c:259:5: warning: ‘engine_fns$’ may be used uninitialized in this function [-Wmaybe-uninitialized]
259 | (* engine_fns[next_cpu_nr]) (cpu);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/build/sim/../../src/sim/cris/../common/cgen-run.c:232:14: note: ‘engine_fns$’ was declared here
232 | ENGINE_FN *engine_fns[MAX_NR_PROCESSORS];
| ^~~~~~~~~~

This is a false positive - we over allocate engine_fn, and then only
initialize the nr_cpus entries which we will later go on to use.

However, we can easily silence this warning by initializing the unused
entries in engine_fns to NULL, this might also help if anyone ever
looks at engine_fns in a debugger, it should now be obvious which
entries are in use, and which are not.

With this change the warning is gone.

There should be no change in behaviour with this commit.

2b06e59 2022-10-19 20:53:53 Alan Modra

Fix addr2line test for ppc64 elfv1 and mingw

* testsuite/binutils-all/addr2line.exp: Tidy. For powerpc64
arrange to pass --synthetic to nm, and extract .main and .fn
symbol address for addr2line test. Handle default executable
extension on cygwin/mingw compilers.

f2ba47d 2022-10-19 20:39:20 Nick Clifton

Update MAINTAINERS file with details about accepting DCO signed contributions.

* MAINTAINERS: Add section on patches, copyright and DCO.

5ac37f0 2022-10-19 20:15:08 Andrew Burgess

gdb/testsuite: avoid temporary file in gdb/testsuite (unittest.exp)

I spotted that the gdb.gdb/unittest.exp script causes a temporary file
inserters_extractors-2.txt to be created in build/gdb/testsuite/
instead of in build/gdb/testsuite/output/gdb.gdb/unittest/.

This is because some of the 'maint selftest' tests create temporary
files in GDB's current directory, specifically, the two source files:

gdb/unittests/basic_string_view/inserters/wchar_t/2.cc
gdb/unittests/basic_string_view/inserters/char/2.cc

both create a temporary file called inserters_extractors-2.txt, though
we only run the second of these as part of GDB's selftests.

I initially proposed just using GDB's 'cd' command in unittest.exp to
switch to the test output directory before running the selftests,
however, Pedro pointed out that there was a risk here that, if GDB
crashed during shutdown, the generated core file would be left in the
test output directory rather than in the testsuite directory. As a
result, our clever core file spotting logic would fail to spot the
core file and alert the user.

Instead, I propose this slightly more involved solution. I've added a
new with_gdb_cwd directory proc, used like this:

with_gdb_cwd $directory {
# Tests here...
}

The new proc temporarily switches to $directory and then runs the
tests within the block. After running the tests the previous current
working directory is restored.

Additionally, after switching back to the previous cwd, we check that
GDB is still responsive. This means that if GDB crashed immediately
prior to restoring the previous directory, and left the core file in
the wrong place, then the responsiveness check will fail, and a FAIL
will be emitted, this should be enough to alert the user that
something has gone wrong.

With this commit in place the unittest.exp script now leaves its
temporary file in the test output directory.

536ff91 2022-10-19 20:15:08 Andrew Burgess

gdb/testsuite: avoid creating files in gdb/testsuite directory

I spotted that the test gdb.dwarf2/dw2-using-debug-str.exp was
creating an output file called debug_str_section in the root
build/gdb/testsuite directory instead of using the
build/gdb/testsuite/output/gdb.dwarf2/dw2-using-debug-str/ directory.

This appears to be caused by a missing '$' character. We setup a
variable debug_str_section which contains a path within the output
directory, but then when we build the objcopy command we use
'debug_str_section' without a '$' prefix, as a result, we create the
debug_str_section file.

This commit adds the missing '$', the file is now created in the
output directory.

6d6ae7c 2022-10-19 20:12:37 Andrew Burgess

bfd: fix undefined references to aarch64_pe_le_vec

After commit:

commit c60b3806799abf1d7f6cf5108a1b0e733a950b13
Date: Wed Oct 19 10:57:12 2022 +0200

aarch64-pe support for LD, GAS and BFD

It appears that bfd/Makefile.in and bfd/configure were not regenerated
correctly. The differences in the configure file are only whitespace,
but in Makefile.in a critical reference to pe-aarch64.lo was missing.

c60b380 2022-10-19 17:57:12 Jedidiah Thompson

aarch64-pe support for LD, GAS and BFD

Allows aarch64-pe to be targeted natively, not having to use objcopy to convert it from ELF to PE.
Based on initial work by Jedidiah Thompson

Co-authored-by: Jedidiah Thompson <wej22007@outlook.com>
Co-authored-by: Zac Walker <zac.walker@linaro.org>

740a19d 2022-10-19 16:05:23 rupesh potharla

Binutils: Adding new testcase for addr2line.

* binutils/testsuite/config/default.exp: Set ADDR2LINE and ADDR2LINEFLAGS.
* binutils/testsuite/binutils-all/addr2line.exp: New file.

a16c969 2022-10-19 16:04:12 Tom de Vries

[gdb/testsuite] Fix ERROR in gdb.python/py-breakpoint.exp

With test-case gdb.python/py-breakpoint.exp I run into:
...
(gdb) ERROR: tcl error sourcing gdb.python/py-breakpoint.exp.
ERROR: can't read "skip_hw_watchpoint_tests_p": no such variable
while executing
"if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}"
...

Fix this by adding the missing "global skip_hw_watchpoint_tests_p" in two
procs.

Tested on x86_64-linux.

906f69c 2022-10-19 16:03:17 Andreas Krebbel

IBM zSystems: Issue error for *DBL relocs on misaligned symbols

Relocs like PC32DBL require a right shift of the symbol value. There
is no situation where dropping symbol value bits with the right shift
is a good thing. Hence we now issue an error to detect such problems.

9454c9c 2022-10-19 11:11:49 Simon Marchi

gdb: check for groups with duplicate names in reggroups:add

In the downstream ROCm GDB port, we would create multiple register
groups with duplicate names. While it did not really hurt, it certainly
wasn't the intent. And I don't think it ever makes sense to do so.

To catch these, change the assert in reggroups::add to check for
duplicate names. It's no longer necessary to check for duplicate
reggroup pointers, because adding the same group twice would be caught
by the duplicate name check.

Change-Id: Id216a58acf91f1b314d3cba2d02de73656f8851d
Approved-By: Tom Tromey <tom@tromey.com>

fd320c4 2022-10-19 09:00:07 GDB Administrator

Automatic date update in version.in

152cc35 2022-10-19 02:47:29 H.J. Lu

x86: Disable AVX-VNNI when disabling AVX2

Since AVX-VNNI requires AVX2, disable AVX-VNNI when disabling AVX2.

* i386-gen.c (cpu_flag_init): Add CpuAVX_VNNI to
CPU_ANY_AVX2_FLAGS.
* i386-init.h: Regenerate.

04ea6b6 2022-10-19 01:31:36 Tom Tromey

Remove dead code from py-finishbreakpoint.c

PR python/16324 points out that comparing a frame id to null_frame_id
can never succeed, and proposes simply removing the dead code. That
is what this patch does.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16324


f760c4f 2022-10-19 00:25:36 Carl Love

Update tests to use skip_hw_watchpoint_tests to test for HW watchpoint support.

The hardware watchpoint check has been updated in a couple of recent
patches. This patch updates the hardware watchpoint test in the remaining
gdb tests.

The issue is the PowerPC processors support hardware watchpoints with the
exception of Power 9. The hardware watchpoint support is disabled on
Power 9. The test skip_hw_watchpoint_tests must be used to correctly
determine if the PowerPC processor supports hardware watchpoints.

This patch fixes 6 test failures in test gdb.threads/watchpoint-fork.exp.

Test gdb.base/watch-vfork.exp runs with can-use-hw-watchpoints set to
true and false. When the test is run with can-use-hw-watchpoints set to
true, gdb just falls back to using software watchpoints. The
patch reduces the number of expected passes by 2 since because it now
only runs once with can-use-hw-watchpoints set to false.

Test gdb.mi/mi-watch.exp runs the test with argument hw and sw. If the
argument is hw and hardware watchpoints are not supported the test exits.
The number of expected passes is cut in half with the patch as it now only
runs the test using software breakpoints. Previously the pass to use
hardware watchpoints was not skipped and the test actually ran using
software watchpoints.

The following tests run the same with and without the patch. The tests
are supposed to execute the gdb command "set can-use-hw-watchpoints 0" if
the processor does not support hardware bwatchpoints. However the command
was not being executed and gdb was falling back to using software
watchpoints since the Power 9 watchpoint resource check fails. With the
patch, the tests now execute the command and the test runs using software
watchpoints as it did previously. The tests are:

gdb.base/commands.exp
gdb.base/cond-eval-mode.exp
gdb.base/display.exp
gdb.base/gdb11531.exp
gdb.base/recurse.exp
gdb.base/value-double-free.exp
gdb.base/watch-bitfields.exp
gdb.base/watch-cond-infcall.exp
gdb.base/watch-cond.exp
gdb.base/watchpoint-solib.exp
gdb.base/watchpoints.exp

The following two tests are not supported on the Power 9 system used to
test the changes. The patch does not change the tests results for these
tests:

gdb.python/py-breakpoint.exp
gdb.mi/mi-watch-nonstop.exp

0df940e 2022-10-18 22:32:47 Tom de Vries

[gdb/testsuite] Handle header files with local-remote-host.exp

With test-case gdb.base/included.exp and host board local-remote-host.exp with
tentative fix for PR29697 I run into:
...
included.c:18:10: fatal error: included.h: No such file or directory
#include "included.h"
^~~~~~~~~~~~
compilation terminated.
...

Fix this by adding the missing gdb_remote_download calls.

Likewise in a few other test-cases.

Tested on x86_64-linux.

21b61fe 2022-10-18 22:32:46 Tom de Vries

[gdb/testsuite] Fix gdb.server/no-thread-db.exp with local-remote-host.exp

With test-case gdb.server/no-thread-db.exp and host board local-remote-host.exp
with a tentative fix for PR29697 I run into:
...
(gdb) print foo^M
Cannot find thread-local storage for Thread 29613.29613, executable file \
$HOME/no-thread-db:^M
Remote target failed to process qGetTLSAddr request^M
(gdb) FAIL: gdb.server/no-thread-db.exp: print foo
...

The regexp in the test-case expects the full $binfile pathname, but we have
instead $HOME/no-thread-db.

Fix this by making the regexp less strict.

Tested on x86_64-linux.

95dcf7d 2022-10-18 22:32:46 Tom de Vries

[gdb/testsuite] Fix gdb.base/return-nodebug.exp with local-remote-host.exp

With host board local-remote-host.exp and test-case
gdb.base/return-nodebug.exp, I run into:
...
Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never \
-DTYPE=signed\ char -c -g -o return-nodebug-signed-char0.o \
/home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base/return-nodebug.c \
(timeout = 300)
builtin_spawn [open ...]^M
gcc: error: char: No such file or directory
...

Avoid the quoting problem by not using spaces in the define.

Tested on x86_64-linux.

473487c 2022-10-18 22:32:46 Tom de Vries

[gdb/testsuite] Fix gdb.server/file-transfer.exp with local-remote-host.exp

When running test-case gdb.server/file-transfer.exp with host
board local-remote-host.exp, I get:
...
Executing on host: cmp -s $outputs/gdb.server/file-transfer/file-transfer \
down-server (timeout = 300)
builtin_spawn [open ...]^M
XYZ2ZYX
FAIL: gdb.server/file-transfer.exp: compare intermediate binary file
...

The remote host and remote target cases are handled here together here in proc
test_file_transfer:
...
if {![is_remote host] && ![is_remote target]} {
set up_server [standard_output_file $up_server]
set down_server [standard_output_file $down_server]
}
...

Fix this by handling them separately.

Tested on x86_64-linux.