https://github.com/gem5/gem5/issues/22

Has anyone ever made this work?

68af229490fc811aebddf68b3e2e09e63a5fa475, gdb 7.11.1 built by Buildroot

An extremely similar aarch64 setup works for QEMU, and x86 and arm
both work for gem5, just aarch64 does not.

gem5 command:

```
M5_PATH='/home/ciro/bak/git/linux-kernel-module-cheat/buildroot/output.aarch64~/build/gem5-1.0/system'
 
'/home/ciro/bak/git/linux-kernel-module-cheat/buildroot/output.aarch64~/build/gem5-1.0/gem5/build/ARM/gem5.opt'
 
'/home/ciro/bak/git/linux-kernel-module-cheat/buildroot/output.aarch64~/build/gem5-1.0/gem5/configs/example/fs.py'
--checkpoint-dir='./m5out/cpts/aarch64'
--disk-image='/home/ciro/bak/git/linux-kernel-module-cheat/buildroot/output.aarch64~/images/rootfs.ext2'
--kernel='/home/ciro/bak/git/linux-kernel-module-cheat/buildroot/output.aarch64~/build/linux-custom/vmlinux'
--mem-size=256MB --num-cpus='1'
--command-line='earlyprintk=pl011,0x1c090000 console=ttyAMA0
lpj=19988480 rw loglevel=8 mem=256MB root=/dev/sda nokaslr norandmaps
printk.devkmsg=on printk.time=y'
--dtb-file='/home/ciro/bak/git/linux-kernel-module-cheat/buildroot/output.aarch64~/build/gem5-1.0/gem5/system/arm/dt/armv8_gem5_v1_1cpu.dtb'
--machine-type=VExpress_GEM5_V1
```

gdb command:

```
/home/ciro/bak/git/linux-kernel-module-cheat/buildroot/output.aarch64~/host/usr/bin/aarch64-linux-gdb
 -q -ex 'add-auto-load-safe-path
/home/ciro/bak/git/linux-kernel-module-cheat/buildroot/output.aarch64~/build/linux-custom'
-ex 'file vmlinux' -ex 'target remote localhost:7000'  -ex 'continue'
-ex 'lx-symbols ../kernel_module-1.0/'
```

gem5 stdout says:

```
4107766500: system.remote_gdb: remote gdb attached
warn: Couldn't read data from debugger.
4107767500: system.remote_gdb: remote gdb detached
```

Error message:

```
Reading symbols from vmlinux...done.
Remote debugging using localhost:7000
Remote 'g' packet reply is too long:
000000000000000090a4f90fc0ffffff4875450ec0ffffff01000000000000000100000000000000000000000000000001000000000000000000000000000000ffffffffffffffff646d60616b64fffe7f7f7f7f7f7f7f7f0101010101010101300000000000000000000000ffffffff48454422207d2c2017162f21262820160100000000000000070000000000000001000000000000004075450ec0ffffffc073450ec0ffffff82080000000000004075450ec0ffffff8060f90fc0ffffffc073450ec0fffffff040900880ffffff40ab400ec0ffffff586d900880ffffff0068a20ec0ffffff903b010880ffffffc8ff210880ffffff903b010880ffffffccff210880ffffff050000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
```

Tried to add `set tdesc filename aarch64.xml` as mentioned at:
https://stackoverflow.com/questions/27411621/remote-g-packet-reply-is-too-long-aarch64-arm64/27430836#27430836
but no change.

This is the exact reproduction setup:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/a1a6a5d6fb417238ce4064ef7b3319686f02fd6b#gem5-gdb-step-debug-kernel-aarch64
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to