mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Decent multiarch with make O=
This commit is contained in:
11
rungdb
11
rungdb
@@ -21,9 +21,10 @@ else
|
||||
brk=""
|
||||
fi
|
||||
|
||||
gdb="$(pwd)/buildroot/output/host/usr/bin/${arch}-linux-gdb"
|
||||
cd buildroot/output/build/linux-?.*.*/
|
||||
if $kgdb; then
|
||||
buildroot_out_dir="$(pwd)/buildroot/output.${arch}~"
|
||||
gdb="${buildroot_out_dir}/host/usr/bin/${arch}-linux-gdb"
|
||||
cd "${buildroot_out_dir}/build"/linux-?.*.*/
|
||||
if "$kgdb"; then
|
||||
cmd="$gdb \
|
||||
-q \
|
||||
-ex 'add-auto-load-safe-path $(pwd)' \
|
||||
@@ -32,7 +33,7 @@ if $kgdb; then
|
||||
"
|
||||
else
|
||||
case "$arch" in
|
||||
x86_64)
|
||||
'x86_64')
|
||||
# http://stackoverflow.com/questions/11408041/how-to-debug-the-linux-kernel-with-gdb-and-qemu/33203642#33203642
|
||||
# http://stackoverflow.com/questions/4943857/linux-kernel-live-debugging-how-its-done-and-what-tools-are-used/42316607#42316607
|
||||
# http://stackoverflow.com/questions/28607538/how-to-debug-linux-kernel-modules-with-qemu/44095831#44095831
|
||||
@@ -50,7 +51,7 @@ else
|
||||
-ex 'lx-symbols ../kernel_module-1.0/'
|
||||
"
|
||||
;;
|
||||
arm)
|
||||
'arm')
|
||||
cmd="$gdb \
|
||||
-q \
|
||||
-ex 'add-auto-load-safe-path $(pwd)' \
|
||||
|
||||
Reference in New Issue
Block a user