int th;
int gen;
{
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
int state = gen ? general_thread : continue_thread;
if (state == th)
struct gdb_ext_thread_info *info;
{
int result;
- char threadinfo_pkt[PBUFSIZ];
+ char *threadinfo_pkt = alloca (PBUFSIZ);
pack_threadinfo_request (threadinfo_pkt, fieldset, threadid);
putpkt (threadinfo_pkt);
{
static threadref echo_nextthread;
- char threadlist_packet[PBUFSIZ];
- char t_response[PBUFSIZ];
+ char *threadlist_packet = alloca (PBUFSIZ);
+ char *t_response = alloca (PBUFSIZ);
int result = 1;
/* Trancate result limit to be smaller than the packet size */
remote_current_thread (oldpid)
int oldpid;
{
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
putpkt ("qC");
getpkt (buf, 0);
static void
remote_threads_info (void)
{
- char buf[PBUFSIZ], *bufp;
+ char *buf = alloca (PBUFSIZ);
+ char *bufp;
int tid;
if (remote_desc == 0) /* paranoia */
static void
extended_remote_restart ()
{
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
/* Send the restart command; for reasons I don't understand the
remote side really expects a number after the "R". */
static void
get_offsets ()
{
- char buf[PBUFSIZ], *ptr;
+ char *buf = alloca (PBUFSIZ);
+ char *ptr;
int lose;
CORE_ADDR text_addr, data_addr, bss_addr;
struct section_offsets *offs;
if (symfile_objfile == NULL)
return;
- offs = (struct section_offsets *) alloca (sizeof (struct section_offsets)
+ offs = alloca (sizeof (struct section_offsets)
+ symfile_objfile->num_sections
* sizeof (offs->offsets));
memcpy (offs, symfile_objfile->section_offsets,
if (extended_p)
{
/* tell the remote that we're using the extended protocol. */
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
putpkt ("!");
getpkt (buf, 0);
}
char *args;
int from_tty;
{
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
if (args)
error ("Argument given to \"detach\" when remotely debugging.");
int pid, step;
enum target_signal siggnal;
{
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
if (pid == -1)
set_thread (0, 0); /* run any thread */
int pid;
struct target_waitstatus *status;
{
- unsigned char buf[PBUFSIZ];
+ unsigned char *buf = alloca (PBUFSIZ);
int thread_num = -1;
status->kind = TARGET_WAITKIND_EXITED;
remote_fetch_registers (regno)
int regno;
{
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
int i;
char *p;
char regs[REGISTER_BYTES];
remote_store_registers (regno)
int regno;
{
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
int i;
char *p;
{
if (remote_binary_download && !remote_binary_checked)
{
- char buf[PBUFSIZ], *p;
+ char *buf = alloca (PBUFSIZ);
+ char *p;
remote_binary_checked = 1;
p = buf;
char *myaddr;
int len;
{
+ unsigned char *buf = alloca (PBUFSIZ);
int max_buf_size; /* Max size of packet output buffer */
int origlen;
origlen = len;
while (len > 0)
{
- unsigned char buf[PBUFSIZ];
unsigned char *p, *plen;
int todo;
int i;
char *myaddr;
int len;
{
+ char *buf = alloca (PBUFSIZ);
int max_buf_size; /* Max size of packet output buffer */
int origlen;
origlen = len;
while (len > 0)
{
- char buf[PBUFSIZ];
char *p;
int todo;
int i;
long mask_long, data_long;
long data_found_long;
CORE_ADDR addr_we_found;
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
long returned_long[2];
char *p;
{
int i;
unsigned char csum = 0;
- char buf2[PBUFSIZ];
+ char *buf2 = alloca (PBUFSIZ);
+ char *junkbuf = alloca (PBUFSIZ);
+
int ch;
int tcount = 0;
char *p;
break; /* Retransmit buffer */
case '$':
{
- char junkbuf[PBUFSIZ];
-
/* It's probably an old response, and we're out of sync.
Just gobble up the packet and ignore it. */
getpkt (junkbuf, 0);
{
if (remote_cisco_mode) /* variant run-length-encoding */
{
- char tmp_buf[PBUFSIZ];
+ char *tmp_buf = alloca (PBUFSIZ);
remote_cisco_expand (buf, tmp_buf);
strcpy (buf, tmp_buf);
unsigned long host_crc, target_crc;
extern bfd *exec_bfd;
struct cleanup *old_chain;
- char *tmp, *sectdata, *sectname, buf[PBUFSIZ];
+ char *tmp;
+ char *sectdata;
+ char *sectname;
+ char *buf = alloca (PBUFSIZ);
bfd_size_type size;
bfd_vma lma;
int matched = 0;
int *bufsiz;
{
int i;
- char buf2[PBUFSIZ];
+ char *buf2 = alloca (PBUFSIZ);
char *p2 = &buf2[0];
char *p = buf;
char *args;
int from_tty;
{
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
if (! remote_desc)
error ("command can only be used with remote target");
char *args;
int from_tty;
{
- char buf[PBUFSIZ];
+ char *buf = alloca (PBUFSIZ);
if (remote_desc == 0)
error ("Command can only be used when connected to the remote target.");