[PATCHv6,1/2] gdb: unix: extend supported baudrate B_codes

Message ID 3fd5322643b5e71f63baf29f433b0917932ba988.camel@espressif.com
State New
Headers
Series [PATCHv6,1/2] gdb: unix: extend supported baudrate B_codes |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed

Commit Message

Alexey Lapshin April 9, 2025, 4:17 p.m. UTC
  Added B_codes that may be supported in some unix systems
---
 gdb/ser-unix.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

-- 
2.43.0
  

Comments

Simon Marchi April 11, 2025, 3:14 p.m. UTC | #1
On 4/9/25 12:17 PM, Alexey Lapshin wrote:
> Added B_codes that may be supported in some unix systems
> ---
>  gdb/ser-unix.c | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
> index cb803a58593..4d035fc9f7a 100644
> --- a/gdb/ser-unix.c
> +++ b/gdb/ser-unix.c
> @@ -289,10 +289,28 @@ baudtab[] =
>      4800, B4800
>    }
>    ,
> +#ifdef B7200
> +  {
> +    7200, B7200
> +  }
> +  ,
> +#endif
>    {
>      9600, B9600
>    }
>    ,
> +#ifdef B14400
> +  {
> +    14400, B14400
> +  }
> +  ,
> +#endif
> +#ifdef B28800
> +  {
> +    28800, B28800
> +  }
> +  ,
> +#endif
>    {
>      19200, B19200

I guess that 28800 should be below 19200.

Simon
  

Patch

diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index cb803a58593..4d035fc9f7a 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -289,10 +289,28 @@  baudtab[] =
     4800, B4800
   }
   ,
+#ifdef B7200
+  {
+    7200, B7200
+  }
+  ,
+#endif
   {
     9600, B9600
   }
   ,
+#ifdef B14400
+  {
+    14400, B14400
+  }
+  ,
+#endif
+#ifdef B28800
+  {
+    28800, B28800
+  }
+  ,
+#endif
   {
     19200, B19200
   }
@@ -307,6 +325,12 @@  baudtab[] =
   }
   ,
 #endif
+#ifdef B76800
+  {
+    76800, B76800
+  }
+  ,
+#endif
 #ifdef B115200
   {
     115200, B115200