File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 2020#ifndef GDB_ARCH_XTENSA_H
2121#define GDB_ARCH_XTENSA_H
2222
23+ #include <stdint.h>
24+
2325/* Xtensa ELF core file register set representation ('.reg' section).
2426 Copied from target-side ELF header <xtensa/elf.h>. */
2527
Original file line number Diff line number Diff line change @@ -8970,11 +8970,17 @@ remote_target::process_g_packet (struct regcache *regcache)
89708970 buf_len = strlen (rs -> buf .data ());
89718971
89728972 /* Further sanity checks, with knowledge of the architecture. */
8973- if (buf_len > 2 * rsa -> sizeof_g_packet )
8974- error (_ ("Remote 'g' packet reply is too long (expected %ld bytes, got %d "
8975- "bytes): %s" ),
8976- rsa -> sizeof_g_packet , buf_len / 2 ,
8977- rs -> buf .data ());
8973+ if (buf_len > 2 * rsa -> sizeof_g_packet ) {
8974+ rsa -> sizeof_g_packet = buf_len ;
8975+ for (i = 0 ; i < gdbarch_num_regs (gdbarch ); i ++ ){
8976+ if (rsa -> regs [i ].pnum == -1 )
8977+ continue ;
8978+ if (rsa -> regs [i ].offset >= rsa -> sizeof_g_packet )
8979+ rsa -> regs [i ].in_g_packet = 0 ;
8980+ else
8981+ rsa -> regs [i ].in_g_packet = 1 ;
8982+ }
8983+ }
89788984
89798985 /* Save the size of the packet sent to us by the target. It is used
89808986 as a heuristic when determining the max size of packets that the
You can’t perform that action at this time.
0 commit comments