GDB7.6 Remote 'g' packet reply is too long

修改gdb/remote.c文件,屏蔽process_g_packet函数中的下列两行:

if (buf_len > 2 * rsa->sizeof_g_packet)

error (_(“Remote ‘g’ packet reply is too long: %s”), rs->buf);

在其后添加:

if (buf_len > 2 * rsa->sizeof_g_packet) {
      rsa->sizeof_g_packet = buf_len ;
      for (i = 0; i < gdbarch_num_regs (gdbarch); i++)
      {
         if (rsa->regs[i].pnum == -1)
         continue;

         if (rsa->regs[i].offset >= rsa->sizeof_g_packet)
         rsa->regs[i].in_g_packet = 0;
         else
         rsa->regs[i].in_g_packet = 1;
      }
   }

你可能感兴趣的:(程序员,Linux)