From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [RFA 4/7] GDB support for new gdbserver functionality
Date: Thu, 16 May 2013 14:48:00 -0000 [thread overview]
Message-ID: <20130516144830.GE2105@blade.nx> (raw)
In-Reply-To: <20130516144340.GA2105@blade.nx>
[-- Attachment #1: Type: text/plain, Size: 103 bytes --]
This patch adds client support for the new gdbserver functionality
provided by patch 3 of this series.
[-- Attachment #2: rtld-probes-4-remote.patch --]
[-- Type: text/plain, Size: 4593 bytes --]
2013-05-16 Gary Benson <gbenson@redhat.com>
* target.h (target_ops): New field
"to_augmented_libraries_svr4_read".
(target_augmented_libraries_svr4_read): New macro.
* target.c (update_current_target): Handle
to_augmented_libraries_svr4_read.
* remote.c (remote_state): New field
"augmented_libraries_svr4_read".
(remote_augmented_libraries_svr4_read_feature): New function.
(remote_protocol_features): Add entry for
"augmented-libraries-svr4-read".
(remote_augmented_libraries_svr4_read): New function.
(init_remote_ops): Initialize
remote_ops.to_augmented_libraries_svr4_read.
diff --git a/gdb/target.h b/gdb/target.h
index e937d39..a8587e8 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -941,6 +941,10 @@ struct target_ops
(inclusive) to function END (exclusive). */
void (*to_call_history_range) (ULONGEST begin, ULONGEST end, int flags);
+ /* Nonzero if TARGET_OBJECT_LIBRARIES_SVR4 may be read with a
+ non-empty annex. */
+ int (*to_augmented_libraries_svr4_read) (void);
+
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
*/
@@ -1809,6 +1813,9 @@ extern char *target_fileio_read_stralloc (const char *filename);
#define target_can_use_agent() \
(*current_target.to_can_use_agent) ()
+#define target_augmented_libraries_svr4_read() \
+ (*current_target.to_augmented_libraries_svr4_read) ()
+
/* Command logging facility. */
#define target_log_command(p) \
diff --git a/gdb/target.c b/gdb/target.c
index 8653dac..519b97f 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -731,6 +731,7 @@ update_current_target (void)
INHERIT (to_traceframe_info, t);
INHERIT (to_use_agent, t);
INHERIT (to_can_use_agent, t);
+ INHERIT (to_augmented_libraries_svr4_read, t);
INHERIT (to_magic, t);
INHERIT (to_supports_evaluation_of_breakpoint_conditions, t);
INHERIT (to_can_run_breakpoint_commands, t);
@@ -975,6 +976,9 @@ update_current_target (void)
de_fault (to_can_use_agent,
(int (*) (void))
return_zero);
+ de_fault (to_augmented_libraries_svr4_read,
+ (int (*) (void))
+ return_zero);
de_fault (to_execution_direction, default_execution_direction);
#undef de_fault
diff --git a/gdb/remote.c b/gdb/remote.c
index 51bf025..e1cf8a4 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -343,6 +343,10 @@ struct remote_state
/* True if the stub can collect strings using tracenz bytecode. */
int string_tracing;
+ /* True if the stub supports qXfer:libraries-svr4:read with a
+ non-empty annex. */
+ int augmented_libraries_svr4_read;
+
/* Nonzero if the user has pressed Ctrl-C, but the target hasn't
responded to that. */
int ctrlc_pending_p;
@@ -3931,6 +3935,16 @@ remote_string_tracing_feature (const struct protocol_feature *feature,
rs->string_tracing = (support == PACKET_ENABLE);
}
+static void
+remote_augmented_libraries_svr4_read_feature
+ (const struct protocol_feature *feature,
+ enum packet_support support, const char *value)
+{
+ struct remote_state *rs = get_remote_state ();
+
+ rs->augmented_libraries_svr4_read = (support == PACKET_ENABLE);
+}
+
static struct protocol_feature remote_protocol_features[] = {
{ "PacketSize", PACKET_DISABLE, remote_packet_size, -1 },
{ "qXfer:auxv:read", PACKET_DISABLE, remote_supported_packet,
@@ -3941,6 +3955,8 @@ static struct protocol_feature remote_protocol_features[] = {
PACKET_qXfer_libraries },
{ "qXfer:libraries-svr4:read", PACKET_DISABLE, remote_supported_packet,
PACKET_qXfer_libraries_svr4 },
+ { "augmented-libraries-svr4-read", PACKET_DISABLE,
+ remote_augmented_libraries_svr4_read_feature, -1 },
{ "qXfer:memory-map:read", PACKET_DISABLE, remote_supported_packet,
PACKET_qXfer_memory_map },
{ "qXfer:spu:read", PACKET_DISABLE, remote_supported_packet,
@@ -11343,6 +11359,14 @@ remote_read_btrace (struct btrace_target_info *tinfo,
return btrace;
}
+static int
+remote_augmented_libraries_svr4_read (void)
+{
+ struct remote_state *rs = get_remote_state ();
+
+ return rs->augmented_libraries_svr4_read;
+}
+
static void
init_remote_ops (void)
{
@@ -11465,6 +11489,8 @@ Specify the serial device it is connected to\n\
remote_ops.to_disable_btrace = remote_disable_btrace;
remote_ops.to_teardown_btrace = remote_teardown_btrace;
remote_ops.to_read_btrace = remote_read_btrace;
+ remote_ops.to_augmented_libraries_svr4_read =
+ remote_augmented_libraries_svr4_read;
}
/* Set up the extended remote vector by making a copy of the standard
next prev parent reply other threads:[~2013-05-16 14:48 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 14:43 [RFA 0/7] Improved linker-debugger interface Gary Benson
2013-05-16 14:47 ` [RFA 1/7] Probes API convenience patch Gary Benson
2013-05-16 14:48 ` [RFA 2/7] API for inhibiting section map updates Gary Benson
2013-05-20 14:22 ` Tom Tromey
2013-05-24 7:47 ` [RFA 2/7 take 2] " Gary Benson
2013-05-24 14:18 ` Tom Tromey
2013-05-29 17:18 ` Pedro Alves
2013-05-30 9:12 ` Gary Benson
2013-05-16 14:48 ` [RFA 3/7] New gdbserver functionality Gary Benson
2013-05-16 18:18 ` Tom Tromey
2013-05-24 7:46 ` [RFA 3/7 take 2] " Gary Benson
2013-05-25 21:05 ` Jan Kratochvil
2013-05-26 2:45 ` Eli Zaretskii
2013-05-29 18:50 ` Pedro Alves
2013-05-30 9:38 ` Gary Benson
2013-05-30 10:40 ` Pedro Alves
2013-05-30 10:54 ` Gary Benson
2013-05-30 16:31 ` Eli Zaretskii
2013-05-30 17:22 ` Gary Benson
2013-05-16 14:48 ` Gary Benson [this message]
2013-05-16 14:55 ` [RFA 7/7] Linker-debugger interface tests Gary Benson
2013-05-19 13:45 ` Jan Kratochvil
2013-05-19 16:43 ` Jan Kratochvil
2013-05-24 8:38 ` [RFA 7/7 take 2] " Gary Benson
2013-05-24 8:58 ` Jan Kratochvil
2013-05-24 14:05 ` [obv] Fix excessive backslashes in testsuite Gary Benson
2013-05-25 21:06 ` [RFA 7/7 take 2] Linker-debugger interface tests Jan Kratochvil
2013-05-16 14:55 ` [RFA 5/7] Improved linker-debugger interface Gary Benson
2013-05-17 19:05 ` Jan Kratochvil
2013-05-24 8:30 ` [RFA 5/7 take 2] " Gary Benson
2013-05-25 21:05 ` Jan Kratochvil
2013-05-29 18:51 ` Pedro Alves
2013-05-30 10:43 ` [RFA 5/7 take 3] " Gary Benson
2013-05-30 17:18 ` Pedro Alves
2013-05-31 13:22 ` [RFA 5/7 take 4] " Gary Benson
2013-05-31 13:27 ` Pedro Alves
2013-06-03 10:31 ` Pedro Alves
2013-06-03 16:37 ` Jan Kratochvil
2013-06-03 17:28 ` Pedro Alves
2013-06-04 11:33 ` Gary Benson
2013-05-16 14:55 ` [RFA 6/7] Linker-debugger interface tests by Jan Gary Benson
2013-05-29 19:06 ` Pedro Alves
2013-05-30 9:19 ` Gary Benson
2013-05-16 17:33 ` [RFA 0/7] Improved linker-debugger interface Tom Tromey
2013-05-16 18:53 ` Gary Benson
2013-06-06 9:00 ` Gary Benson
2013-05-19 13:46 ` Jan Kratochvil
2013-05-29 19:08 ` Pedro Alves
2013-06-04 13:38 ` [commit] " Gary Benson
2013-06-25 21:04 ` Joel Brobecker
2013-06-25 22:03 ` Sergio Durigan Junior
2013-06-26 0:49 ` Joel Brobecker
2013-07-09 8:41 ` Gary Benson
[not found] ` <20130708104719.GA11176@blade.nx>
2013-07-09 14:45 ` Joel Brobecker
2013-06-26 15:38 ` Tom Tromey
2013-06-26 17:23 ` Sergio Durigan Junior
2013-06-26 19:15 ` Joel Brobecker
2013-06-27 23:33 ` Tom Tromey
2013-06-30 3:12 ` Sergio Durigan Junior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130516144830.GE2105@blade.nx \
--to=gbenson@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox