[v2,8/8] gdbserver: remove handling of the 'L' tracepoint action

Message ID 20250110-upstream-gdbserver-remove-ust-v2-8-1ab116ffe592@intel.com
State New
Headers
Series Remove UST (static tracepoint) support from gdbserver |

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

Tankut Baris Aktemur Jan. 10, 2025, 4:01 p.m. UTC
  Now that static tracepoint support is removed from gdbserver, it makes
sense to remove handling of the 'L' tracepoint action, too.  The code
that checks received actions already has a default case that tolerates
unrecognized actions:

        default:
          trace_debug ("unknown trace action '%c', ignoring...", *act);

In case 'L' is unexpectedly received, we would at least be able to see
this in the logs.
---
 gdbserver/tracepoint.cc | 46 ----------------------------------------------
 1 file changed, 46 deletions(-)
  

Comments

Simon Marchi Jan. 14, 2025, 4:53 a.m. UTC | #1
On 2025-01-10 11:01, Tankut Baris Aktemur wrote:
> Now that static tracepoint support is removed from gdbserver, it makes
> sense to remove handling of the 'L' tracepoint action, too.  The code
> that checks received actions already has a default case that tolerates
> unrecognized actions:
> 
>         default:
>           trace_debug ("unknown trace action '%c', ignoring...", *act);
> 
> In case 'L' is unexpectedly received, we would at least be able to see
> this in the logs.

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon
  

Patch

diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index bbce1f939920bcf4769761029d88a76a69f638d6..2203b6242a7ec5bf3a627f382a7793e8fdebd15b 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -435,12 +435,6 @@  struct eval_expr_action
   struct agent_expr *expr;
 };
 
-/* An 'L' (collect static trace data) action.  */
-struct collect_static_trace_data_action
-{
-  struct tracepoint_action base;
-};
-
 #ifndef IN_PROCESS_AGENT
 static CORE_ADDR
 m_tracepoint_action_download (const struct tracepoint_action *action)
@@ -532,24 +526,6 @@  x_tracepoint_action_send ( char *buffer, const struct tracepoint_action *action)
   return agent_expr_send (buffer, eaction->expr);
 }
 
-static CORE_ADDR
-l_tracepoint_action_download (const struct tracepoint_action *action)
-{
-  CORE_ADDR ipa_action
-    = target_malloc (sizeof (struct collect_static_trace_data_action));
-
-  target_write_memory (ipa_action, (unsigned char *) action,
-			 sizeof (struct collect_static_trace_data_action));
-
-  return ipa_action;
-}
-
-static char *
-l_tracepoint_action_send (char *buffer, const struct tracepoint_action *action)
-{
-  return buffer;
-}
-
 static char *
 tracepoint_action_send (char *buffer, const struct tracepoint_action *action)
 {
@@ -561,8 +537,6 @@  tracepoint_action_send (char *buffer, const struct tracepoint_action *action)
       return r_tracepoint_action_send (buffer, action);
     case 'X':
       return x_tracepoint_action_send (buffer, action);
-    case 'L':
-      return l_tracepoint_action_send (buffer, action);
     }
   error ("Unknown trace action '%c'.", action->type);
 }
@@ -578,8 +552,6 @@  tracepoint_action_download (const struct tracepoint_action *action)
       return r_tracepoint_action_download (action);
     case 'X':
       return x_tracepoint_action_download (action);
-    case 'L':
-      return l_tracepoint_action_download (action);
     }
   error ("Unknown trace action '%c'.", action->type);
 }
@@ -1863,18 +1835,6 @@  add_tracepoint_action (struct tracepoint *tpoint, const char *packet)
 	      ++act;
 	    break;
 	  }
-	case 'L':
-	  {
-	    struct collect_static_trace_data_action *raction =
-	      XNEW (struct collect_static_trace_data_action);
-
-	    raction->base.type = *act;
-	    action = &raction->base;
-
-	    trace_debug ("Want to collect static trace data");
-	    ++act;
-	    break;
-	  }
 	case 'S':
 	  trace_debug ("Unexpected step action, ignoring");
 	  ++act;
@@ -4554,12 +4514,6 @@  do_action_at_tracepoint (struct tracepoint_hit_ctx *ctx,
 	  }
       }
       break;
-    case 'L':
-      {
-	trace_debug ("warning: collecting static trace data, "
-		     "but static tracepoints are not supported");
-      }
-      break;
     default:
       trace_debug ("unknown trace action '%c', ignoring", taction->type);
       break;