You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.adoc
+31-9Lines changed: 31 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8351,7 +8351,7 @@ TODO do even more awesome offline post-mortem analysis things, such as:
8351
8351
8352
8352
==== QEMU record and replay
8353
8353
8354
-
QEMU runsare not deterministic by default, however it does support a record and replay mechanism that allows you to replay a previous run deterministically:
8354
+
QEMU runs, unlike gem5, are not deterministic by default, however it does support a record and replay mechanism that allows you to replay a previous run deterministically.
8355
8355
8356
8356
This awesome feature allows you to examine a single run as many times as you would like until you understand everything:
8357
8357
@@ -8410,8 +8410,8 @@ TODO `arm` and `aarch64` only seem to work with initrd since I cannot plug a wor
@@ -8466,15 +8466,21 @@ just appears to output both cores intertwined without any clear differentiation.
8466
8466
8467
8467
==== gem5 tracing
8468
8468
8469
-
gem5 unlike QEMU is deterministic by default without needing to replay traces
8470
-
8471
-
But it also provides a tracing mechanism documented at: link:http://www.gem5.org/Trace_Based_Debugging[] to allow easily inspecting certain aspects of the system:
8469
+
gem5 provides also provides a tracing mechanism documented at: link:http://www.gem5.org/Trace_Based_Debugging[]:
This would produce a lot of output however, so you will likely not want that when tracing a Linux kernel boot instructions. But it can be very convenient for smaller traces.
8483
+
8478
8484
List all available debug flags:
8479
8485
8480
8486
....
@@ -8488,6 +8494,8 @@ less "$(./getvar gem5_src_dir)/src/cpu/SConscript"
8488
8494
less "$(./getvar gem5_src_dir)/src/cpu/exetrace.cc"
8489
8495
....
8490
8496
8497
+
The traces are generated from `DPRINTF(<trace-id>` calls scattered throughout the code.
8498
+
8491
8499
As can be seen on the `Sconstruct`, `Exec` is just an alias that enables a set of flags.
8492
8500
8493
8501
Be warned, the trace is humongous, at 16Gb.
@@ -11779,6 +11787,11 @@ We have some link:https://github.com/pexpect/pexpect[pexpect] automated tests fo
11779
11787
./test-gdb
11780
11788
....
11781
11789
11790
+
Sources:
11791
+
11792
+
* link:build-test-gdb[]
11793
+
* link:test-gdb[]
11794
+
11782
11795
Not all of them are passing right now due to: <<gem5-gdb-step-debug-kernel-aarch64>>.
11783
11796
11784
11797
If something goes wrong, re-run the test commands manually and use `--verbose` to understand what happened:
@@ -11794,10 +11807,19 @@ and possibly repeat the GDB steps manually with the usual:
11794
11807
./run-gdb --arch arm --baremetal add --no-continue --verbose
11795
11808
....
11796
11809
11797
-
Sources:
11810
+
To debug GDB problems on gem5, you might want to enable the following <<gem5-tracing,tracing>> options:
11798
11811
11799
-
* link:build-test-gdb[]
11800
-
* link:test-gdb[]
11812
+
....
11813
+
./run \
11814
+
--arch arm \
11815
+
--baremetal add \
11816
+
--wait-gdb \
11817
+
--trace GDBRecv,GDBSend \
11818
+
--trace-stdout \
11819
+
;
11820
+
....
11821
+
11822
+
====== Test GDB Linux kernel
11801
11823
11802
11824
For the Linux kernel, do the following manual tests for now.
0 commit comments