os-tutorial icon indicating copy to clipboard operation
os-tutorial copied to clipboard

14-checkpoint - remote 'g' packet reply is too long

Open coded7861 opened this issue 4 years ago • 1 comments

Hi

I am consistently the getting the below error on gdb when I do make debug:

Remote 'g' packet reply is too long (expected 308 bytes, got 344 bytes): 31000000000000000204000088520f00b46f0000ec520f00940f0f00d86f00005acc0e000200000008000000100000001000000010000000100000001000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000
Reading symbols from kernel.elf...

Although, I am able to apply breakpoint:

(gdb) b main 
Breakpoint 1 at 0x100d: file kernel/kernel.c, line 4.
(gdb) continue
The program is not being run.

Any work around for this?

coded7861 avatar Jun 28 '20 12:06 coded7861

I'm on GDB 9.2 and testing Qemu on an i7 - this is still happening. The solution that worked for me is the second option (patch) here: https://wiki.osdev.org/QEMU_and_GDB_in_long_mode.

Also a tip - don't apply the patch with an editor that reformats the code, GDB's source is sensitive for that.


Update: also not sure what is really going on, however even with the patch applied on the cross compiled GDB, variable prints are not working (such as print video_memory) - they just emit some bogus value. I tried to switch architecture with set arch but none of them is fixing the package length issue. However I tried the system provided gdb and that works just fine. No package length issue with the Qemu workflow and prints are correct too. Not sure if later it will be a problem.

itarato avatar Nov 14 '20 18:11 itarato