mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
gem5: update to d4b3e064adeeace3c3e7d106801f95c14637c12f
Mostly for --param to control debug properly. Less README workarounds, more ./run automation, oh yeah.
This commit is contained in:
43
README.adoc
43
README.adoc
@@ -8947,43 +8947,6 @@ When you want to break, just do a `Ctrl-C` on GDB shell, and then `continue`.
|
||||
|
||||
And we now see the boot messages, and then get a shell. Now try the `/count.sh` procedure described for QEMU: <<gdb-step-debug-kernel-post-boot>>.
|
||||
|
||||
==== gem5 wait for GDB to connect before running
|
||||
|
||||
By default, gem5 does not wait for GDB to connect, which means that you might go past your point of interest.
|
||||
|
||||
This can however be enabled with the `wait_for_remote_gdb` option:
|
||||
|
||||
....
|
||||
patch -d "$(./getvar gem5_src_dir)" -p 1 < patches/manual/gem5-wait-gdb.patch
|
||||
....
|
||||
|
||||
Just just proceed as usual:
|
||||
|
||||
....
|
||||
./run --gem5
|
||||
....
|
||||
|
||||
TODO why is this required, on another shell:
|
||||
|
||||
....
|
||||
./gem5-shell
|
||||
....
|
||||
|
||||
and finally:
|
||||
|
||||
....
|
||||
./run-gdb --gem5 start_kernel
|
||||
....
|
||||
|
||||
If I don't connect to the other shell on baremetal, the simulation breaks with:
|
||||
|
||||
....
|
||||
....
|
||||
|
||||
You have to remove the patch if you want to go back to running without waiting for GDB to connect.
|
||||
|
||||
Bibliography: https://stackoverflow.com/questions/49296092/how-to-make-gem5-wait-for-gdb-to-connect-to-reliably-break-at-start-kernel-of-th
|
||||
|
||||
===== gem5 GDB step debug kernel aarch64
|
||||
|
||||
TODO: GDB fails with:
|
||||
@@ -10027,12 +9990,6 @@ Alternatively, skip directly to the C program main function with:
|
||||
./run-gdb --arch arm --baremetal prompt main
|
||||
....
|
||||
|
||||
gem5 step debug requires a patch as mentioned at <<gem5-wait-for-gdb-to-connect-before-running>>:
|
||||
|
||||
....
|
||||
patch -d "$(./getvar gem5_src_dir)" -p 1 < patches/manual/gem5-wait-gdb.patch
|
||||
....
|
||||
|
||||
and then proceed as usual:
|
||||
|
||||
....
|
||||
|
||||
Reference in New Issue
Block a user