Remove redundant macro definitions from remote.c

Message ID 20240724153307.483934-1-tromey@adacore.com
State New
Headers
Series Remove redundant macro definitions from remote.c |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged

Commit Message

Tom Tromey July 24, 2024, 3:33 p.m. UTC
  I happened to notice that a few macros are defined twice in remote.c.
This patch removes one copy.  Tested by rebuilding.
---
 gdb/remote.c | 11 -----------
 1 file changed, 11 deletions(-)
  

Comments

Tom de Vries July 24, 2024, 3:43 p.m. UTC | #1
On 7/24/24 17:33, Tom Tromey wrote:
> I happened to notice that a few macros are defined twice in remote.c.
> This patch removes one copy.  Tested by rebuilding.

Hi,

I see you kept the copy that has documentation for each tag.

OTOH, it removes the FIXME, so I suppose you don't consider that worthwhile.

Reviewed-By: Tom de Vries <tdevries@suse.de>

Thanks,
- Tom

> ---
>   gdb/remote.c | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/gdb/remote.c b/gdb/remote.c
> index 0fd45cc96c9..4948a54e322 100644
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -3378,17 +3378,6 @@ struct gdb_ext_thread_info
>   				   whatever.  */
>     };
>   
> -/* The volume of remote transfers can be limited by submitting
> -   a mask containing bits specifying the desired information.
> -   Use a union of these values as the 'selection' parameter to
> -   get_thread_info.  FIXME: Make these TAG names more thread specific.  */
> -
> -#define TAG_THREADID 1
> -#define TAG_EXISTS 2
> -#define TAG_DISPLAY 4
> -#define TAG_THREADNAME 8
> -#define TAG_MOREDISPLAY 16
> -
>   #define BUF_THREAD_ID_SIZE (OPAQUETHREADBYTES * 2)
>   
>   static const char *unpack_nibble (const char *buf, int *val);
  
Tom Tromey July 24, 2024, 3:52 p.m. UTC | #2
Tom> OTOH, it removes the FIXME, so I suppose you don't consider that
Tom> worthwhile.

Yeah - it didn't really make sense to me and I think this code is in
support of a deprecated packet.

Tom
  

Patch

diff --git a/gdb/remote.c b/gdb/remote.c
index 0fd45cc96c9..4948a54e322 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -3378,17 +3378,6 @@  struct gdb_ext_thread_info
 				   whatever.  */
   };
 
-/* The volume of remote transfers can be limited by submitting
-   a mask containing bits specifying the desired information.
-   Use a union of these values as the 'selection' parameter to
-   get_thread_info.  FIXME: Make these TAG names more thread specific.  */
-
-#define TAG_THREADID 1
-#define TAG_EXISTS 2
-#define TAG_DISPLAY 4
-#define TAG_THREADNAME 8
-#define TAG_MOREDISPLAY 16
-
 #define BUF_THREAD_ID_SIZE (OPAQUETHREADBYTES * 2)
 
 static const char *unpack_nibble (const char *buf, int *val);