diff options
author | Gary Benson <gary@redhat.com> | 2013-06-04 13:10:53 +0000 |
---|---|---|
committer | Gary Benson <gary@redhat.com> | 2013-06-04 13:10:53 +0000 |
commit | ced63ec0871aeb4f81ec09d61e806f464d246a64 (patch) | |
tree | 92098444ff2e0b7f551cf96bc3e03775c6f35fe9 | |
parent | 85dc5a128b06ba0d81733740dde149559e2f2630 (diff) | |
download | gdb-ced63ec0871aeb4f81ec09d61e806f464d246a64.zip gdb-ced63ec0871aeb4f81ec09d61e806f464d246a64.tar.gz gdb-ced63ec0871aeb4f81ec09d61e806f464d246a64.tar.bz2 |
2013-06-04 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.
-rw-r--r-- | gdb/ChangeLog | 16 | ||||
-rw-r--r-- | gdb/remote.c | 26 | ||||
-rw-r--r-- | gdb/target.c | 4 | ||||
-rw-r--r-- | gdb/target.h | 7 |
4 files changed, 53 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2cab728..1ea8c15 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,21 @@ 2013-06-04 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. + +2013-06-04 Gary Benson <gbenson@redhat.com> + * NEWS: Update. 2013-06-04 Gary Benson <gbenson@redhat.com> diff --git a/gdb/remote.c b/gdb/remote.c index d8854ae..7d98bc1 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -361,6 +361,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; @@ -3949,6 +3953,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, @@ -3959,6 +3973,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, @@ -11439,6 +11455,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) { @@ -11561,6 +11585,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 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/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) \ |