PR breakpoints/34112 reports that "rbreak <file>:<regexp>" sets breakpoints in
files other than <file>.
This is a regression since commit c4c093a31f ("Make
global_symbol_searcher::filenames private"), which did:
...
if (file_name != nullptr)
- spec.filenames.push_back (file_name);
+ spec.add_filename (std::move (file_name));
...
The std::move nullifies file_name, so a subsequent file_name check:
...
if (file_name != nullptr)
...
now always evaluates to false.
Fix this by:
- introducing a variable bool file_name_p, initialized before the
std::move, and
- using that instead.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34112
glibc 2.42 and later, and GNU Hurd, accept arbitrary baud rates
directly via cfsetispeed and cfsetospeed. This behaviour is expected
to be standardized in a future POSIX revision.
Introduce a configure-time test (HAVE_CFSETSPEED_ARBITRARY) that
detects this capability and add a new platform-agnostic helper
set_custom_baudrate_posix. The main dispatcher now prefers the POSIX
path when it is available, falling back to the existing Linux (BOTHER)
or Darwin (IOSSIOSPEED) implementations otherwise.
The HAVE_CUSTOM_BAUDRATE_SUPPORT guard is extended to also cover the
new POSIX case.
Suggested-by: Kevin Buettner <kevinb@redhat.com>
Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-by: Kevin Buettner <kevinb@redhat.com>
(cherry picked from commit 7d53467645)
On musl-based systems, <asm/termbits.h> may expose BOTHER even though
struct termios does not define c_ispeed/c_ospeed. This causes the
Linux-specific custom baud rate path to be compiled and fail to build.
Fix the problem at the macro level by requiring
HAVE_STRUCT_TERMIOS_C_OSPEED (obtained via AC_CHECK_MEMBERS) together
with BOTHER in the HAVE_CUSTOM_BAUDRATE_SUPPORT guard. This prevents
the Linux-specific code from being compiled on musl while leaving
set_custom_baudrate_linux unchanged.
This is a pure build fix with no functional or behavioural change on
any existing platform.
Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
Approved-by: Kevin Buettner <kevinb@redhat.com>
(cherry picked from commit 94d58b3add)