* [RFC] remote.c: Add remote TLS support
@ 2005-03-31 23:20 Kevin Buettner
2005-03-31 23:43 ` Daniel Jacobowitz
2005-04-15 20:09 ` Kevin Buettner
0 siblings, 2 replies; 9+ messages in thread
From: Kevin Buettner @ 2005-03-31 23:20 UTC (permalink / raw)
To: gdb-patches
The patch below adds remote TLS support. It is a rework of the remote.c
portion of a patch posted late last year:
http://sources.redhat.com/ml/gdb-patches/2004-12/msg00169.html
In looking this over myself, the only thing that I find objectionable
is that the new function show_remote_protocol_qGetTLSAddr_packet_cmd()
calls the deprecated function deprecated_show_value_hack(). However,
it doesn't make much sense to me to implement the set/show commands
for the qGetTLSAddr packet differently from the support for the other
protocol packets in remote.c. So, as I see it the alternatives are:
1) Allow this patch in even though it calls a deprecated function.
2) Convert the other functions that currently call
deprecated_show_value_hack() to use some other mechanism. Then,
resubmit this patch so that the new show_... function introduced
in this patch uses the new machinery.
Opinions? If (2) is the preferred route, could someone outline how
the conversion to not use deprecated_show_value_hack() ought to be done?
Kevin
* remote.c (remote_protocol_qGetTLSAddr): New static global variable.
(set_remote_protocol_qGetTLSAddr_packet_cmd)
(show_remote_protocol_qGetTLSAddr_packet_cmd)
(remote_get_thread_local_address): New functions.
(init_all_packet_configs): Initialize remote_protocol_qGetTLSAddr
variable.
(init_remote_ops): Initialize ``to_get_thread_local_address'' in
target vector.
(show_remote_cmd): Call show_remote_protocol_qGetTLS_Addr_packet_cmd().
(_initialize_remote): Add support for the "set remote
get-thread-local-storage-address-packet' and "show remote
get-thread-local-address-packet" commands.
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.179
diff -u -p -r1.179 remote.c
--- remote.c 25 Mar 2005 20:39:45 -0000 1.179
+++ remote.c 31 Mar 2005 21:50:35 -0000
@@ -982,6 +982,25 @@ show_remote_protocol_qPart_auxv_packet_c
show_packet_config_cmd (&remote_protocol_qPart_auxv);
}
+/* Should we try the 'qGetTLSAddr' (Get Thread Local Storage Address) request? */
+static struct packet_config remote_protocol_qGetTLSAddr;
+
+static void
+set_remote_protocol_qGetTLSAddr_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
+{
+ update_packet_config (&remote_protocol_qGetTLSAddr);
+}
+
+static void
+show_remote_protocol_qGetTLSAddr_packet_cmd (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c,
+ const char *value)
+{
+ deprecated_show_value_hack (file, from_tty, c, value);
+ show_packet_config_cmd (&remote_protocol_qGetTLSAddr);
+}
+
static struct packet_config remote_protocol_p;
static void
@@ -2111,6 +2130,7 @@ init_all_packet_configs (void)
downloading. */
update_packet_config (&remote_protocol_binary_download);
update_packet_config (&remote_protocol_qPart_auxv);
+ update_packet_config (&remote_protocol_qGetTLSAddr);
}
/* Symbol look-up. */
@@ -5330,6 +5350,58 @@ remote_pid_to_str (ptid_t ptid)
return buf;
}
+/* Get the address of the thread local variable in OBJFILE which is
+ stored at OFFSET within the thread local storage for thread PTID. */
+
+static CORE_ADDR
+remote_get_thread_local_address (ptid_t ptid, CORE_ADDR lm, CORE_ADDR offset)
+{
+ if (remote_protocol_qGetTLSAddr.support != PACKET_DISABLE)
+ {
+ struct remote_state *rs = get_remote_state ();
+ char *buf = alloca (rs->remote_packet_size);
+ char *p = buf;
+ int status, argcnt;
+ ULONGEST *extra_args;
+
+ strcpy (p, "qGetTLSAddr:");
+ p += strlen (p);
+ p += hexnumstr (p, PIDGET (ptid));
+ *p++ = ',';
+ p += hexnumstr (p, offset);
+ *p++ = ',';
+ p += hexnumstr (p, lm);
+ *p++ = '\0';
+
+ putpkt (buf);
+ getpkt (buf, rs->remote_packet_size, 0);
+ if (packet_ok (buf, &remote_protocol_qGetTLSAddr) == PACKET_OK)
+ {
+ ULONGEST result;
+
+ unpack_varlen_hex (buf, &result);
+ return result;
+ }
+ else
+ {
+ struct exception e
+ = { RETURN_ERROR, TLS_GENERIC_ERROR,
+ "Remote target failed to process qGetTLSAddr request" };
+ throw_exception (e);
+
+ }
+ }
+ else
+ {
+ struct exception e
+ = { RETURN_ERROR, TLS_GENERIC_ERROR,
+ "TLS not supported or disabled on this target" };
+ throw_exception (e);
+ }
+ /* Not reached. */
+ return 0;
+}
+
static void
init_remote_ops (void)
{
@@ -5369,6 +5441,7 @@ Specify the serial device it is connecte
remote_ops.to_stop = remote_stop;
remote_ops.to_xfer_partial = remote_xfer_partial;
remote_ops.to_rcmd = remote_rcmd;
+ remote_ops.to_get_thread_local_address = remote_get_thread_local_address;
remote_ops.to_stratum = process_stratum;
remote_ops.to_has_all_memory = 1;
remote_ops.to_has_memory = 1;
@@ -5544,6 +5617,7 @@ show_remote_cmd (char *args, int from_tt
show_remote_protocol_vcont_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
show_remote_protocol_binary_download_cmd (gdb_stdout, from_tty, NULL, NULL);
show_remote_protocol_qPart_auxv_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
+ show_remote_protocol_qGetTLSAddr_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
}
static void
@@ -5774,6 +5848,13 @@ Show the maximum size of the address (in
&remote_set_cmdlist, &remote_show_cmdlist,
0);
+ add_packet_config_cmd (&remote_protocol_qGetTLSAddr,
+ "qGetTLSAddr", "get-thread-local-storage-address",
+ set_remote_protocol_qGetTLSAddr_packet_cmd,
+ show_remote_protocol_qGetTLSAddr_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist,
+ 0);
+
/* Keep the old ``set remote Z-packet ...'' working. */
add_setshow_auto_boolean_cmd ("Z-packet", class_obscure,
&remote_Z_packet_detect, _("\
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] remote.c: Add remote TLS support
2005-03-31 23:20 [RFC] remote.c: Add remote TLS support Kevin Buettner
@ 2005-03-31 23:43 ` Daniel Jacobowitz
2005-04-15 20:09 ` Kevin Buettner
1 sibling, 0 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2005-03-31 23:43 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
On Thu, Mar 31, 2005 at 04:20:17PM -0700, Kevin Buettner wrote:
> 1) Allow this patch in even though it calls a deprecated function.
>
> 2) Convert the other functions that currently call
> deprecated_show_value_hack() to use some other mechanism. Then,
> resubmit this patch so that the new show_... function introduced
> in this patch uses the new machinery.
>
> Opinions? If (2) is the preferred route, could someone outline how
> the conversion to not use deprecated_show_value_hack() ought to be done?
These functions have been on my hit list for a long time. I don't
suppose I could persuade you to do this instead?
3) Unify the six places that have to be modified to add a new
configurable remote packet.
If not, 2) is the way to go, because it's so easy in this case. The
conversion for deprecated_show_value_hack is simple. Take a look at
the ARM patch I posted yesterday, which converted "set arm fpu"; all
that function does is print out a formatted message saying what the
value of the variable is. Replace it with an appropriate printf.
> +/* Get the address of the thread local variable in OBJFILE which is
> + stored at OFFSET within the thread local storage for thread PTID. */
> +
> +static CORE_ADDR
> +remote_get_thread_local_address (ptid_t ptid, CORE_ADDR lm, CORE_ADDR offset)
> +{
> + if (remote_protocol_qGetTLSAddr.support != PACKET_DISABLE)
> + {
> + struct remote_state *rs = get_remote_state ();
> + char *buf = alloca (rs->remote_packet_size);
> + char *p = buf;
> + int status, argcnt;
> + ULONGEST *extra_args;
> +
> + strcpy (p, "qGetTLSAddr:");
> + p += strlen (p);
> + p += hexnumstr (p, PIDGET (ptid));
> + *p++ = ',';
> + p += hexnumstr (p, offset);
> + *p++ = ',';
> + p += hexnumstr (p, lm);
> + *p++ = '\0';
> +
> + putpkt (buf);
> + getpkt (buf, rs->remote_packet_size, 0);
> + if (packet_ok (buf, &remote_protocol_qGetTLSAddr) == PACKET_OK)
> + {
> + ULONGEST result;
> +
> + unpack_varlen_hex (buf, &result);
> + return result;
> + }
> + else
> + {
> + struct exception e
> + = { RETURN_ERROR, TLS_GENERIC_ERROR,
> + "Remote target failed to process qGetTLSAddr request" };
> + throw_exception (e);
> +
> + }
Won't this exception be thrown if the target doesn't support the
operation at all? The first time through the loop we will try to
auto-sense the packet and this is what will happen if the response is
"".
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] remote.c: Add remote TLS support
2005-03-31 23:20 [RFC] remote.c: Add remote TLS support Kevin Buettner
2005-03-31 23:43 ` Daniel Jacobowitz
@ 2005-04-15 20:09 ` Kevin Buettner
2005-04-15 20:12 ` Daniel Jacobowitz
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Kevin Buettner @ 2005-04-15 20:09 UTC (permalink / raw)
To: gdb-patches
On Thu, 31 Mar 2005 16:20:17 -0700
Kevin Buettner <kevinb@redhat.com> wrote:
> The patch below adds remote TLS support. It is a rework of the remote.c
> portion of a patch posted late last year:
>
> http://sources.redhat.com/ml/gdb-patches/2004-12/msg00169.html
>
> In looking this over myself, the only thing that I find objectionable
> is that the new function show_remote_protocol_qGetTLSAddr_packet_cmd()
> calls the deprecated function deprecated_show_value_hack(). However,
> it doesn't make much sense to me to implement the set/show commands
> for the qGetTLSAddr packet differently from the support for the other
> protocol packets in remote.c. So, as I see it the alternatives are:
>
> 1) Allow this patch in even though it calls a deprecated function.
>
> 2) Convert the other functions that currently call
> deprecated_show_value_hack() to use some other mechanism. Then,
> resubmit this patch so that the new show_... function introduced
> in this patch uses the new machinery.
>
> Opinions? If (2) is the preferred route, could someone outline how
> the conversion to not use deprecated_show_value_hack() ought to be done?
I ended up deleting all calls to deprecated_show_value_hack(). As
observed in other discussion, these calls were printing redundant
information. I wish to thank Daniel Jacobowitz for reviewing these
changes.
With that out of the way, I ended up committing the following changes,
only modified slightly from my earlier posting. (It no longer
refers to the deprecated function and I removed some unused variables
that were leftovers from an even earlier version of the work.)
* remote.c (remote_protocol_qGetTLSAddr): New static global variable.
(set_remote_protocol_qGetTLSAddr_packet_cmd)
(show_remote_protocol_qGetTLSAddr_packet_cmd)
(remote_get_thread_local_address): New functions.
(init_all_packet_configs): Initialize remote_protocol_qGetTLSAddr
variable.
(init_remote_ops): Initialize ``to_get_thread_local_address'' in
target vector.
(show_remote_cmd): Call show_remote_protocol_qGetTLS_Addr_packet_cmd().
(_initialize_remote): Register the following commands:
"set remote get-thread-local-storage-address-packet" and
"show remote get-thread-local-address-packet".
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.181
diff -u -p -r1.181 remote.c
--- remote.c 15 Apr 2005 17:44:53 -0000 1.181
+++ remote.c 15 Apr 2005 19:55:11 -0000
@@ -967,6 +967,24 @@ show_remote_protocol_qPart_auxv_packet_c
show_packet_config_cmd (&remote_protocol_qPart_auxv);
}
+/* Should we try the 'qGetTLSAddr' (Get Thread Local Storage Address) request? */
+static struct packet_config remote_protocol_qGetTLSAddr;
+
+static void
+set_remote_protocol_qGetTLSAddr_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
+{
+ update_packet_config (&remote_protocol_qGetTLSAddr);
+}
+
+static void
+show_remote_protocol_qGetTLSAddr_packet_cmd (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c,
+ const char *value)
+{
+ show_packet_config_cmd (&remote_protocol_qGetTLSAddr);
+}
+
static struct packet_config remote_protocol_p;
static void
@@ -2095,6 +2113,7 @@ init_all_packet_configs (void)
downloading. */
update_packet_config (&remote_protocol_binary_download);
update_packet_config (&remote_protocol_qPart_auxv);
+ update_packet_config (&remote_protocol_qGetTLSAddr);
}
/* Symbol look-up. */
@@ -5314,6 +5333,56 @@ remote_pid_to_str (ptid_t ptid)
return buf;
}
+/* Get the address of the thread local variable in OBJFILE which is
+ stored at OFFSET within the thread local storage for thread PTID. */
+
+static CORE_ADDR
+remote_get_thread_local_address (ptid_t ptid, CORE_ADDR lm, CORE_ADDR offset)
+{
+ if (remote_protocol_qGetTLSAddr.support != PACKET_DISABLE)
+ {
+ struct remote_state *rs = get_remote_state ();
+ char *buf = alloca (rs->remote_packet_size);
+ char *p = buf;
+
+ strcpy (p, "qGetTLSAddr:");
+ p += strlen (p);
+ p += hexnumstr (p, PIDGET (ptid));
+ *p++ = ',';
+ p += hexnumstr (p, offset);
+ *p++ = ',';
+ p += hexnumstr (p, lm);
+ *p++ = '\0';
+
+ putpkt (buf);
+ getpkt (buf, rs->remote_packet_size, 0);
+ if (packet_ok (buf, &remote_protocol_qGetTLSAddr) == PACKET_OK)
+ {
+ ULONGEST result;
+
+ unpack_varlen_hex (buf, &result);
+ return result;
+ }
+ else
+ {
+ struct exception e
+ = { RETURN_ERROR, TLS_GENERIC_ERROR,
+ "Remote target failed to process qGetTLSAddr request" };
+ throw_exception (e);
+
+ }
+ }
+ else
+ {
+ struct exception e
+ = { RETURN_ERROR, TLS_GENERIC_ERROR,
+ "TLS not supported or disabled on this target" };
+ throw_exception (e);
+ }
+ /* Not reached. */
+ return 0;
+}
+
static void
init_remote_ops (void)
{
@@ -5353,6 +5422,7 @@ Specify the serial device it is connecte
remote_ops.to_stop = remote_stop;
remote_ops.to_xfer_partial = remote_xfer_partial;
remote_ops.to_rcmd = remote_rcmd;
+ remote_ops.to_get_thread_local_address = remote_get_thread_local_address;
remote_ops.to_stratum = process_stratum;
remote_ops.to_has_all_memory = 1;
remote_ops.to_has_memory = 1;
@@ -5528,6 +5598,7 @@ show_remote_cmd (char *args, int from_tt
show_remote_protocol_vcont_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
show_remote_protocol_binary_download_cmd (gdb_stdout, from_tty, NULL, NULL);
show_remote_protocol_qPart_auxv_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
+ show_remote_protocol_qGetTLSAddr_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
}
static void
@@ -5758,6 +5829,13 @@ Show the maximum size of the address (in
&remote_set_cmdlist, &remote_show_cmdlist,
0);
+ add_packet_config_cmd (&remote_protocol_qGetTLSAddr,
+ "qGetTLSAddr", "get-thread-local-storage-address",
+ set_remote_protocol_qGetTLSAddr_packet_cmd,
+ show_remote_protocol_qGetTLSAddr_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist,
+ 0);
+
/* Keep the old ``set remote Z-packet ...'' working. */
add_setshow_auto_boolean_cmd ("Z-packet", class_obscure,
&remote_Z_packet_detect, _("\
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] remote.c: Add remote TLS support
2005-04-15 20:09 ` Kevin Buettner
@ 2005-04-15 20:12 ` Daniel Jacobowitz
2005-04-15 20:30 ` Kevin Buettner
2005-04-15 21:02 ` Kevin Buettner
2005-04-16 9:14 ` Eli Zaretskii
2005-04-22 13:14 ` Eli Zaretskii
2 siblings, 2 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2005-04-15 20:12 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
Nice to see this checked in.
On Fri, Apr 15, 2005 at 01:09:13PM -0700, Kevin Buettner wrote:
> +static CORE_ADDR
> +remote_get_thread_local_address (ptid_t ptid, CORE_ADDR lm, CORE_ADDR offset)
> +{
> + if (remote_protocol_qGetTLSAddr.support != PACKET_DISABLE)
> + {
> + struct remote_state *rs = get_remote_state ();
> + char *buf = alloca (rs->remote_packet_size);
> + char *p = buf;
> +
> + strcpy (p, "qGetTLSAddr:");
> + p += strlen (p);
> + p += hexnumstr (p, PIDGET (ptid));
> + *p++ = ',';
> + p += hexnumstr (p, offset);
> + *p++ = ',';
> + p += hexnumstr (p, lm);
> + *p++ = '\0';
> +
> + putpkt (buf);
> + getpkt (buf, rs->remote_packet_size, 0);
> + if (packet_ok (buf, &remote_protocol_qGetTLSAddr) == PACKET_OK)
> + {
> + ULONGEST result;
> +
> + unpack_varlen_hex (buf, &result);
> + return result;
> + }
> + else
> + {
> + struct exception e
> + = { RETURN_ERROR, TLS_GENERIC_ERROR,
> + "Remote target failed to process qGetTLSAddr request" };
> + throw_exception (e);
> +
> + }
> + }
> + else
> + {
> + struct exception e
> + = { RETURN_ERROR, TLS_GENERIC_ERROR,
> + "TLS not supported or disabled on this target" };
> + throw_exception (e);
> + }
> + /* Not reached. */
> + return 0;
> +}
> +
> static void
> init_remote_ops (void)
> {
You're still throwing the wrong exception if the packet is autodetected
as unavailable, as far as I can tell. You'll throw the "failed to
process" message.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] remote.c: Add remote TLS support
2005-04-15 20:12 ` Daniel Jacobowitz
@ 2005-04-15 20:30 ` Kevin Buettner
2005-04-15 21:02 ` Kevin Buettner
1 sibling, 0 replies; 9+ messages in thread
From: Kevin Buettner @ 2005-04-15 20:30 UTC (permalink / raw)
To: gdb-patches
On Fri, 15 Apr 2005 16:12:00 -0400
Daniel Jacobowitz <drow@false.org> wrote:
> You're still throwing the wrong exception if the packet is autodetected
> as unavailable, as far as I can tell. You'll throw the "failed to
> process" message.
I missed your earlier comment on this. You're right. I'm working
on a fix now.
Kevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] remote.c: Add remote TLS support
2005-04-15 20:12 ` Daniel Jacobowitz
2005-04-15 20:30 ` Kevin Buettner
@ 2005-04-15 21:02 ` Kevin Buettner
1 sibling, 0 replies; 9+ messages in thread
From: Kevin Buettner @ 2005-04-15 21:02 UTC (permalink / raw)
To: gdb-patches
On Fri, 15 Apr 2005 16:12:00 -0400
Daniel Jacobowitz <drow@false.org> wrote:
> > + if (packet_ok (buf, &remote_protocol_qGetTLSAddr) == PACKET_OK)
> > + {
> > + ULONGEST result;
> > +
> > + unpack_varlen_hex (buf, &result);
> > + return result;
> > + }
> > + else
> > + {
> > + struct exception e
> > + = { RETURN_ERROR, TLS_GENERIC_ERROR,
> > + "Remote target failed to process qGetTLSAddr request" };
> > + throw_exception (e);
> > +
> > + }
> > + }
> > + else
> > + {
> > + struct exception e
> > + = { RETURN_ERROR, TLS_GENERIC_ERROR,
> > + "TLS not supported or disabled on this target" };
> > + throw_exception (e);
> > + }
> > + /* Not reached. */
> > + return 0;
> > +}
> > +
> > static void
> > init_remote_ops (void)
> > {
>
> You're still throwing the wrong exception if the packet is autodetected
> as unavailable, as far as I can tell. You'll throw the "failed to
> process" message.
I apologize for missing this in your earlier review. I've checked the
following change in to handle this case.
* remote.c (remote_get_thread_local_address): Throw a more
meaningful exception when remote target doesn't have support
for the qGetTLSAddr packet.
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.182
diff -u -p -r1.182 remote.c
--- remote.c 15 Apr 2005 19:58:59 -0000 1.182
+++ remote.c 15 Apr 2005 20:45:26 -0000
@@ -5344,6 +5344,7 @@ remote_get_thread_local_address (ptid_t
struct remote_state *rs = get_remote_state ();
char *buf = alloca (rs->remote_packet_size);
char *p = buf;
+ enum packet_result result;
strcpy (p, "qGetTLSAddr:");
p += strlen (p);
@@ -5356,13 +5357,21 @@ remote_get_thread_local_address (ptid_t
putpkt (buf);
getpkt (buf, rs->remote_packet_size, 0);
- if (packet_ok (buf, &remote_protocol_qGetTLSAddr) == PACKET_OK)
+ result = packet_ok (buf, &remote_protocol_qGetTLSAddr);
+ if (result == PACKET_OK)
{
ULONGEST result;
unpack_varlen_hex (buf, &result);
return result;
}
+ else if (result == PACKET_UNKNOWN)
+ {
+ struct exception e
+ = { RETURN_ERROR, TLS_GENERIC_ERROR,
+ "Remote target doesn't support qGetTLSAddr packet" };
+ throw_exception (e);
+ }
else
{
struct exception e
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] remote.c: Add remote TLS support
2005-04-15 20:09 ` Kevin Buettner
2005-04-15 20:12 ` Daniel Jacobowitz
@ 2005-04-16 9:14 ` Eli Zaretskii
2005-04-22 13:14 ` Eli Zaretskii
2 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2005-04-16 9:14 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
> Date: Fri, 15 Apr 2005 13:09:13 -0700
> From: Kevin Buettner <kevinb@redhat.com>
>
> I ended up deleting all calls to deprecated_show_value_hack(). As
> observed in other discussion, these calls were printing redundant
> information. I wish to thank Daniel Jacobowitz for reviewing these
> changes.
>
> With that out of the way, I ended up committing the following changes,
> only modified slightly from my earlier posting. (It no longer
> refers to the deprecated function and I removed some unused variables
> that were leftovers from an even earlier version of the work.)
>
> * remote.c (remote_protocol_qGetTLSAddr): New static global variable.
> (set_remote_protocol_qGetTLSAddr_packet_cmd)
> (show_remote_protocol_qGetTLSAddr_packet_cmd)
> (remote_get_thread_local_address): New functions.
> (init_all_packet_configs): Initialize remote_protocol_qGetTLSAddr
> variable.
> (init_remote_ops): Initialize ``to_get_thread_local_address'' in
> target vector.
> (show_remote_cmd): Call show_remote_protocol_qGetTLS_Addr_packet_cmd().
> (_initialize_remote): Register the following commands:
> "set remote get-thread-local-storage-address-packet" and
> "show remote get-thread-local-address-packet".
Thanks.
Please also add documentation for these new commands (in the "Remote
configuration" node).
I'd also like to ask everyone who approves patches to request that
each new command be accompanied by the appropriate patch for
gdb.texinfo. Ditto for a change in user-visible behavior of existing
commands. Let us not have undocumented features anymore!
TIA
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] remote.c: Add remote TLS support
2005-04-15 20:09 ` Kevin Buettner
2005-04-15 20:12 ` Daniel Jacobowitz
2005-04-16 9:14 ` Eli Zaretskii
@ 2005-04-22 13:14 ` Eli Zaretskii
2005-04-26 23:39 ` Kevin Buettner
2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2005-04-22 13:14 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
> Date: Fri, 15 Apr 2005 13:09:13 -0700
> From: Kevin Buettner <kevinb@redhat.com>
>
> With that out of the way, I ended up committing the following changes,
> only modified slightly from my earlier posting. (It no longer
> refers to the deprecated function and I removed some unused variables
> that were leftovers from an even earlier version of the work.)
>
> * remote.c (remote_protocol_qGetTLSAddr): New static global variable.
> (set_remote_protocol_qGetTLSAddr_packet_cmd)
> (show_remote_protocol_qGetTLSAddr_packet_cmd)
> (remote_get_thread_local_address): New functions.
> (init_all_packet_configs): Initialize remote_protocol_qGetTLSAddr
> variable.
> (init_remote_ops): Initialize ``to_get_thread_local_address'' in
> target vector.
> (show_remote_cmd): Call show_remote_protocol_qGetTLS_Addr_packet_cmd().
> (_initialize_remote): Register the following commands:
> "set remote get-thread-local-storage-address-packet" and
> "show remote get-thread-local-address-packet".
I added documentation for these 2 new commands, see below.
Committed.
2005-04-22 Eli Zaretskii <eliz@gnu.org>
* gdb.texinfo (Remote configuration): Document "set/show
get-thread-local-storage-address". Add cross-reference to the
description of the qGetTLSAddr packet.
(General Query Packets): Mention "set remote
get-thread-local-storage-address" and add a reference to its
description.
Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -r1.246 -r1.247
--- gdb.texinfo 18 Apr 2005 13:30:11 -0000 1.246
+++ gdb.texinfo 22 Apr 2005 13:09:27 -0000 1.247
@@ -12099,6 +12099,19 @@
@itemx show remote access-watchpoint-packet
@itemx show remote Z-packet
Show the current setting of @samp{Z} packets usage.
+
+@item set remote get-thread-local-storage-address
+@kindex set remote get-thread-local-storage-address
+@cindex thread local storage of remote targets
+This command enables or disables the use of the @samp{qGetTLSAddr}
+(Get Thread Local Storage Address) request packet. The default
+depends on whether the remote stub supports this request.
+@xref{General Query Packets, qGetTLSAddr}, for more details about this
+packet.
+
+@item show remote get-thread-local-storage-address
+@kindex show remote get-thread-local-storage-address
+Show the current setting of @samp{qGetTLSAddr} packet usage.
@end table
@node remote stub
@@ -22771,6 +22784,10 @@
An empty reply indicates that @code{qGetTLSAddr} is not supported by the stub.
@end table
+Use of this request packet is controlled by the @code{set remote
+get-thread-local-storage-address} command (@pxref{Remote
+configuration, set remote get-thread-local-storage-address}).
+
@end table
@node Register Packet Format
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] remote.c: Add remote TLS support
2005-04-22 13:14 ` Eli Zaretskii
@ 2005-04-26 23:39 ` Kevin Buettner
0 siblings, 0 replies; 9+ messages in thread
From: Kevin Buettner @ 2005-04-26 23:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
On Fri, 22 Apr 2005 16:12:09 +0300
"Eli Zaretskii" <eliz@gnu.org> wrote:
> > Date: Fri, 15 Apr 2005 13:09:13 -0700
> > From: Kevin Buettner <kevinb@redhat.com>
> >
> > With that out of the way, I ended up committing the following changes,
> > only modified slightly from my earlier posting. (It no longer
> > refers to the deprecated function and I removed some unused variables
> > that were leftovers from an even earlier version of the work.)
> >
> > * remote.c (remote_protocol_qGetTLSAddr): New static global variable.
> > (set_remote_protocol_qGetTLSAddr_packet_cmd)
> > (show_remote_protocol_qGetTLSAddr_packet_cmd)
> > (remote_get_thread_local_address): New functions.
> > (init_all_packet_configs): Initialize remote_protocol_qGetTLSAddr
> > variable.
> > (init_remote_ops): Initialize ``to_get_thread_local_address'' in
> > target vector.
> > (show_remote_cmd): Call show_remote_protocol_qGetTLS_Addr_packet_cmd().
> > (_initialize_remote): Register the following commands:
> > "set remote get-thread-local-storage-address-packet" and
> > "show remote get-thread-local-address-packet".
>
> I added documentation for these 2 new commands, see below.
>
> Committed.
>
> 2005-04-22 Eli Zaretskii <eliz@gnu.org>
>
> * gdb.texinfo (Remote configuration): Document "set/show
> get-thread-local-storage-address". Add cross-reference to the
> description of the qGetTLSAddr packet.
> (General Query Packets): Mention "set remote
> get-thread-local-storage-address" and add a reference to its
> description.
Thanks for doing this!
Kevin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-04-26 23:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-31 23:20 [RFC] remote.c: Add remote TLS support Kevin Buettner
2005-03-31 23:43 ` Daniel Jacobowitz
2005-04-15 20:09 ` Kevin Buettner
2005-04-15 20:12 ` Daniel Jacobowitz
2005-04-15 20:30 ` Kevin Buettner
2005-04-15 21:02 ` Kevin Buettner
2005-04-16 9:14 ` Eli Zaretskii
2005-04-22 13:14 ` Eli Zaretskii
2005-04-26 23:39 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox