* [PATCH V3] PR gdb/33747: gdb/ser-unix: modernize Linux custom baud rate support
@ 2026-03-12 21:01 sunilkumar.dora
2026-03-19 22:44 ` Kevin Buettner
2026-03-20 1:24 ` Maciej W. Rozycki
0 siblings, 2 replies; 5+ messages in thread
From: sunilkumar.dora @ 2026-03-12 21:01 UTC (permalink / raw)
To: gdb-patches
Cc: kevinb, macro, Randy.MacLeod, Sundeep.Kokkonda, schwab, tromey,
simark, sunilkumar.dora
From: Sunil Dora <sunilkumar.dora@windriver.com>
The Linux custom baud rate implementation previously accessed the
struct termios members c_ispeed and c_ospeed directly. These fields
exist in glibc but are not exposed by musl, causing builds to fail on
musl-based systems.
Update set_custom_baudrate_linux to use a capability-based approach,
with three distinct code paths:
1) If POSIX cfsetispeed/cfsetospeed accept arbitrary baud rates
(HAVE_CFSETSPEED_ARBITRARY), use them to set input and output
speeds.
2) Else if Linux termios2 interface is available (TCGETS2/BOTHER),
use it to support arbitrary baud rates.
3) Else if legacy struct termios supports c_ispeed/c_ospeed, use
the TCGETS/TCSETS fallback (primarily for glibc on older
architectures).
4) Otherwise, emit an error indicating that custom baud rates are
unsupported on this platform.
This preserves existing behavior on glibc systems while restoring
build compatibility with musl and other libc implementations.
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>
---
**Changes since V2**
- Renamed Autoconf check to HAVE_CFSETSPEED_ARBITRARY
- Prefer POSIX cfsetispeed/cfsetospeed when arbitrary baud rates are supported
- Fall back to Linux termios2 (TCGETS2/BOTHER) interface if needed
- Retain legacy TCGETS fallback for glibc systems with c_ispeed/c_ospeed
- Simplified capability/fallback logic
- Replaced incorrect perror_with_name() with error()
gdb/NEWS | 4 ++++
gdb/config.in | 6 ++++++
gdb/configure | 52 +++++++++++++++++++++++++++++++++++++++++++++
gdb/configure.ac | 22 +++++++++++++++++++
gdb/ser-unix.c | 55 ++++++++++++++++++++++++++++++++++--------------
5 files changed, 123 insertions(+), 16 deletions(-)
diff --git a/gdb/NEWS b/gdb/NEWS
index e46a5108272..0c69da084de 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -36,6 +36,10 @@
subsequent runs of the inferior will use the same arguments as the
first run.
+* GDB detects whether the host cfsetispeed/cfsetospeed functions accept
+ arbitrary baud rates. If not, GDB falls back to Linux-specific termios
+ interfaces to support custom baud rates.
+
* Support for stabs debug information has been removed.
* Support for mdebug debug information has been removed.
diff --git a/gdb/config.in b/gdb/config.in
index b11fcf18372..b7aacab898a 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -110,6 +110,9 @@
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+/* Define if cfsetispeed/cfsetospeed accept arbitrary baud rates */
+#undef HAVE_CFSETSPEED_ARBITRARY
+
/* Define to 1 if you have the `clearenv' function. */
#undef HAVE_CLEARENV
@@ -517,6 +520,9 @@
/* Define to 1 if `st_blocks' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
+/* Define to 1 if `c_ospeed' is a member of `struct termios'. */
+#undef HAVE_STRUCT_TERMIOS_C_OSPEED
+
/* Define to 1 if `td_pcb' is a member of `struct thread'. */
#undef HAVE_STRUCT_THREAD_TD_PCB
diff --git a/gdb/configure b/gdb/configure
index 12c54521682..ef2ee9f72ec 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -27728,6 +27728,58 @@ if test "$ac_res" != no; then :
fi
+# Check whether cfsetispeed/cfsetospeed accept arbitrary baud rates.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cfsetispeed/cfsetospeed accept arbitrary baud rates" >&5
+$as_echo_n "checking whether cfsetispeed/cfsetospeed accept arbitrary baud rates... " >&6; }
+if ${gdb_cv_cfsetspeed_arbitrary+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <termios.h>
+int
+main ()
+{
+
+ #if B9600 != 9600
+ #error B-constants are not numeric symbols
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gdb_cv_cfsetspeed_arbitrary=yes
+else
+ gdb_cv_cfsetspeed_arbitrary=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cfsetspeed_arbitrary" >&5
+$as_echo "$gdb_cv_cfsetspeed_arbitrary" >&6; }
+
+if test "$gdb_cv_cfsetspeed_arbitrary" = yes; then
+
+$as_echo "#define HAVE_CFSETSPEED_ARBITRARY 1" >>confdefs.h
+
+fi
+
+# Check for members required by the legacy Linux custom baud rate path.
+ac_fn_c_check_member "$LINENO" "struct termios" "c_ospeed" "ac_cv_member_struct_termios_c_ospeed" "#include <termios.h>
+"
+if test "x$ac_cv_member_struct_termios_c_ospeed" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TERMIOS_C_OSPEED 1
+_ACEOF
+
+
+fi
+
+
# Check whether --with-jit-reader-dir was given.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index cf8078e1d89..e558cf44703 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -725,6 +725,28 @@ AC_CONFIG_FILES([jit-reader.h:jit-reader.in])
AC_SEARCH_LIBS(dlopen, dl)
+# Check whether cfsetispeed/cfsetospeed accept arbitrary baud rates.
+AC_CACHE_CHECK([whether cfsetispeed/cfsetospeed accept arbitrary baud rates],
+ [gdb_cv_cfsetspeed_arbitrary], [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <termios.h>]],
+ [[
+ #if B9600 != 9600
+ #error B-constants are not numeric symbols
+ #endif
+ ]])],
+ [gdb_cv_cfsetspeed_arbitrary=yes],
+ [gdb_cv_cfsetspeed_arbitrary=no])
+])
+
+if test "$gdb_cv_cfsetspeed_arbitrary" = yes; then
+ AC_DEFINE([HAVE_CFSETSPEED_ARBITRARY], [1],
+ [Define if cfsetispeed/cfsetospeed accept arbitrary baud rates])
+fi
+
+# Check for members required by the legacy Linux custom baud rate path.
+AC_CHECK_MEMBERS([struct termios.c_ospeed], [], [], [[#include <termios.h>]])
+
GDB_AC_WITH_DIR([JIT_READER_DIR], [jit-reader-dir],
[directory to load the JIT readers from],
[${libdir}/gdb])
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index c295a9c5ba1..a15f4cc2162 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -510,36 +510,59 @@ set_baudcode_baudrate (struct serial *scb, int baud_code)
#if HAVE_CUSTOM_BAUDRATE_SUPPORT && defined(BOTHER)
-/* Set a custom baud rate using the termios BOTHER. */
+/* Set a custom baud rate.
+
+ Prefer the POSIX cfsetispeed/cfsetospeed interface when it accepts
+ arbitrary baud rates. Otherwise fall back to Linux-specific termios2
+ (BOTHER) or legacy termios interfaces. */
static void
set_custom_baudrate_linux (int fd, int rate)
{
-#ifdef TCGETS2
- struct termios2 tio;
- const unsigned long req_get = TCGETS2;
- const unsigned long req_set = TCSETS2;
-#else
+#if defined(HAVE_CFSETSPEED_ARBITRARY)
struct termios tio;
- const unsigned long req_get = TCGETS;
- const unsigned long req_set = TCSETS;
-#endif
+ if (tcgetattr (fd, &tio) < 0)
+ perror_with_name (_("Cannot get current baud rate"));
+
+ cfsetispeed (&tio, rate);
+ cfsetospeed (&tio, rate);
+
+ if (tcsetattr (fd, TCSANOW, &tio) < 0)
+ perror_with_name (_("Cannot set custom baud rate"));
+
+#elif defined(TCGETS2)
+ struct termios2 tio2;
+ if (ioctl (fd, TCGETS2, &tio2) < 0)
+ perror_with_name (_("Cannot get current baud rate"));
+
+ tio2.c_cflag &= ~CBAUD;
+ tio2.c_cflag |= BOTHER;
+ tio2.c_ospeed = rate;
+ tio2.c_cflag &= ~(CBAUD << IBSHIFT);
+ tio2.c_cflag |= BOTHER << IBSHIFT;
+ tio2.c_ispeed = rate;
- if (ioctl (fd, req_get, &tio) < 0)
- perror_with_name (_("Can not get current baud rate"));
+ if (ioctl (fd, TCSETS2, &tio2) < 0)
+ perror_with_name (_("Cannot set custom baud rate"));
+
+#elif defined(HAVE_STRUCT_TERMIOS_C_OSPEED)
+ struct termios tio;
+ if (ioctl (fd, TCGETS, &tio) < 0)
+ perror_with_name (_("Cannot get current baud rate"));
- /* Clear the current output baud rate and fill a new value. */
tio.c_cflag &= ~CBAUD;
tio.c_cflag |= BOTHER;
tio.c_ospeed = rate;
-
- /* Clear the current input baud rate and fill a new value. */
tio.c_cflag &= ~(CBAUD << IBSHIFT);
tio.c_cflag |= BOTHER << IBSHIFT;
tio.c_ispeed = rate;
- if (ioctl (fd, req_set, &tio) < 0)
- perror_with_name (_("Can not set custom baud rate"));
+ if (ioctl (fd, TCSETS, &tio) < 0)
+ perror_with_name (_("Cannot set custom baud rate"));
+
+#else
+ error (_("Custom baud rate not supported on this platform"));
+#endif
}
#elif HAVE_CUSTOM_BAUDRATE_SUPPORT && defined(IOSSIOSPEED)
--
2.49.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3] PR gdb/33747: gdb/ser-unix: modernize Linux custom baud rate support
2026-03-12 21:01 [PATCH V3] PR gdb/33747: gdb/ser-unix: modernize Linux custom baud rate support sunilkumar.dora
@ 2026-03-19 22:44 ` Kevin Buettner
2026-03-22 19:49 ` Sunil Kumar Dora
2026-03-20 1:24 ` Maciej W. Rozycki
1 sibling, 1 reply; 5+ messages in thread
From: Kevin Buettner @ 2026-03-19 22:44 UTC (permalink / raw)
To: sunilkumar.dora
Cc: gdb-patches, macro, Randy.MacLeod, Sundeep.Kokkonda, schwab,
tromey, simark
On Thu, 12 Mar 2026 14:01:06 -0700
sunilkumar.dora@windriver.com wrote:
> diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
> index c295a9c5ba1..a15f4cc2162 100644
> --- a/gdb/ser-unix.c
> +++ b/gdb/ser-unix.c
> @@ -510,36 +510,59 @@ set_baudcode_baudrate (struct serial *scb, int
> baud_code)
> #if HAVE_CUSTOM_BAUDRATE_SUPPORT && defined(BOTHER)
>
> -/* Set a custom baud rate using the termios BOTHER. */
> +/* Set a custom baud rate.
> +
> + Prefer the POSIX cfsetispeed/cfsetospeed interface when it accepts
> + arbitrary baud rates. Otherwise fall back to Linux-specific termios2
> + (BOTHER) or legacy termios interfaces. */
>
> static void
> set_custom_baudrate_linux (int fd, int rate)
> {
> -#ifdef TCGETS2
> - struct termios2 tio;
> - const unsigned long req_get = TCGETS2;
> - const unsigned long req_set = TCSETS2;
> -#else
> +#if defined(HAVE_CFSETSPEED_ARBITRARY)
Can you add a comment about how this code path is supported by glibc
2.42+ ? You could also mention that this behavior is expected to be
standardized by a future POSIX revision.
> struct termios tio;
> - const unsigned long req_get = TCGETS;
> - const unsigned long req_set = TCSETS;
> -#endif
> + if (tcgetattr (fd, &tio) < 0)
> + perror_with_name (_("Cannot get current baud rate"));
> +
> + cfsetispeed (&tio, rate);
> + cfsetospeed (&tio, rate);
Return values for cfsetispeed and cfsetospeed should be checked. If
either call fails, it should either error out or try another way of
setting the speed.
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3] PR gdb/33747: gdb/ser-unix: modernize Linux custom baud rate support
2026-03-12 21:01 [PATCH V3] PR gdb/33747: gdb/ser-unix: modernize Linux custom baud rate support sunilkumar.dora
2026-03-19 22:44 ` Kevin Buettner
@ 2026-03-20 1:24 ` Maciej W. Rozycki
2026-03-22 19:55 ` Sunil Kumar Dora
1 sibling, 1 reply; 5+ messages in thread
From: Maciej W. Rozycki @ 2026-03-20 1:24 UTC (permalink / raw)
To: sunilkumar.dora
Cc: gdb-patches, Kevin Buettner, Randy.MacLeod, Sundeep.Kokkonda,
schwab, tromey, Simon Marchi
On Thu, 12 Mar 2026, sunilkumar.dora@windriver.com wrote:
> diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
> index c295a9c5ba1..a15f4cc2162 100644
> --- a/gdb/ser-unix.c
> +++ b/gdb/ser-unix.c
> @@ -510,36 +510,59 @@ set_baudcode_baudrate (struct serial *scb, int baud_code)
>
> #if HAVE_CUSTOM_BAUDRATE_SUPPORT && defined(BOTHER)
>
> -/* Set a custom baud rate using the termios BOTHER. */
> +/* Set a custom baud rate.
> +
> + Prefer the POSIX cfsetispeed/cfsetospeed interface when it accepts
> + arbitrary baud rates. Otherwise fall back to Linux-specific termios2
> + (BOTHER) or legacy termios interfaces. */
>
> static void
> set_custom_baudrate_linux (int fd, int rate)
> {
> -#ifdef TCGETS2
> - struct termios2 tio;
> - const unsigned long req_get = TCGETS2;
> - const unsigned long req_set = TCSETS2;
> -#else
> +#if defined(HAVE_CFSETSPEED_ARBITRARY)
> struct termios tio;
> - const unsigned long req_get = TCGETS;
> - const unsigned long req_set = TCSETS;
> -#endif
> + if (tcgetattr (fd, &tio) < 0)
> + perror_with_name (_("Cannot get current baud rate"));
> +
> + cfsetispeed (&tio, rate);
> + cfsetospeed (&tio, rate);
> +
> + if (tcsetattr (fd, TCSANOW, &tio) < 0)
> + perror_with_name (_("Cannot set custom baud rate"));
It doesn't appear to me this code should be wrapped in:
#if ... && defined(BOTHER)
or for that matter be a part of `set_custom_baudrate_linux' (which AFAICT
should be left alone, or please point me at what actually you have changed
there that is not pure code massaging) as this is now platform-agnostic
(and I believe GNU Hurd has always supported arbitrary baud rates using
this interface). I'm leaving it up to you to come up with a name for this
new variant of the function.
Also ISTM that HAVE_CUSTOM_BAUDRATE_SUPPORT now also needs to be set if
HAVE_CFSETSPEED_ARBITRARY rather than relying on BOTHER to be defined as
well, which may not necessarily be the case (cf. GNU Hurd again).
> +#else
> + error (_("Custom baud rate not supported on this platform"));
> +#endif
This shouldn't be needed as this code is not supposed to be ever compiled
if !HAVE_CUSTOM_BAUDRATE_SUPPORT (IOW don't set the macro instead if the
conditions required are not met).
Maciej
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3] PR gdb/33747: gdb/ser-unix: modernize Linux custom baud rate support
2026-03-19 22:44 ` Kevin Buettner
@ 2026-03-22 19:49 ` Sunil Kumar Dora
0 siblings, 0 replies; 5+ messages in thread
From: Sunil Kumar Dora @ 2026-03-22 19:49 UTC (permalink / raw)
To: Kevin Buettner
Cc: gdb-patches, macro, Randy.MacLeod, Sundeep.Kokkonda, schwab,
tromey, simark
Thanks Kevin.
On 3/20/2026 4:14 AM, Kevin Buettner wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Thu, 12 Mar 2026 14:01:06 -0700
> sunilkumar.dora@windriver.com wrote:
>
>> diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
>> index c295a9c5ba1..a15f4cc2162 100644
>> --- a/gdb/ser-unix.c
>> +++ b/gdb/ser-unix.c
>> @@ -510,36 +510,59 @@ set_baudcode_baudrate (struct serial *scb, int
>> baud_code)
>> #if HAVE_CUSTOM_BAUDRATE_SUPPORT && defined(BOTHER)
>>
>> -/* Set a custom baud rate using the termios BOTHER. */
>> +/* Set a custom baud rate.
>> +
>> + Prefer the POSIX cfsetispeed/cfsetospeed interface when it accepts
>> + arbitrary baud rates. Otherwise fall back to Linux-specific termios2
>> + (BOTHER) or legacy termios interfaces. */
>>
>> static void
>> set_custom_baudrate_linux (int fd, int rate)
>> {
>> -#ifdef TCGETS2
>> - struct termios2 tio;
>> - const unsigned long req_get = TCGETS2;
>> - const unsigned long req_set = TCSETS2;
>> -#else
>> +#if defined(HAVE_CFSETSPEED_ARBITRARY)
> Can you add a comment about how this code path is supported by glibc
> 2.42+ ? You could also mention that this behavior is expected to be
> standardized by a future POSIX revision.
In V4:
- set_custom_baudrate_posix() has a comment added as suggested,
including the glibc 2.42+ support and future POSIX direction.
>
>> struct termios tio;
>> - const unsigned long req_get = TCGETS;
>> - const unsigned long req_set = TCSETS;
>> -#endif
>> + if (tcgetattr (fd, &tio) < 0)
>> + perror_with_name (_("Cannot get current baud rate"));
>> +
>> + cfsetispeed (&tio, rate);
>> + cfsetospeed (&tio, rate);
> Return values for cfsetispeed and cfsetospeed should be checked. If
> either call fails, it should either error out or try another way of
> setting the speed.
Return values of cfsetispeed() and cfsetospeed() are now checked, with
perror_with_name()
called on failure in V4.
Thanks,
Sunil Dora
>
> Kevin
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3] PR gdb/33747: gdb/ser-unix: modernize Linux custom baud rate support
2026-03-20 1:24 ` Maciej W. Rozycki
@ 2026-03-22 19:55 ` Sunil Kumar Dora
0 siblings, 0 replies; 5+ messages in thread
From: Sunil Kumar Dora @ 2026-03-22 19:55 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: gdb-patches, Kevin Buettner, Randy.MacLeod, Sundeep.Kokkonda,
schwab, tromey, Simon Marchi
Thanks Maciej.
On 3/20/2026 6:54 AM, Maciej W. Rozycki wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Thu, 12 Mar 2026, sunilkumar.dora@windriver.com wrote:
>
>> diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
>> index c295a9c5ba1..a15f4cc2162 100644
>> --- a/gdb/ser-unix.c
>> +++ b/gdb/ser-unix.c
>> @@ -510,36 +510,59 @@ set_baudcode_baudrate (struct serial *scb, int baud_code)
>>
>> #if HAVE_CUSTOM_BAUDRATE_SUPPORT && defined(BOTHER)
>>
>> -/* Set a custom baud rate using the termios BOTHER. */
>> +/* Set a custom baud rate.
>> +
>> + Prefer the POSIX cfsetispeed/cfsetospeed interface when it accepts
>> + arbitrary baud rates. Otherwise fall back to Linux-specific termios2
>> + (BOTHER) or legacy termios interfaces. */
>>
>> static void
>> set_custom_baudrate_linux (int fd, int rate)
>> {
>> -#ifdef TCGETS2
>> - struct termios2 tio;
>> - const unsigned long req_get = TCGETS2;
>> - const unsigned long req_set = TCSETS2;
>> -#else
>> +#if defined(HAVE_CFSETSPEED_ARBITRARY)
>> struct termios tio;
>> - const unsigned long req_get = TCGETS;
>> - const unsigned long req_set = TCSETS;
>> -#endif
>> + if (tcgetattr (fd, &tio) < 0)
>> + perror_with_name (_("Cannot get current baud rate"));
>> +
>> + cfsetispeed (&tio, rate);
>> + cfsetospeed (&tio, rate);
>> +
>> + if (tcsetattr (fd, TCSANOW, &tio) < 0)
>> + perror_with_name (_("Cannot set custom baud rate"));
> It doesn't appear to me this code should be wrapped in:
>
> #if ... && defined(BOTHER)
>
> or for that matter be a part of `set_custom_baudrate_linux' (which AFAICT
> should be left alone, or please point me at what actually you have changed
> there that is not pure code massaging) as this is now platform-agnostic
> (and I believe GNU Hurd has always supported arbitrary baud rates using
> this interface). I'm leaving it up to you to come up with a name for this
> new variant of the function.
>
> Also ISTM that HAVE_CUSTOM_BAUDRATE_SUPPORT now also needs to be set if
> HAVE_CFSETSPEED_ARBITRARY rather than relying on BOTHER to be defined as
> well, which may not necessarily be the case (cf. GNU Hurd again).
To clarify the change in set_custom_baudrate_linux: on musl-based
systems BOTHER is visible via <asm/termbits.h>, included through the
HAVE_ASM_TERMIOS_H path in ser-unix.c, so the function does get
compiled. The #else branch then fails to compile because musl's
struct termios exposes the speed fields only as private
__c_ispeed/__c_ospeed, not as c_ispeed/c_ospeed.
Following your suggestion, the fix belongs at the macro level.
Requiring HAVE_STRUCT_TERMIOS_C_OSPEED alongside BOTHER in the
HAVE_CUSTOM_BAUDRATE_SUPPORT guard ensures the Linux path is simply
not compiled on musl systems where those fields are unavailable,
leaving set_custom_baudrate_linux completely unchanged.
In V4:
- set_custom_baudrate_linux is left completely unchanged.
- HAVE_CUSTOM_BAUDRATE_SUPPORT is updated to require
HAVE_STRUCT_TERMIOS_C_OSPEED alongside BOTHER, so the Linux
path is not compiled on musl where struct termios lacks those
fields.
- New independent function set_custom_baudrate_posix(), guarded
by #if HAVE_CFSETSPEED_ARBITRARY, outside the defined(BOTHER)
block, covering systems like GNU Hurd.
- HAVE_CUSTOM_BAUDRATE_SUPPORT extended to also fire when
HAVE_CFSETSPEED_ARBITRARY is defined.
- The #else error() fallback is removed. Unsupported platforms
are already handled in rate_to_code() and
hardwire_setbaudrate().
V4 will be posted shortly.
>
>> +#else
>> + error (_("Custom baud rate not supported on this platform"));
>> +#endif
> This shouldn't be needed as this code is not supposed to be ever compiled
> if !HAVE_CUSTOM_BAUDRATE_SUPPORT (IOW don't set the macro instead if the
> conditions required are not met).
Fixed in V4.
Thanks,
Sunil Dora
>
> Maciej
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-22 19:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-12 21:01 [PATCH V3] PR gdb/33747: gdb/ser-unix: modernize Linux custom baud rate support sunilkumar.dora
2026-03-19 22:44 ` Kevin Buettner
2026-03-22 19:49 ` Sunil Kumar Dora
2026-03-20 1:24 ` Maciej W. Rozycki
2026-03-22 19:55 ` Sunil Kumar Dora
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox