]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 16 Mar 2023 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 15 Mar 2023 00:01:07 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 14 Mar 2023 00:01:31 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoFix crash in inside_main_func
Tom Tromey [Fri, 24 Feb 2023 17:40:16 +0000 (10:40 -0700)] 
Fix crash in inside_main_func

gdb 13.1 crashes while running the rust compiler's debugger tests.
The crash has a number of causes.

First, the rust compiler still uses the C++-like _Z mangling, but with
its own twist -- some hex digits added to the end of a symbol.  So,
while gdb finds the correct name of "main":

(top-gdb) p name
$13 = 0x292e0c0 "rustc_gdb_1031745::main"

It isn't found in the minsyms, because C++ demangling yields:

[99] t 0x90c0 _ZN17rustc_gdb_10317454main17h5b5be7fe16a97225E section .text  rustc_gdb_1031745::main::h5b5be7fe16a97225  zko06yobckx336v

This could perhaps be fixed.  I also filed a new PR to suggest
preferring the linkage name of the main program.

Next, the rust compiler emits both a DW_TAG_subprogram and a
DW_TAG_namespace for "main".  This happens because the file is named
"main.rs" -- i.e., the bug is specific to the source file name.  The
crash also seems to require the nested function inside of 'main', at
least for me.  The namespace always is generated, but perhaps this
changes the ordering in the DWARF.

When inside_main_func looks up the main symbol, it finds the namespace
symbol rather than the function.  (I filed a bug about fixing gdb's
symbol tables -- long overdue.)

Meanwhile, as I think it's important to fix this crash sooner rather
than later, this patch changes inside_main_func to check that the
symbol that is found is LOC_BLOCK.  This perhaps should have been done
in the first place, anyway.

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

(cherry picked from commit 5f056fcb3dce947447063f5ab225042177a59722)

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 13 Mar 2023 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 12 Mar 2023 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 11 Mar 2023 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoPR gdb/30214: Prefer local include paths to system include paths
John Baldwin [Fri, 10 Mar 2023 20:01:40 +0000 (12:01 -0800)] 
PR gdb/30214: Prefer local include paths to system include paths

Some systems may install binutils headers into a system location
(e.g. /usr/local/include on FreeBSD) which may also include headers
for other external packages used by GDB such as zlib or zstd.  If a
system include path such as /usr/local/include is added before local
include paths to directories within a clone or release tarball, then
headers from the external binutils package are used which can result
in build failures if the external binutils package is out of sync with
the version of GDB being built.

To fix, sort the include paths in INTERNAL_CFLAGS_BASE to add CFLAGS
for "local" componenets before external components.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30214
Reviewed-By: Tom Tromey <tom@tromey.com>
(cherry picked from commit a2fbb6903889c8fe32f4f3b890ef4b8c565d6b84)

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 10 Mar 2023 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 9 Mar 2023 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 8 Mar 2023 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 7 Mar 2023 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 6 Mar 2023 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 5 Mar 2023 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 4 Mar 2023 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 3 Mar 2023 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 2 Mar 2023 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 Mar 2023 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 28 Feb 2023 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 27 Feb 2023 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 26 Feb 2023 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 25 Feb 2023 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 24 Feb 2023 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 23 Feb 2023 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 22 Feb 2023 00:01:10 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 21 Feb 2023 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 20 Feb 2023 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoBump GDB's version number to 13.1.90.DATE-git.
Joel Brobecker [Sun, 19 Feb 2023 14:00:08 +0000 (18:00 +0400)] 
Bump GDB's version number to 13.1.90.DATE-git.

This commit changes gdb/version.in to 13.1.90.DATE-git.

This commit also makes the following changes in gdb/testsuite:

* gdb.base/default.exp: Change $_gdb_minor to 2.

2 years agoSet GDB version number to 13.1. gdb-13.1-release
Joel Brobecker [Sun, 19 Feb 2023 13:45:06 +0000 (17:45 +0400)] 
Set GDB version number to 13.1.

This commit changes gdb/version.in to 13.1.

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 19 Feb 2023 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoFix "start" for D, Rust, etc
Tom Tromey [Tue, 14 Feb 2023 00:44:54 +0000 (17:44 -0700)] 
Fix "start" for D, Rust, etc

The new DWARF indexer broke "start" for some languages.

For D, it is broken because, while the code in cooked_index_shard::add
specifically excludes Ada, it fails to exclude D.  This means that the
C "main" will be detected as "main" here -- whereas what is intended
is for the code in find_main_name to use d_main_name to find the name.

The Rust compiler, on the other hand, uses DW_AT_main_subprogram.
However, the code in dwarf2_build_psymtabs_hard fails to create a
fully-qualified name, so the name always ends up as plain "main".

For D and Ada, a very simple approach suffices: remove the check
against "main" from cooked_index_shard::add.  This also has the
benefit of slightly speeding up DWARF indexing.  I assume this
approach will work for Pascal and Modula-2 as well, but I don't have a
way to test those at present.

For Rust, though, this is not sufficient.  And, computing the
fully-qualified name in dwarf2_build_psymtabs_hard will crash, because
cooked_index_entry::full_name uses the canonical name -- and that is
not computed until after canonicalization.

However, we don't want to wait for canonicalization to be done before
computing the main name.  That would remove any benefit from doing
canonicalization is the background.

This patch solves this dilemma by noticing that languages using
DW_AT_main_subprogram are, currently, disjoint from languages
requiring canonicalization.  Because of this, we can add a parameter
to full_name to let us avoid crashes, slowdowns, and races here.

This is kind of tricky and ugly, so I've tried to comment it
sufficiently.

While doing this, I had to change gdb.dwarf2/main-subprogram.exp.  A
different possibility here would be to ignore the canonicalization
needs of C in this situation, because those only affect certain types.
However, I chose this approach because the test case is artificial
anyhow.

A long time ago, in an earlier threading attempt, I changed the global
current_language to be a function (hidden behind a macro) to let us
attempt lazily computing the current language.  Perhaps this approach
could still be made to work.  However, that also seemed rather tricky,
more so than this patch.

Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30116
(cherry picked from commit 47fe57c92810c7302bb80eafdec6f4345bcc69c8)

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 18 Feb 2023 00:00:27 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 17 Feb 2023 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 16 Feb 2023 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 15 Feb 2023 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 14 Feb 2023 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoFix doc build dependencies for --with-system-readline
Keith Seitz [Mon, 13 Feb 2023 14:14:40 +0000 (06:14 -0800)] 
Fix doc build dependencies for --with-system-readline

PR build/30108 concerns building gdb documentation with
--with-sytem-readline.  If the in-tree readline directory is
missing, though, the docs will fail to build:

make[4]: Entering directory '/home/keiths/work/readline-doc-issue/linux/gdb/doc'
make[4]: *** No rule to make target '../../../src/gdb/doc/../../readline/readline/doc/rluser.texi', needed by 'gdb.info'.  Stop.

The listed file (and hsuser.texi) are conditionally included by gdb.texinfo.
When system readline is used, gdb/configure.ac will leave
READLINE_TEXI_INCFLAGS empty, causing doc/Makefile.in to output a line to
$BUILD/doc/GDBvn.texi with "@set SYSTEM_READLINE".  This surpresses the
inclusion of the missing files. They are not needed or used in this
scenario.

However, GDB_DOC_SOURCE_INCLUDES always lists these two files as dependencies,
thus provoking the build error whenever readline/ is missing.

This patch fixes this by creating (essentially) a conditional setting of the
dependencies to be included from readline.

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 13 Feb 2023 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 12 Feb 2023 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 11 Feb 2023 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 10 Feb 2023 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 9 Feb 2023 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 8 Feb 2023 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 7 Feb 2023 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 6 Feb 2023 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 5 Feb 2023 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 4 Feb 2023 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 3 Feb 2023 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoBump GDB's version number to 13.0.91.DATE-git.
Joel Brobecker [Thu, 2 Feb 2023 05:23:37 +0000 (09:23 +0400)] 
Bump GDB's version number to 13.0.91.DATE-git.

This commit changes gdb/version.in to 13.0.91.DATE-git.

2 years agoEnsure that libbacktrace/allocfail.sh is not deleted when creating release tarballs.
Nick Clifton [Thu, 2 Feb 2023 04:53:45 +0000 (08:53 +0400)] 
Ensure that libbacktrace/allocfail.sh is not deleted when creating release tarballs.

        * Makefile.am (CLEANFILES): Import patch from upstream to prevent
        allocafail.sh from being removed when running 'make clean'.

(cherry picked from commit edf64cd235f5ecb3725e7cf1ff83bbdb6dd53340)

2 years agoSet GDB version number to 13.0.91.
Joel Brobecker [Thu, 2 Feb 2023 03:53:17 +0000 (07:53 +0400)] 
Set GDB version number to 13.0.91.

This commit changes gdb/version.in to 13.0.91.

2 years agogdb/NEWS: Change "Changes since GDB 12" to "Changes in GDB 13".
Joel Brobecker [Thu, 2 Feb 2023 03:49:08 +0000 (07:49 +0400)] 
gdb/NEWS: Change "Changes since GDB 12" to "Changes in GDB 13".

Now that the version number is confirmed to GDB 13, this commit
updates the gdb/NEWS file accordingly, as per GDB's release procedures.

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 2 Feb 2023 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 Feb 2023 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agogdb/arm: Use new dwarf2 function cache
Torbjörn SVENSSON [Thu, 17 Nov 2022 11:18:20 +0000 (12:18 +0100)] 
gdb/arm: Use new dwarf2 function cache

This patch resolves the performance issue reported in pr/29738 by
caching the values for the stack pointers for the inner frame.  By
doing so, the impact can be reduced to checking the state and
returning the appropriate value.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Signed-off-by: Yvan Roux <yvan.roux@foss.st.com>
2 years agogdb: dwarf2 generic implementation for caching function data
Torbjörn SVENSSON [Thu, 17 Nov 2022 11:17:53 +0000 (12:17 +0100)] 
gdb: dwarf2 generic implementation for caching function data

When there is no dwarf2 data for a register, a function can be called
to provide the value of this register.  In some situations, it might
not be trivial to determine the value to return and it would cause a
performance bottleneck to do the computation each time.

This patch allows the called function to have a "cache" object that it
can use to store some metadata between calls to reduce the performance
impact of the complex logic.

The cache object is unique for each function and frame, so if there are
more than one function pointer stored in the dwarf2_frame_cache->reg
array, then the appropriate pointer will be supplied (the type is not
known by the dwarf2 implementation).

dwarf2_frame_get_fn_data can be used to retrieve the function unique
cache object.
dwarf2_frame_allocate_fn_data can be used to allocate and retrieve the
function unique cache object.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Signed-off-by: Yvan Roux <yvan.roux@foss.st.com>
2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 31 Jan 2023 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoFix comparator bug in cooked index
Tom Tromey [Fri, 27 Jan 2023 18:19:16 +0000 (11:19 -0700)] 
Fix comparator bug in cooked index

Simon pointed out that the cooked index template-matching patch
introduced a failure in libstdc++ debug mode.  In particular, the new
code violates the assumption of std::lower_bound and std::upper_bound
that the range is sorted with respect to the comparison.

When I first debugged this, I thought the problem was unfixable as-is
and that a second layer of filtering would have to be done.  However,
on irc, Simon pointed out that it could perhaps be solved if the
comparison function were assured that one operand always came from the
index, with the other always being the search string.

This patch implements this idea.

First, a new mode is introduced: a sorting mode for
cooked_index_entry::compare.  In this mode, strings are compared
case-insensitively, but we're careful to always sort '<' before any
other printable character.  This way, two names like "func" and
"func<param>" will be sorted next to each other -- i.e., "func1" will
not be seen between them.  This is important when searching.

Second, the compare function is changed to work in a strcmp-like way.
This makes it easier to test and (IMO) understand.

Third, the compare function is modified so that in non-sorting modes,
the index entry is always the first argument.  This allows consistency
in compares.

I regression tested this in libstdc++ debug mode on x86-64 Fedora 36.
It fixes the crash that Simon saw.

This is v2.  I believe it addresses the review comments, except for
the 'enum class' change, as I mentioned in email on the list.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
(cherry picked from commit c121e82c39659d1140b1a6a3cfd72c765741b9f5)

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 30 Jan 2023 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 29 Jan 2023 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 28 Jan 2023 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Jan 2023 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 26 Jan 2023 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 25 Jan 2023 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 24 Jan 2023 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 23 Jan 2023 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 22 Jan 2023 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 21 Jan 2023 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 20 Jan 2023 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 19 Jan 2023 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 18 Jan 2023 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoFix parameter-less template regression in new DWARF reader
Tom Tromey [Wed, 14 Dec 2022 21:37:41 +0000 (14:37 -0700)] 
Fix parameter-less template regression in new DWARF reader

PR c++/29896 points out a regression in the new DWARF reader.  It does
not properly handle a case like "break fn", where "fn" is a template
function.

This happens because the new index uses strncasecmp to compare.
However, to make this work correctly, we need a custom function that
ignores template parameters.

This patch adds a custom comparison function and fixes the bug.  A new
test case is included.

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

(cherry picked from commit ac37b79cc440e37fc704d425a6e450afb3c7ee89)

2 years agoMove hash_entry and eq_entry into cooked_index::do_finalize
Tom Tromey [Thu, 15 Dec 2022 16:38:05 +0000 (09:38 -0700)] 
Move hash_entry and eq_entry into cooked_index::do_finalize

I was briefly confused by the hash_entry and eq_entry functions in the
cooked index.  They are only needed in a single method, and that
method already has a couple of local lambdas for a different hash
table.  So, it seemed cleaner to move these there as well.

(cherry picked from commit 5a89072f36ddd3be71103e3806d42ff5e49ff616)

2 years agoAvoid submitting empty tasks in parallel_for_each
Tom Tromey [Tue, 13 Dec 2022 19:03:34 +0000 (12:03 -0700)] 
Avoid submitting empty tasks in parallel_for_each

I found that parallel_for_each would submit empty tasks to the thread
pool.  For example, this can happen if the number of tasks is smaller
than the number of available threads.  In the DWARF reader, this
resulted in the cooked index containing empty sub-indices.  This patch
arranges to instead shrink the result vector and process the trailing
entries in the calling thread.

(cherry picked from commit 63078a04984b73e1fdeb4571a63605ee5c13f929)

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 17 Jan 2023 00:01:16 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 16 Jan 2023 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 15 Jan 2023 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 14 Jan 2023 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Jan 2023 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoSet _WIN32_WINNT in common.m4 configure check
Tom Tromey [Mon, 9 Jan 2023 14:43:29 +0000 (07:43 -0700)] 
Set _WIN32_WINNT in common.m4 configure check

GCC recently added support for the Windows thread model, enabling
libstdc++ to support Windows natively.  However, this supporrt
requires a version of Windows later than the minimum version that is
supported by GDB.

PR build/29966 points out that the GDB configure test for std::thread
does not work in this situation, because _WIN32_WINNT is not defined
in test program, and so <thread> seems to be fine.

This patch is an attempt to fix the problem, by using the same setting
for _WIN32_WINNT at configure time as is used at build time.

I don't have access to one of the older systems so I don't think I can
truly test this.  I did do a mingw cross build, though.  I'm going to
ask the bug reporter to test it.

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

(cherry picked from commit 2124b2de4bba05063218501dcccfc4cffe648cda)

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 12 Jan 2023 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Jan 2023 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 10 Jan 2023 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Jan 2023 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Jan 2023 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Jan 2023 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Jan 2023 00:01:12 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 5 Jan 2023 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 4 Jan 2023 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years ago[gdb] Fix segfault during inferior call to ifunc
Andrew Burgess [Tue, 3 Jan 2023 10:53:09 +0000 (11:53 +0100)] 
[gdb] Fix segfault during inferior call to ifunc

With a simple test-case:
...
$ cat test.c
char *p = "a";
int main (void) {
  return strlen (p);
}
$ gcc -g test.c
...
we run into this segfault:
...
$ gdb -q -batch a.out -ex start -ex "p strlen (p)"
Temporary breakpoint 1 at 0x1151: file test.c, line 4.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Temporary breakpoint 1, main () at test.c:4
4   return strlen (p);

Fatal signal: Segmentation fault
...

The strlen is an ifunc, and consequently during the call to
call_function_by_hand_dummy for "p strlen (p)" another call
to call_function_by_hand_dummy is used to resolve the ifunc.

This invalidates the get_current_frame () result in the outer call.

Fix this by using prepare_reinflate and reinflate.

Note that this series (
https://inbox.sourceware.org/gdb-patches/20221214033441.499512-1-simon.marchi@polymtl.ca/ )
should address this problem, but this patch is a simpler fix which is easy to
backport.

Tested on x86_64-linux.

Co-Authored-By: Tom de Vries <tdevries@suse.de>
PR gdb/29941
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29941

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 3 Jan 2023 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoFix target remote pipe command for MinGW
Jonas Hoerberg [Thu, 22 Dec 2022 15:22:17 +0000 (15:22 +0000)] 
Fix target remote pipe command for MinGW

The cced7cacecad104fff0 ("gdb: preserve `|` in connection details string")
commit added '|' detection and removal to ser-pipe.c, but missed to add it
to ser-mingw.c.

This results in the error message below for MinGW hosts:
error starting child process '| <executable> <args>': CreateProcess: No such file or directory

This commit add the missing '|' detection and removal to ser-mingw.c.

(cherry picked from commit c43d829bca5e45c5e6c0255a549abc5766f6de7f)

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 2 Jan 2023 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agomanual copyright year range of various GDB files to add 2023
Joel Brobecker [Sun, 1 Jan 2023 13:07:44 +0000 (17:07 +0400)] 
manual copyright year range of various GDB files to add 2023

This commit updates the following file...

   gdb/doc/gdb.texinfo
   gdb/doc/refcard.tex
   gdb/syscalls/update-netbsd.sh

... by hand as instructed by the gdb/copyright.py script.
The update by hand is needed because the copyright headers
to update are actually nested inside those files, rather
than located at the start of the file.

(cherry picked from commit 944bfb2ccb564803279f41019e75c62d7ec8e5af)

2 years agoUpdate copyright year range in header of all files managed by GDB
Joel Brobecker [Sun, 1 Jan 2023 13:07:37 +0000 (17:07 +0400)] 
Update copyright year range in header of all files managed by GDB

This commit is the result of running the gdb/copyright.py script,
which automated the update of the copyright year range for all
source files managed by the GDB project to be updated to include
year 2023.

2 years agogdb/copyright.py: Adjust following rename of sim/ppc/ppc-instructions...
Joel Brobecker [Sun, 1 Jan 2023 13:07:32 +0000 (17:07 +0400)] 
gdb/copyright.py: Adjust following rename of sim/ppc/ppc-instructions...

... to sim/ppc/powerpc.igen

This file is in the NOT_FSF_LIST because this file has a copyright
which is not assigned to the FSF. Since the file got renamed,
the corresponding entry in NOT_FSF_LIST needs to be renamed as well.

(cherry picked from commit e4661570ead7be521c9d693f188b0944d7b8c78c)

2 years agoUpdate copyright year in help message of gdb, gdbserver, gdbreplay
Joel Brobecker [Sun, 1 Jan 2023 13:07:20 +0000 (17:07 +0400)] 
Update copyright year in help message of gdb, gdbserver, gdbreplay

This commit updates the copyright year displayed by gdb, gdbserver
and gdbreplay's help message from 2022 to 2023, as per our Start
of New Year procedure. The corresponding source files' copyright
header are also updated accordingly.

(cherry picked from commit e1ca55341ca328b2343ecc5cb78699fdbd1caa22)

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 1 Jan 2023 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 31 Dec 2022 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 30 Dec 2022 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in