Exemple #1
0
void gdbserver_init (void)
{
   dlog(1, "gdbserver_init gdbserver embedded in valgrind: %s\n", version);
   noack_mode = False;
   valgrind_initialize_target ();
   // After a fork, gdbserver_init can be called again.
   // We do not have to re-malloc the buffers in such a case.
   if (own_buf == NULL)
      own_buf = malloc (PBUFSIZ);
   if (mem_buf == NULL)
      mem_buf = malloc (PBUFSIZ);
}
Exemple #2
0
void gdbserver_init (void)
{
   dlog(1, "gdbserver_init gdbserver embedded in valgrind: %s\n", version);
   noack_mode = False;
   valgrind_initialize_target ();
   // After a fork, gdbserver_init can be called again.
   // We do not have to re-malloc the buffers in such a case.
   if (own_buf == NULL)
      own_buf = malloc (PBUFSIZ+POVERHSIZ);
   if (mem_buf == NULL)
      mem_buf = malloc (PBUFSIZ+POVERHSIZ);
   // Note: normally, we should only malloc PBUFSIZ. However,
   // GDB has a bug, and in some cases, sends e.g. 'm' packets
   // asking for slightly more than the PacketSize given at
   // connection initialisation. So, we bypass the GDB bug
   // by allocating slightly more.
}