<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/binutils-gdb.git/gdbsupport, branch master</title>
<subtitle>sourceware.org: git/binutils-gdb.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/'/>
<entry>
<title>gdb: Fix building with latest libc++</title>
<updated>2023-04-29T07:35:11+00:00</updated>
<author>
<name>Manoj Gupta</name>
<email>manojgupta@google.com</email>
</author>
<published>2023-04-17T20:33:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b'/>
<id>e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b</id>
<content type='text'>
Latest libc++[1] causes transitive include to &lt;locale&gt; when
&lt;mutex&gt; or &lt;thread&gt; header is included. This causes
gdb to not build[2] since &lt;locale&gt; defines isupper/islower etc.
functions that are explicitly macroed-out in safe-ctype.h to
prevent their use.
Use the suggestion from libc++ to include &lt;locale&gt; internally when
building in C++ mode to avoid build errors.
Use safe-gdb-ctype.h as the include instead of "safe-ctype.h"
to keep this isolated to gdb since rest of binutils
does not seem to use much C++.

[1]: https://reviews.llvm.org/D144331
[2]: https://issuetracker.google.com/issues/277967395
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Latest libc++[1] causes transitive include to &lt;locale&gt; when
&lt;mutex&gt; or &lt;thread&gt; header is included. This causes
gdb to not build[2] since &lt;locale&gt; defines isupper/islower etc.
functions that are explicitly macroed-out in safe-ctype.h to
prevent their use.
Use the suggestion from libc++ to include &lt;locale&gt; internally when
building in C++ mode to avoid build errors.
Use safe-gdb-ctype.h as the include instead of "safe-ctype.h"
to keep this isolated to gdb since rest of binutils
does not seem to use much C++.

[1]: https://reviews.llvm.org/D144331
[2]: https://issuetracker.google.com/issues/277967395
</pre>
</div>
</content>
</entry>
<entry>
<title>gdb: move displaced_step_dump_bytes into gdbsupport (and rename)</title>
<updated>2023-03-29T07:57:10+00:00</updated>
<author>
<name>Andrew Burgess</name>
<email>aburgess@redhat.com</email>
</author>
<published>2023-03-22T17:22:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=a6e5abae4e9e845e6e69e07f755c0805558dcd63'/>
<id>a6e5abae4e9e845e6e69e07f755c0805558dcd63</id>
<content type='text'>
It was pointed out during review of another patch that the function
displaced_step_dump_bytes really isn't specific to displaced stepping,
and should really get a more generic name and move into gdbsupport/.

This commit does just that.  The function is renamed to
bytes_to_string and is moved into gdbsupport/common-utils.{cc,h}.  The
function implementation doesn't really change. Much...

... I have updated the function to take an array view, which makes it
slightly easier to call in a couple of places where we already have a
gdb::bytes_vector.  I've then added an inline wrapper to convert a raw
pointer and length into an array view, which is used in places where
we don't easily have a gdb::bytes_vector (or similar).

Updated all users of displaced_step_dump_bytes.

There should be no user visible changes after this commit.

Finally, I ended up having to add an include of gdb_assert.h into
array-view.h.  When I include array-view.h into common-utils.h I ran
into build problems because array-view.h calls gdb_assert.

Approved-By: Simon Marchi &lt;simon.marchi@efficios.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was pointed out during review of another patch that the function
displaced_step_dump_bytes really isn't specific to displaced stepping,
and should really get a more generic name and move into gdbsupport/.

This commit does just that.  The function is renamed to
bytes_to_string and is moved into gdbsupport/common-utils.{cc,h}.  The
function implementation doesn't really change. Much...

... I have updated the function to take an array view, which makes it
slightly easier to call in a couple of places where we already have a
gdb::bytes_vector.  I've then added an inline wrapper to convert a raw
pointer and length into an array view, which is used in places where
we don't easily have a gdb::bytes_vector (or similar).

Updated all users of displaced_step_dump_bytes.

There should be no user visible changes after this commit.

Finally, I ended up having to add an include of gdb_assert.h into
array-view.h.  When I include array-view.h into common-utils.h I ran
into build problems because array-view.h calls gdb_assert.

Approved-By: Simon Marchi &lt;simon.marchi@efficios.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gdb, gdbserver, gdbsupport: fix whitespace issues</title>
<updated>2023-03-09T21:32:00+00:00</updated>
<author>
<name>Simon Marchi</name>
<email>simon.marchi@efficios.com</email>
</author>
<published>2023-03-09T19:56:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=287de65625a667b6403d0606fa75b67926ec7230'/>
<id>287de65625a667b6403d0606fa75b67926ec7230</id>
<content type='text'>
Replace spaces with tabs in a bunch of places.

Change-Id: If0f87180f1d13028dc178e5a8af7882a067868b0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace spaces with tabs in a bunch of places.

Change-Id: If0f87180f1d13028dc178e5a8af7882a067868b0
</pre>
</div>
</content>
</entry>
<entry>
<title>gdbsupport: ignore -Wenum-constexpr-conversion in enum-flags.h</title>
<updated>2023-03-07T02:00:52+00:00</updated>
<author>
<name>Simon Marchi</name>
<email>simon.marchi@efficios.com</email>
</author>
<published>2023-02-23T17:35:40+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=ae61525fcf456ab395d55c45492a106d1275873a'/>
<id>ae61525fcf456ab395d55c45492a106d1275873a</id>
<content type='text'>
When building with clang 16, we get:

      CXX    gdb.o
    In file included from /home/smarchi/src/binutils-gdb/gdb/gdb.c:19:
    In file included from /home/smarchi/src/binutils-gdb/gdb/defs.h:65:
    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
        integer_for_size&lt;sizeof (T), static_cast&lt;bool&gt;(T (-1) &lt; T (0))&gt;::type
                                                       ^

The error message does not make it clear in the context of which enum
flag this fails (i.e. what is T in this context), but it doesn't really
matter, we have similar warning/errors for many of them, if we let the
build go through.

clang is right that the value -1 is invalid for the enum type we cast -1
to.  However, we do need this expression in order to select an integer
type with the appropriate signedness.  That is, with the same signedness
as the underlying type of the enum.

I first wondered if that was really needed, if we couldn't use
std::underlying_type for that.  It turns out that the comment just above
says:

    /* Note that std::underlying_type&lt;enum_type&gt; is not what we want here,
       since that returns unsigned int even when the enum decays to signed
       int.  */

I was surprised, because std::is_signed&lt;std::underlying_type&lt;enum_type&gt;&gt;
returns the right thing.  So I tried replacing all this with
std::underlying_type, see if that would work.  Doing so causes some
build failures in unittests/enum-flags-selftests.c:

      CXX    unittests/enum-flags-selftests.o
    /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:254:1: error: static assertion failed due to requirement 'gdb::is_same&lt;selftests::enum_flags_tests::check_valid_expr254::archetype&lt;enum_flags&lt;s
    elftests::enum_flags_tests::RE&gt;, selftests::enum_flags_tests::RE, enum_flags&lt;selftests::enum_flags_tests::RE2&gt;, selftests::enum_flags_tests::RE2, enum_flags&lt;selftests::enum_flags_tests::URE&gt;, selftests::enum_fla
    gs_tests::URE, int&gt;, selftests::enum_flags_tests::check_valid_expr254::archetype&lt;enum_flags&lt;selftests::enum_flags_tests::RE&gt;, selftests::enum_flags_tests::RE, enum_flags&lt;selftests::enum_flags_tests::RE2&gt;, selfte
    sts::enum_flags_tests::RE2, enum_flags&lt;selftests::enum_flags_tests::URE&gt;, selftests::enum_flags_tests::URE, unsigned int&gt;&gt;::value == true':
    CHECK_VALID (true,  int,  true ? EF () : EF2 ())
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:91:3: note: expanded from macro 'CHECK_VALID'
      CHECK_VALID_EXPR_6 (EF, RE, EF2, RE2, UEF, URE, VALID, EXPR_TYPE, EXPR)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:105:3: note: expanded from macro 'CHECK_VALID_EXPR_6'
      CHECK_VALID_EXPR_INT (ESC_PARENS (typename T1, typename T2,           \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:66:3: note: expanded from macro 'CHECK_VALID_EXPR_INT'
      static_assert (gdb::is_detected_exact&lt;archetype&lt;TYPES, EXPR_TYPE&gt;,    \
      ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is a bit hard to decode, but basically enumerations have the
following funny property that they decay into a signed int, even if
their implicit underlying type is unsigned.  This code:

    enum A {};
    enum B {};

    int main() {
      std::cout &lt;&lt; std::is_signed&lt;std::underlying_type&lt;A&gt;::type&gt;::value
                &lt;&lt; std::endl;
      std::cout &lt;&lt; std::is_signed&lt;std::underlying_type&lt;B&gt;::type&gt;::value
                &lt;&lt; std::endl;
      auto result = true ? A() : B();
      std::cout &lt;&lt; std::is_signed&lt;decltype(result)&gt;::value &lt;&lt; std::endl;
    }

produces:

    0
    0
    1

So, the "CHECK_VALID" above checks that this property works for enum flags the
same way as it would if you were using their underlying enum types.  And
somehow, changing integer_for_size to use std::underlying_type breaks that.

Since the current code does what we want, and I don't see any way of doing it
differently, ignore -Wenum-constexpr-conversion around it.

Change-Id: Ibc82ae7bbdb812102ae3f1dd099fc859dc6f3cc2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building with clang 16, we get:

      CXX    gdb.o
    In file included from /home/smarchi/src/binutils-gdb/gdb/gdb.c:19:
    In file included from /home/smarchi/src/binutils-gdb/gdb/defs.h:65:
    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
        integer_for_size&lt;sizeof (T), static_cast&lt;bool&gt;(T (-1) &lt; T (0))&gt;::type
                                                       ^

The error message does not make it clear in the context of which enum
flag this fails (i.e. what is T in this context), but it doesn't really
matter, we have similar warning/errors for many of them, if we let the
build go through.

clang is right that the value -1 is invalid for the enum type we cast -1
to.  However, we do need this expression in order to select an integer
type with the appropriate signedness.  That is, with the same signedness
as the underlying type of the enum.

I first wondered if that was really needed, if we couldn't use
std::underlying_type for that.  It turns out that the comment just above
says:

    /* Note that std::underlying_type&lt;enum_type&gt; is not what we want here,
       since that returns unsigned int even when the enum decays to signed
       int.  */

I was surprised, because std::is_signed&lt;std::underlying_type&lt;enum_type&gt;&gt;
returns the right thing.  So I tried replacing all this with
std::underlying_type, see if that would work.  Doing so causes some
build failures in unittests/enum-flags-selftests.c:

      CXX    unittests/enum-flags-selftests.o
    /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:254:1: error: static assertion failed due to requirement 'gdb::is_same&lt;selftests::enum_flags_tests::check_valid_expr254::archetype&lt;enum_flags&lt;s
    elftests::enum_flags_tests::RE&gt;, selftests::enum_flags_tests::RE, enum_flags&lt;selftests::enum_flags_tests::RE2&gt;, selftests::enum_flags_tests::RE2, enum_flags&lt;selftests::enum_flags_tests::URE&gt;, selftests::enum_fla
    gs_tests::URE, int&gt;, selftests::enum_flags_tests::check_valid_expr254::archetype&lt;enum_flags&lt;selftests::enum_flags_tests::RE&gt;, selftests::enum_flags_tests::RE, enum_flags&lt;selftests::enum_flags_tests::RE2&gt;, selfte
    sts::enum_flags_tests::RE2, enum_flags&lt;selftests::enum_flags_tests::URE&gt;, selftests::enum_flags_tests::URE, unsigned int&gt;&gt;::value == true':
    CHECK_VALID (true,  int,  true ? EF () : EF2 ())
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:91:3: note: expanded from macro 'CHECK_VALID'
      CHECK_VALID_EXPR_6 (EF, RE, EF2, RE2, UEF, URE, VALID, EXPR_TYPE, EXPR)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:105:3: note: expanded from macro 'CHECK_VALID_EXPR_6'
      CHECK_VALID_EXPR_INT (ESC_PARENS (typename T1, typename T2,           \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:66:3: note: expanded from macro 'CHECK_VALID_EXPR_INT'
      static_assert (gdb::is_detected_exact&lt;archetype&lt;TYPES, EXPR_TYPE&gt;,    \
      ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is a bit hard to decode, but basically enumerations have the
following funny property that they decay into a signed int, even if
their implicit underlying type is unsigned.  This code:

    enum A {};
    enum B {};

    int main() {
      std::cout &lt;&lt; std::is_signed&lt;std::underlying_type&lt;A&gt;::type&gt;::value
                &lt;&lt; std::endl;
      std::cout &lt;&lt; std::is_signed&lt;std::underlying_type&lt;B&gt;::type&gt;::value
                &lt;&lt; std::endl;
      auto result = true ? A() : B();
      std::cout &lt;&lt; std::is_signed&lt;decltype(result)&gt;::value &lt;&lt; std::endl;
    }

produces:

    0
    0
    1

So, the "CHECK_VALID" above checks that this property works for enum flags the
same way as it would if you were using their underlying enum types.  And
somehow, changing integer_for_size to use std::underlying_type breaks that.

Since the current code does what we want, and I don't see any way of doing it
differently, ignore -Wenum-constexpr-conversion around it.

Change-Id: Ibc82ae7bbdb812102ae3f1dd099fc859dc6f3cc2
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce gdb_exception_forced_quit</title>
<updated>2023-02-27T23:20:38+00:00</updated>
<author>
<name>Kevin Buettner</name>
<email>kevinb@redhat.com</email>
</author>
<published>2023-02-27T23:11:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=522044dc5fa76f9fef70fe746274daf09bbf64fe'/>
<id>522044dc5fa76f9fef70fe746274daf09bbf64fe</id>
<content type='text'>
This commit adds a new exception 'gdb_exception_forced_quit', reason
code 'REASON_FORCED_QUIT', return mask 'RETURN_MASK_FORCED_QUIT', and
a wrapper for throwing the exception, throw_forced_quit().

The addition of this exception plus supporting code will allow us to
recognize that a SIGTERM has been received by GDB and then propagate
recognition of that fact to the upper levels of GDB where it can be
correctly handled.  At the moment, when GDB receives a SIGTERM, it
will attempt to exit via a series of calls from the QUIT checking
code.  However, before it can exit, it must do various cleanups, such
as killing or detaching all inferiors.  Should these cleanups be
attempted while GDB is executing very low level code, such as reading
target memory from within ps_xfer_memory(), it can happen that some of
GDB's state is out of sync with regard to the cleanup code's
expectations.  In the case just mentioned, it's been observed that
inferior_ptid and the current_thread_ are not in sync; this triggers
an assert / internal error.

This commit only introduces the exception plus supporting machinery;
changes which use this new exception are in later commits in this
series.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26761
Tested-by: Tom de Vries &lt;tdevries@suse.de&gt;
Approved-by: Pedro Alves &lt;pedro@palves.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds a new exception 'gdb_exception_forced_quit', reason
code 'REASON_FORCED_QUIT', return mask 'RETURN_MASK_FORCED_QUIT', and
a wrapper for throwing the exception, throw_forced_quit().

The addition of this exception plus supporting code will allow us to
recognize that a SIGTERM has been received by GDB and then propagate
recognition of that fact to the upper levels of GDB where it can be
correctly handled.  At the moment, when GDB receives a SIGTERM, it
will attempt to exit via a series of calls from the QUIT checking
code.  However, before it can exit, it must do various cleanups, such
as killing or detaching all inferiors.  Should these cleanups be
attempted while GDB is executing very low level code, such as reading
target memory from within ps_xfer_memory(), it can happen that some of
GDB's state is out of sync with regard to the cleanup code's
expectations.  In the case just mentioned, it's been observed that
inferior_ptid and the current_thread_ are not in sync; this triggers
an assert / internal error.

This commit only introduces the exception plus supporting machinery;
changes which use this new exception are in later commits in this
series.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26761
Tested-by: Tom de Vries &lt;tdevries@suse.de&gt;
Approved-by: Pedro Alves &lt;pedro@palves.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove struct buffer</title>
<updated>2023-02-24T18:53:03+00:00</updated>
<author>
<name>Tom Tromey</name>
<email>tom@tromey.com</email>
</author>
<published>2022-12-16T19:50:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=147699fd6991ae67fc22ca543a28f85a242fc930'/>
<id>147699fd6991ae67fc22ca543a28f85a242fc930</id>
<content type='text'>
I've long wanted to remove 'struct buffer', and thanks to Simon's
earlier patch, I was finally able to do so.  My feeling has been that
gdb already has several decent structures available for growing
strings: std::string of course, but also obstack and even objalloc
from BFD and dyn-string from libiberty.  The previous patches in this
series removed all the uses of struct buffer, so this one can remove
the code and the remaining #includes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I've long wanted to remove 'struct buffer', and thanks to Simon's
earlier patch, I was finally able to do so.  My feeling has been that
gdb already has several decent structures available for growing
strings: std::string of course, but also obstack and even objalloc
from BFD and dyn-string from libiberty.  The previous patches in this
series removed all the uses of struct buffer, so this one can remove
the code and the remaining #includes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not cast away const in agent_run_command</title>
<updated>2023-02-14T16:01:18+00:00</updated>
<author>
<name>Tom Tromey</name>
<email>tromey@adacore.com</email>
</author>
<published>2023-02-14T14:03:11+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=81aa19c303c94f549cb9ae343cfe4b635b4e888c'/>
<id>81aa19c303c94f549cb9ae343cfe4b635b4e888c</id>
<content type='text'>
While investigating something else, I noticed some weird code in
agent_run_command (use of memcpy rather than strcpy).  Then I noticed
that 'cmd' is used as both an in and out parameter, despite being
const.

Casting away const like this is bad.  This patch removes the const and
fixes the memcpy.  I also added a static assert to assure myself that
the code in gdbserver is correct -- gdbserver is passing its own
buffer directly to agent_run_command.

Reviewed-By: Andrew Burgess &lt;aburgess@redhat.com&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While investigating something else, I noticed some weird code in
agent_run_command (use of memcpy rather than strcpy).  Then I noticed
that 'cmd' is used as both an in and out parameter, despite being
const.

Casting away const like this is bad.  This patch removes the const and
fixes the memcpy.  I also added a static assert to assure myself that
the code in gdbserver is correct -- gdbserver is passing its own
buffer directly to agent_run_command.

Reviewed-By: Andrew Burgess &lt;aburgess@redhat.com&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Move implementation of perror_with_name to gdbsupport</title>
<updated>2023-02-11T02:04:45+00:00</updated>
<author>
<name>Aaron Merey</name>
<email>amerey@redhat.com</email>
</author>
<published>2023-02-10T01:28:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=40dfb28b56fe55a370a35495e0f1eb6c95110f35'/>
<id>40dfb28b56fe55a370a35495e0f1eb6c95110f35</id>
<content type='text'>
gdbsupport/errors.h declares perror_with_name and leaves the
implementation to the clients.

However gdb and gdbserver's implementations are essentially the
same, resulting in unnecessary code duplication.

Fix this by implementing perror_with_name in gdbsupport.  Add an
optional parameter for specifying the errno used to generate the
error message.

Also move the implementation of perror_string to gdbsupport since
perror_with_name requires it.

Approved-By: Tom Tromey &lt;tom@tromey.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gdbsupport/errors.h declares perror_with_name and leaves the
implementation to the clients.

However gdb and gdbserver's implementations are essentially the
same, resulting in unnecessary code duplication.

Fix this by implementing perror_with_name in gdbsupport.  Add an
optional parameter for specifying the errno used to generate the
error message.

Also move the implementation of perror_string to gdbsupport since
perror_with_name requires it.

Approved-By: Tom Tromey &lt;tom@tromey.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>GDB: Switch to using C++ standard integer type limits</title>
<updated>2023-02-10T23:49:19+00:00</updated>
<author>
<name>Maciej W. Rozycki</name>
<email>macro@embecosm.com</email>
</author>
<published>2023-02-10T23:49:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=4a9efa5d63b2253a595ff9d6944415bf8cbfe408'/>
<id>4a9efa5d63b2253a595ff9d6944415bf8cbfe408</id>
<content type='text'>
Use &lt;climits&gt; instead of &lt;limits.h&gt; and ditch local fallback definitions
for minimum and maximum value macros provided by C++11.  Add LONGEST_MAX
and LONGEST_MIN definitions.

Approved-By: Tom Tromey &lt;tom@tromey.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use &lt;climits&gt; instead of &lt;limits.h&gt; and ditch local fallback definitions
for minimum and maximum value macros provided by C++11.  Add LONGEST_MAX
and LONGEST_MIN definitions.

Approved-By: Tom Tromey &lt;tom@tromey.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Let user C-c when waiting for DWARF index finalization</title>
<updated>2023-02-09T14:21:52+00:00</updated>
<author>
<name>Tom Tromey</name>
<email>tromey@adacore.com</email>
</author>
<published>2022-12-06T15:05:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/binutils-gdb.git/commit/?id=307733cc0fa864fcb92f4c308a0a27d17552df37'/>
<id>307733cc0fa864fcb92f4c308a0a27d17552df37</id>
<content type='text'>
In PR gdb/29854, Simon pointed out that it would be good to be able to
use C-c when the DWARF cooked index is waiting for finalization.  The
idea here is to be able to interrupt a command like "break" -- not to
stop the finalization process itself, which runs in a worker thread.

This patch implements this idea, by changing the index wait functions
to, by default, allow a quit.  Polling is done, because there doesn't
seem to be a better way to interrupt a wait on a std::future.

For v2, I realized that the thread compatibility code in thread-pool.h
also needed an update.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29854
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In PR gdb/29854, Simon pointed out that it would be good to be able to
use C-c when the DWARF cooked index is waiting for finalization.  The
idea here is to be able to interrupt a command like "break" -- not to
stop the finalization process itself, which runs in a worker thread.

This patch implements this idea, by changing the index wait functions
to, by default, allow a quit.  Polling is done, because there doesn't
seem to be a better way to interrupt a wait on a std::future.

For v2, I realized that the thread compatibility code in thread-pool.h
also needed an update.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29854
</pre>
</div>
</content>
</entry>
</feed>
