static void remote_store_registers PARAMS ((int regno));
static void remote_mourn PARAMS ((void));
+static void remote_async_mourn PARAMS ((void));
static void extended_remote_restart PARAMS ((void));
static void check_binary_download PARAMS ((CORE_ADDR addr));
-#if __STDC__
struct packet_config;
-#endif
static void show_packet_config_cmd PARAMS ((struct packet_config * config));
if (symfile_objfile == NULL)
return;
- offs = alloca (sizeof (struct section_offsets)
- + symfile_objfile->num_sections
- * sizeof (offs->offsets));
- memcpy (offs, symfile_objfile->section_offsets,
- sizeof (struct section_offsets)
- + symfile_objfile->num_sections
- * sizeof (offs->offsets));
+ offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+ memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
ANOFFSET (offs, SECT_OFF_TEXT) = text_addr;
sprintf_vma (tmp + strlen (tmp), bss_addr);
fprintf_filtered (gdb_stdlog, tmp);
fprintf_filtered (gdb_stdlog,
- "Reloc offset: text = 0x%x data = 0x%x bss = 0x%x\n",
- (long) *text_offs, (long) *data_offs, (long) *bss_offs);
+ "Reloc offset: text = 0x%s data = 0x%s bss = 0x%s\n",
+ paddr_nz (*text_offs),
+ paddr_nz (*data_offs),
+ paddr_nz (*bss_offs));
}
return 0;
broken for xcoff, dwarf, sdb-coff, etc. But there is no
simple canonical representation for this stuff. */
- offs = ((struct section_offsets *)
- alloca (sizeof (struct section_offsets)
- + (symfile_objfile->num_sections
- * sizeof (offs->offsets))));
-
- memcpy (offs, symfile_objfile->section_offsets,
- (sizeof (struct section_offsets)
- + (symfile_objfile->num_sections
- * sizeof (offs->offsets))));
+ offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+ memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
ANOFFSET (offs, SECT_OFF_TEXT) = text_off;
ANOFFSET (offs, SECT_OFF_DATA) = data_off;
if (symfile_objfile == NULL)
{
- warning ("Relocation packet recieved with no symbol file. \
+ warning ("Relocation packet received with no symbol file. \
Packet Dropped");
goto got_status;
}
*p = '\0';
fprintf_unfiltered (gdb_stdlog, "Sending packet: ");
fputstrn_unfiltered (buf2, p - buf2, 0, gdb_stdlog);
- fprintf_unfiltered (gdb_stdlog, "...", buf2);
+ fprintf_unfiltered (gdb_stdlog, "...");
gdb_flush (gdb_stdlog);
}
if (SERIAL_WRITE (remote_desc, buf2, p - buf2))
remote_mourn_1 (&remote_ops);
}
+static void
+remote_async_mourn ()
+{
+ remote_mourn_1 (&remote_async_ops);
+}
+
static void
extended_remote_mourn ()
{
CORE_ADDR addr;
char *contents_cache;
{
- char buf[PBUFSIZ];
int bp_size;
if ((remote_protocol_Z.support == PACKET_ENABLE)
p = strchr (buf, '\0');
addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr);
- sprintf (p, ",%lx", len);
+ sprintf (p, ",%x", len);
putpkt (buf);
getpkt (buf, 0);
p = strchr (buf, '\0');
addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr);
- sprintf (p, ",%lx", len);
+ sprintf (p, ",%x", len);
putpkt (buf);
getpkt (buf, 0);
for (target_crc = 0, tmp = &buf[1]; *tmp; tmp++)
target_crc = target_crc * 16 + fromhex (*tmp);
- printf_filtered ("Section %s, range 0x%08x -- 0x%08x: ",
- sectname, lma, lma + size);
+ printf_filtered ("Section %s, range 0x%s -- 0x%s: ",
+ sectname, paddr (lma), paddr (lma + size));
if (host_crc == target_crc)
printf_filtered ("matched.\n");
else
int i;
char *buf2 = alloca (PBUFSIZ);
char *p2 = &buf2[0];
- char *p = buf;
if (!bufsiz)
error ("null pointer to remote bufer size specified");
static int
readtty ()
{
- int status;
int tty_bytecount;
/* First, read a buffer full from the terminal */
remote_async_ops.to_remove_breakpoint = remote_remove_breakpoint;
remote_async_ops.to_kill = remote_async_kill;
remote_async_ops.to_load = generic_load;
- remote_async_ops.to_mourn_inferior = remote_mourn;
+ remote_async_ops.to_mourn_inferior = remote_async_mourn;
remote_async_ops.to_thread_alive = remote_thread_alive;
remote_async_ops.to_find_new_threads = remote_threads_info;
remote_async_ops.to_stop = remote_stop;
Remote protocol specific variables\n\
Configure various remote-protocol specific variables such as\n\
the packets being used",
- &remote_set_cmdlist, "remote ",
+ &remote_set_cmdlist, "set remote ",
0/*allow-unknown*/, &setlist);
add_prefix_cmd ("remote", class_maintenance, set_remote_cmd, "\
Remote protocol specific variables\n\
Configure various remote-protocol specific variables such as\n\
the packets being used",
- &remote_show_cmdlist, "remote ",
+ &remote_show_cmdlist, "show remote ",
0/*allow-unknown*/, &showlist);
add_cmd ("compare-sections", class_obscure, compare_sections_command,