Skip to content

Instantly share code, notes, and snippets.

@BohuTANG
BohuTANG / gdb-remote.c
Created March 10, 2012 09:32
modify the gdb's remote.c to support long-buffer output when debug linux kernel
change:
if (buf_len > 2 * rsa->sizeof_g_packet)
error (_(“Remote ‘g’ packet reply is too long: %s”), rs->buf);
to:
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)