summaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c140
1 files changed, 70 insertions, 70 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 20becee27d6..efb9b94998e 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -88,14 +88,14 @@ static void remote_async_resume (ptid_t ptid, int step,
enum target_signal siggnal);
static int remote_start_remote (struct ui_out *uiout, void *dummy);
-static void remote_open (char *name, int from_tty);
-static void remote_async_open (char *name, int from_tty);
+static void remote_open (const char *name, int from_tty);
+static void remote_async_open (const char *name, int from_tty);
-static void extended_remote_open (char *name, int from_tty);
-static void extended_remote_async_open (char *name, int from_tty);
+static void extended_remote_open (const char *name, int from_tty);
+static void extended_remote_async_open (const char *name, int from_tty);
-static void remote_open_1 (char *, int, struct target_ops *, int extended_p,
- int async_p);
+static void remote_open_1 (const char *, int, struct target_ops *,
+ int extended_p, int async_p);
static void remote_close (int quitting);
@@ -127,8 +127,8 @@ static void remote_async_kill (void);
static int tohex (int nib);
-static void remote_detach (char *args, int from_tty);
-static void remote_async_detach (char *args, int from_tty);
+static void remote_detach (const char *args, int from_tty);
+static void remote_async_detach (const char *args, int from_tty);
static void remote_interrupt (int signo);
@@ -172,13 +172,13 @@ static int hexnumnstr (char *, ULONGEST, int);
static CORE_ADDR remote_address_masked (CORE_ADDR);
-static void print_packet (char *);
+static void print_packet (const char *);
static unsigned long crc32 (unsigned char *, int, unsigned int);
-static void compare_sections_command (char *, int);
+static void compare_sections_command (const char *, int);
-static void packet_command (char *, int);
+static void packet_command (const char *, int);
static int stub_unpack_int (char *buff, int fieldlength);
@@ -194,7 +194,7 @@ static int hex2bin (const char *hex, char *bin, int count);
static int bin2hex (const char *bin, char *hex, int count);
-static int putpkt_binary (char *buf, int cnt);
+static int putpkt_binary (const char *buf, int cnt);
static void check_binary_download (CORE_ADDR addr);
@@ -468,7 +468,7 @@ get_memory_packet_size (struct memory_packet_config *config)
something really big then do a sanity check. */
static void
-set_memory_packet_size (char *args, struct memory_packet_config *config)
+set_memory_packet_size (const char *args, struct memory_packet_config *config)
{
int fixed_p = config->fixed_p;
long size = config->size;
@@ -526,13 +526,13 @@ static struct memory_packet_config memory_write_packet_config =
};
static void
-set_memory_write_packet_size (char *args, int from_tty)
+set_memory_write_packet_size (const char *args, int from_tty)
{
set_memory_packet_size (args, &memory_write_packet_config);
}
static void
-show_memory_write_packet_size (char *args, int from_tty)
+show_memory_write_packet_size (const char *args, int from_tty)
{
show_memory_packet_size (&memory_write_packet_config);
}
@@ -549,13 +549,13 @@ static struct memory_packet_config memory_read_packet_config =
};
static void
-set_memory_read_packet_size (char *args, int from_tty)
+set_memory_read_packet_size (const char *args, int from_tty)
{
set_memory_packet_size (args, &memory_read_packet_config);
}
static void
-show_memory_read_packet_size (char *args, int from_tty)
+show_memory_read_packet_size (const char *args, int from_tty)
{
show_memory_packet_size (&memory_read_packet_config);
}
@@ -759,14 +759,14 @@ packet_ok (const char *buf, struct packet_config *config)
static struct packet_config remote_protocol_qSymbol;
static void
-set_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
- struct cmd_list_element *c)
+set_remote_protocol_qSymbol_packet_cmd (const char *args, int from_tty,
+ struct cmd_list_element *c)
{
update_packet_config (&remote_protocol_qSymbol);
}
static void
-show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
+show_remote_protocol_qSymbol_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_qSymbol);
@@ -776,14 +776,14 @@ show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
static struct packet_config remote_protocol_e;
static void
-set_remote_protocol_e_packet_cmd (char *args, int from_tty,
+set_remote_protocol_e_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
update_packet_config (&remote_protocol_e);
}
static void
-show_remote_protocol_e_packet_cmd (char *args, int from_tty,
+show_remote_protocol_e_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_e);
@@ -794,14 +794,14 @@ show_remote_protocol_e_packet_cmd (char *args, int from_tty,
static struct packet_config remote_protocol_E;
static void
-set_remote_protocol_E_packet_cmd (char *args, int from_tty,
+set_remote_protocol_E_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
update_packet_config (&remote_protocol_E);
}
static void
-show_remote_protocol_E_packet_cmd (char *args, int from_tty,
+show_remote_protocol_E_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_E);
@@ -813,14 +813,14 @@ show_remote_protocol_E_packet_cmd (char *args, int from_tty,
static struct packet_config remote_protocol_P;
static void
-set_remote_protocol_P_packet_cmd (char *args, int from_tty,
+set_remote_protocol_P_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
update_packet_config (&remote_protocol_P);
}
static void
-show_remote_protocol_P_packet_cmd (char *args, int from_tty,
+show_remote_protocol_P_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_P);
@@ -844,70 +844,70 @@ static struct packet_config remote_protocol_Z[NR_Z_PACKET_TYPES];
command callback should include a context argument. */
static void
-set_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty,
+set_remote_protocol_Z_software_bp_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
update_packet_config (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP]);
}
static void
-show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty,
+show_remote_protocol_Z_software_bp_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP]);
}
static void
-set_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty,
+set_remote_protocol_Z_hardware_bp_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
update_packet_config (&remote_protocol_Z[Z_PACKET_HARDWARE_BP]);
}
static void
-show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty,
+show_remote_protocol_Z_hardware_bp_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_HARDWARE_BP]);
}
static void
-set_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty,
- struct cmd_list_element *c)
+set_remote_protocol_Z_write_wp_packet_cmd (const char *args, int from_tty,
+ struct cmd_list_element *c)
{
update_packet_config (&remote_protocol_Z[Z_PACKET_WRITE_WP]);
}
static void
-show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty,
+show_remote_protocol_Z_write_wp_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_WRITE_WP]);
}
static void
-set_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty,
- struct cmd_list_element *c)
+set_remote_protocol_Z_read_wp_packet_cmd (const char *args, int from_tty,
+ struct cmd_list_element *c)
{
update_packet_config (&remote_protocol_Z[Z_PACKET_READ_WP]);
}
static void
-show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty,
+show_remote_protocol_Z_read_wp_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_READ_WP]);
}
static void
-set_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
- struct cmd_list_element *c)
+set_remote_protocol_Z_access_wp_packet_cmd (const char *args, int from_tty,
+ struct cmd_list_element *c)
{
update_packet_config (&remote_protocol_Z[Z_PACKET_ACCESS_WP]);
}
static void
-show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
+show_remote_protocol_Z_access_wp_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_ACCESS_WP]);
@@ -919,7 +919,7 @@ show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
static enum auto_boolean remote_Z_packet_detect;
static void
-set_remote_protocol_Z_packet_cmd (char *args, int from_tty,
+set_remote_protocol_Z_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
int i;
@@ -931,7 +931,7 @@ set_remote_protocol_Z_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_Z_packet_cmd (char *args, int from_tty,
+show_remote_protocol_Z_packet_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
int i;
@@ -965,7 +965,7 @@ static int use_threadinfo_query;
static int use_threadextra_query;
static void
-set_remote_protocol_binary_download_cmd (char *args,
+set_remote_protocol_binary_download_cmd (const char *args,
int from_tty,
struct cmd_list_element *c)
{
@@ -973,7 +973,7 @@ set_remote_protocol_binary_download_cmd (char *args,
}
static void
-show_remote_protocol_binary_download_cmd (char *args, int from_tty,
+show_remote_protocol_binary_download_cmd (const char *args, int from_tty,
struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_binary_download);
@@ -2153,14 +2153,14 @@ remote_start_remote (struct ui_out *uiout, void *dummy)
NAME is the filename used for communication. */
static void
-remote_open (char *name, int from_tty)
+remote_open (const char *name, int from_tty)
{
remote_open_1 (name, from_tty, &remote_ops, 0, 0);
}
/* Just like remote_open, but with asynchronous support. */
static void
-remote_async_open (char *name, int from_tty)
+remote_async_open (const char *name, int from_tty)
{
remote_open_1 (name, from_tty, &remote_async_ops, 0, 1);
}
@@ -2169,7 +2169,7 @@ remote_async_open (char *name, int from_tty)
remote gdb protocol. NAME is the filename used for communication. */
static void
-extended_remote_open (char *name, int from_tty)
+extended_remote_open (const char *name, int from_tty)
{
remote_open_1 (name, from_tty, &extended_remote_ops, 1 /*extended_p */,
0 /* async_p */);
@@ -2177,7 +2177,7 @@ extended_remote_open (char *name, int from_tty)
/* Just like extended_remote_open, but with asynchronous support. */
static void
-extended_remote_async_open (char *name, int from_tty)
+extended_remote_async_open (const char *name, int from_tty)
{
remote_open_1 (name, from_tty, &extended_async_remote_ops,
1 /*extended_p */, 1 /* async_p */);
@@ -2240,7 +2240,7 @@ remote_check_symbols (struct objfile *objfile)
}
static struct serial *
-remote_serial_open (char *name)
+remote_serial_open (const char *name)
{
static int udp_warning = 0;
@@ -2260,7 +2260,7 @@ remote_serial_open (char *name)
}
static void
-remote_open_1 (char *name, int from_tty, struct target_ops *target,
+remote_open_1 (const char *name, int from_tty, struct target_ops *target,
int extended_p, int async_p)
{
int ex;
@@ -2403,7 +2403,7 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
die when it hits one. */
static void
-remote_detach (char *args, int from_tty)
+remote_detach (const char *args, int from_tty)
{
struct remote_state *rs = get_remote_state ();
char *buf = alloca (rs->remote_packet_size);
@@ -2423,7 +2423,7 @@ remote_detach (char *args, int from_tty)
/* Same as remote_detach, but with async support. */
static void
-remote_async_detach (char *args, int from_tty)
+remote_async_detach (const char *args, int from_tty)
{
struct remote_state *rs = get_remote_state ();
char *buf = alloca (rs->remote_packet_size);
@@ -4109,7 +4109,7 @@ remote_send (char *buf,
string notation. */
static void
-print_packet (char *buf)
+print_packet (const char *buf)
{
puts_filtered ("\"");
fputstr_filtered (buf, '"', gdb_stdout);
@@ -4117,7 +4117,7 @@ print_packet (char *buf)
}
int
-putpkt (char *buf)
+putpkt (const char *buf)
{
return putpkt_binary (buf, strlen (buf));
}
@@ -4128,7 +4128,7 @@ putpkt (char *buf)
debugging (remote_debug) and want to print the sent packet as a string */
static int
-putpkt_binary (char *buf, int cnt)
+putpkt_binary (const char *buf, int cnt)
{
struct remote_state *rs = get_remote_state ();
int i;
@@ -5029,7 +5029,7 @@ crc32 (unsigned char *buf, int len, unsigned int crc)
generic_load()) to make use of this target functionality. */
static void
-compare_sections_command (char *args, int from_tty)
+compare_sections_command (const char *args, int from_tty)
{
struct remote_state *rs = get_remote_state ();
asection *s;
@@ -5173,7 +5173,7 @@ remote_query (int query_type, char *buf, char *outbuf, int *bufsiz)
}
static void
-remote_rcmd (char *command,
+remote_rcmd (const char *command,
struct ui_file *outbuf)
{
struct remote_state *rs = get_remote_state ();
@@ -5231,7 +5231,7 @@ remote_rcmd (char *command,
}
static void
-packet_command (char *args, int from_tty)
+packet_command (const char *args, int from_tty)
{
struct remote_state *rs = get_remote_state ();
char *buf = alloca (rs->remote_packet_size);
@@ -5258,26 +5258,26 @@ packet_command (char *args, int from_tty)
static void display_thread_info (struct gdb_ext_thread_info *info);
-static void threadset_test_cmd (char *cmd, int tty);
+static void threadset_test_cmd (const char *cmd, int tty);
-static void threadalive_test (char *cmd, int tty);
+static void threadalive_test (const char *cmd, int tty);
-static void threadlist_test_cmd (char *cmd, int tty);
+static void threadlist_test_cmd (const char *cmd, int tty);
int get_and_display_threadinfo (threadref * ref);
-static void threadinfo_test_cmd (char *cmd, int tty);
+static void threadinfo_test_cmd (const char *cmd, int tty);
static int thread_display_step (threadref * ref, void *context);
-static void threadlist_update_test_cmd (char *cmd, int tty);
+static void threadlist_update_test_cmd (const char *cmd, int tty);
static void init_remote_threadtests (void);
#define SAMPLE_THREAD 0x05060708 /* Truncated 64 bit threadid */
static void
-threadset_test_cmd (char *cmd, int tty)
+threadset_test_cmd (const char *cmd, int tty)
{
int sample_thread = SAMPLE_THREAD;
@@ -5310,7 +5310,7 @@ output_threadid (char *title, threadref *ref)
}
static void
-threadlist_test_cmd (char *cmd, int tty)
+threadlist_test_cmd (const char *cmd, int tty)
{
int startflag = 1;
threadref nextthread;
@@ -5355,7 +5355,7 @@ get_and_display_threadinfo (threadref *ref)
}
static void
-threadinfo_test_cmd (char *cmd, int tty)
+threadinfo_test_cmd (const char *cmd, int tty)
{
int athread = SAMPLE_THREAD;
threadref thread;
@@ -5375,7 +5375,7 @@ thread_display_step (threadref *ref, void *context)
}
static void
-threadlist_update_test_cmd (char *cmd, int tty)
+threadlist_update_test_cmd (const char *cmd, int tty)
{
printf_filtered ("Remote Threadlist update test\n");
remote_threadlist_iterator (thread_display_step, 0, CRAZY_MAX_THREADS);
@@ -5493,7 +5493,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
*/
static void
-remote_info_process (char *args, int from_tty)
+remote_info_process (const char *args, int from_tty)
{
struct remote_state *rs = get_remote_state ();
char *buf = alloca (rs->remote_packet_size);
@@ -5522,7 +5522,7 @@ remote_info_process (char *args, int from_tty)
*/
static void
-remote_cisco_open (char *name, int from_tty)
+remote_cisco_open (const char *name, int from_tty)
{
int ex;
if (name == 0)
@@ -6000,12 +6000,12 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
}
static void
-set_remote_cmd (char *args, int from_tty)
+set_remote_cmd (const char *args, int from_tty)
{
}
static void
-show_remote_cmd (char *args, int from_tty)
+show_remote_cmd (const char *args, int from_tty)
{
/* FIXME: cagney/2002-06-15: This function should iterate over
remote_show_cmdlist for a list of sub commands to show. */