mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
make gdb test automation even awesomer
This commit is contained in:
20
README.adoc
20
README.adoc
@@ -32,7 +32,7 @@ Reserve 12Gb of disk and run:
|
||||
....
|
||||
git clone https://github.com/cirosantilli/linux-kernel-module-cheat
|
||||
cd linux-kernel-module-cheat
|
||||
./build --download-dependencies
|
||||
./build --download-dependencies qemu-buildroot
|
||||
./run
|
||||
....
|
||||
|
||||
@@ -1321,7 +1321,7 @@ Tested on 4f4749148273c282e80b58c59db1b47049e190bf + 1.
|
||||
|
||||
=== GDB step debug early boot
|
||||
|
||||
TODO sucessfully debu the very first instruction that the Linux kernel runs, before `start_kernel`!
|
||||
TODO successfully debug the very first instruction that the Linux kernel runs, before `start_kernel`!
|
||||
|
||||
Break at the very first instruction executed by QEMU:
|
||||
|
||||
@@ -9116,6 +9116,8 @@ Remote debugging using localhost:7000
|
||||
Remote 'g' packet reply is too long: 000000000000000090a4f90fc0ffffff4875450ec0ffffff01000000000000000100000000000000000000000000000001000000000000000000000000000000ffffffffffffffff646d60616b64fffe7f7f7f7f7f7f7f7f0101010101010101300000000000000000000000ffffffff48454422207d2c2017162f21262820160100000000000000070000000000000001000000000000004075450ec0ffffffc073450ec0ffffff82080000000000004075450ec0ffffff8060f90fc0ffffffc073450ec0fffffff040900880ffffff40ab400ec0ffffff586d900880ffffff0068a20ec0ffffff903b010880ffffffc8ff210880ffffff903b010880ffffffccff210880ffffff050000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
....
|
||||
|
||||
See: <<remote-g-packet-reply-is-too-long>>
|
||||
|
||||
and gem5 says:
|
||||
|
||||
....
|
||||
@@ -10165,6 +10167,10 @@ You can also find executables that don't use the bootloader at all under `bareme
|
||||
./run --arch arm --baremetal arch/arm/no_bootloader/semihost_exit --wait-gdb
|
||||
....
|
||||
|
||||
The cool thing about those examples is that you start at the very first instruction of your program, which gives more control.
|
||||
|
||||
However, those examples tend to be less portable, so we use examples with the bootloader for the most part.
|
||||
|
||||
Alternatively, skip directly to the C program main function with:
|
||||
|
||||
....
|
||||
@@ -11450,6 +11456,8 @@ We have some link:https://github.com/pexpect/pexpect[pexpect] automated tests fo
|
||||
./test-gdb
|
||||
....
|
||||
|
||||
Not all of them are passing right now due to: <<gem5-gdb-step-debug-kernel-aarch64>>.
|
||||
|
||||
If something goes wrong, re-run the test commands manually and use `--verbose` to understand what happened:
|
||||
|
||||
....
|
||||
@@ -11457,12 +11465,18 @@ If something goes wrong, re-run the test commands manually and use `--verbose` t
|
||||
./run-gdb --arch arm --baremetal add --test --verbose
|
||||
....
|
||||
|
||||
and possibly repeat the GDB steps manually with the usual:
|
||||
|
||||
....
|
||||
./run-gdb --arch arm --baremetal add --no-continue --verbose
|
||||
....
|
||||
|
||||
Sources:
|
||||
|
||||
* link:build-test-gdb[]
|
||||
* link:test-gdb[]
|
||||
|
||||
For the Linux kenel, do the following manual tests for now.
|
||||
For the Linux kernel, do the following manual tests for now.
|
||||
|
||||
Shell 1:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user