Hi John, The GDB you're using should be fine. Your error is most likely a bug in the GDB implementation in the RISC-V ISA within gem5. I can take a look at it over the next week or so, but if you find a fix for it yourself don't hesitate to submit a patch.
-Alec Roelke On Wed, Jul 17, 2019 at 3:19 PM John Liu <[email protected]> wrote: > Hi, colleges, > > I'm trying to use remote gdb debug for RISCV/gem5.debug in FS mode. The > binaries file I used to try this interface is the Berkely boot loader and > it has been able to boot in FS mode. > > * I enabled the "wait_for_remote_gdb" Params in BaseCPU.py and this Params > worked. > But GDB part (riscv64-unknown-elf-gdb) returned glitch. > > * I tried the "hello world" binary with riscv64-unknown-elf-gdb in SE > mode. > The similar glitch happened. > > * I also tried the remote debug the Berkeley boot loader in Qemu with the > same gdb tool. It works. > > Did I pick the wrong Riscv GDB tool for gem5? Did I miss anything? > > Any opinion will be helpful. I appreciate your time and help! > > Attached are the commands I used and the message I got: > ** Commands > *** The command I used for FS mode is : > build/RISCV/gem5.debug configs/example/riscv_fs.py > *** The command I used for remote gdb is: > riscv64-unknown-elf-gdb -f bbl3 > (gdb) target remote : 7000 > > ** Messages > *** The message I got from Gem5: > gem5 Simulator System. http://gem5.org > gem5 is copyrighted software; use the --copyright option for details. > > gem5 compiled Jul 17 2019 11:55:28 > gem5 started Jul 17 2019 11:59:25 > gem5 executing on riscv_fs, pid 14710 > command line: build/RISCV/gem5.debug configs/example/riscv_fs.py > > > Global frequency set at 1000000000000 ticks per second > warn: DRAM device capacity (8192 Mbytes) does not match the address range > assigned (32768 Mbytes) > info: kernel located at: /home/ riscv_fs/gem5/gem5_ad2039/bbl3 > 0: system.remote_gdb: listening for remote gdb on port 7000 > info: system.cpu: Waiting for a remote GDB connection on port 7000. > 0: system.remote_gdb: remote gdb attached > start load DTB file/home/riscv_fs/gem5/gem5_ad2039/cpu.dtb > Beginning simulation! > info: Entering event queue @ 0. Starting simulation... > warn: Couldn't read data from debugger. > 0: system.remote_gdb: remote gdb detached > This is bbl's dummy_payload. To boot a real kernel, reconfigure bbl > with the flag --with-payload=PATH, then rebuild bbl. Alternatively, > bbl can be used in firmware-only mode by adding device-tree nodes > for an external payload and use QEMU's -bios and -kernel options. > > chosen { > riscv,kernel-start = <payload_start>; > riscv,kernel-end = <payload_end>; > }; > *** message I got from gdb is: > Remote debugging using : 7000 > Remote 'g' packet reply is too long (expected 532 bytes, got 1468 bytes): > 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000002d111400000000000000000000000000000000000000000000000000002000000a0000000000000000000000000000000000000000000000000000003f702f5d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 > > > > > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
