On Tuesday, January 14, 2025 5:12 AM, Simon Marchi wrote:
> On 2025-01-10 11:01, Tankut Baris Aktemur wrote:
> > Remove the announcement that qXfer:statictrace:read is supported.
>
> `StaticTracepoints` too?
>
> > Associated to this, remove the handling of "qTfSTM", "qTsSTM",
> > and "qTSTMat" packets.
>
> And the qXfer:statictrace:read handling.
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
>
> Simon
I updated the commit message according to your comments.
Thank you.
-Baris
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
@@ -1965,29 +1965,6 @@ handle_qxfer_siginfo (const char *annex,
return the_target->qxfer_siginfo (annex, readbuf, writebuf, offset, len);
}
-/* Handle qXfer:statictrace:read. */
-
-static int
-handle_qxfer_statictrace (const char *annex,
- gdb_byte *readbuf, const gdb_byte *writebuf,
- ULONGEST offset, LONGEST len)
-{
- client_state &cs = get_client_state ();
- ULONGEST nbytes;
-
- if (writebuf != NULL)
- return -2;
-
- if (annex[0] != '\0' || current_thread == NULL
- || cs.current_traceframe == -1)
- return -1;
-
- if (traceframe_read_sdata (cs.current_traceframe, offset,
- readbuf, len, &nbytes))
- return -1;
- return nbytes;
-}
-
/* Helper for handle_qxfer_threads_proper.
Emit the XML to describe the thread of INF. */
@@ -2324,7 +2301,6 @@ static const struct qxfer qxfer_packets[] =
{ "libraries-svr4", handle_qxfer_libraries_svr4 },
{ "osdata", handle_qxfer_osdata },
{ "siginfo", handle_qxfer_siginfo },
- { "statictrace", handle_qxfer_statictrace },
{ "threads", handle_qxfer_threads },
{ "traceframe-info", handle_qxfer_traceframe_info },
};
@@ -2842,9 +2818,7 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
strcat (own_buf, ";DisconnectedTracing+");
if (gdb_supports_qRelocInsn && target_supports_fast_tracepoints ())
strcat (own_buf, ";FastTracepoints+");
- strcat (own_buf, ";StaticTracepoints+");
strcat (own_buf, ";InstallInTrace+");
- strcat (own_buf, ";qXfer:statictrace:read+");
strcat (own_buf, ";qXfer:traceframe-info:read+");
strcat (own_buf, ";EnableDisableTracepoints+");
strcat (own_buf, ";QTBuffer:size+");
@@ -3791,33 +3791,6 @@ cmd_qtsv (char *packet)
strcpy (packet, "l");
}
-/* Return the first static tracepoint marker, and initialize the state
- machine that will iterate through all the static tracepoints
- markers. */
-
-static void
-cmd_qtfstm (char *packet)
-{
- write_e_static_tracepoints_not_supported (packet);
-}
-
-/* Return additional static tracepoints markers. */
-
-static void
-cmd_qtsstm (char *packet)
-{
- write_e_static_tracepoints_not_supported (packet);
-}
-
-/* Return the definition of the static tracepoint at a given address.
- Result packet is the same as qTsST's. */
-
-static void
-cmd_qtstmat (char *packet)
-{
- write_e_static_tracepoints_not_supported (packet);
-}
-
/* Sent the agent a command to close it. */
void
@@ -4133,21 +4106,6 @@ handle_tracepoint_query (char *packet)
cmd_qtbuffer (packet);
return 1;
}
- else if (strcmp ("qTfSTM", packet) == 0)
- {
- cmd_qtfstm (packet);
- return 1;
- }
- else if (strcmp ("qTsSTM", packet) == 0)
- {
- cmd_qtsstm (packet);
- return 1;
- }
- else if (startswith (packet, "qTSTMat:"))
- {
- cmd_qtstmat (packet);
- return 1;
- }
else if (strcmp ("qTMinFTPILen", packet) == 0)
{
cmd_qtminftpilen (packet);
@@ -5176,59 +5134,6 @@ traceframe_read_tsv (int tsvnum, LONGEST *val)
return !found;
}
-/* Read a requested block of static tracepoint data from a trace
- frame. */
-
-int
-traceframe_read_sdata (int tfnum, ULONGEST offset,
- unsigned char *buf, ULONGEST length,
- ULONGEST *nbytes)
-{
- struct traceframe *tframe;
- unsigned char *database, *dataptr;
- unsigned int datasize;
- unsigned short mlen;
-
- trace_debug ("traceframe_read_sdata");
-
- tframe = find_traceframe (tfnum);
-
- if (!tframe)
- {
- trace_debug ("traceframe %d not found", tfnum);
- return 1;
- }
-
- datasize = tframe->data_size;
- database = &tframe->data[0];
-
- /* Iterate through a traceframe's blocks, looking for static
- tracepoint data. */
- dataptr = traceframe_find_block_type (database, datasize,
- tfnum, 'S');
- if (dataptr != NULL)
- {
- memcpy (&mlen, dataptr, sizeof (mlen));
- dataptr += sizeof (mlen);
- if (offset < mlen)
- {
- if (offset + length > mlen)
- length = mlen - offset;
-
- memcpy (buf, dataptr, length);
- *nbytes = length;
- }
- else
- *nbytes = 0;
- return 0;
- }
-
- trace_debug ("traceframe %d has no static trace data", tfnum);
-
- *nbytes = 0;
- return 0;
-}
-
/* Callback for traceframe_walk_blocks. Builds a traceframe-info
object. DATA is pointer to a string holding the traceframe-info
object being built. */
@@ -87,10 +87,6 @@ int fetch_traceframe_registers (int tfnum,
struct regcache *regcache,
int regnum);
-int traceframe_read_sdata (int tfnum, ULONGEST offset,
- unsigned char *buf, ULONGEST length,
- ULONGEST *nbytes);
-
int traceframe_read_info (int tfnum, std::string *buffer);
/* If a thread is determined to be collecting a fast tracepoint, this