[bootlin/training-materials updates] master: debugging: labs: add a note about architecture to be set for gdb (b338ee23)

Clément Léger clement.leger at bootlin.com
Fri Nov 25 12:41:18 CET 2022


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/b338ee230a164bdbe31ab82edce04e5afdf6aa24

>---------------------------------------------------------------

commit b338ee230a164bdbe31ab82edce04e5afdf6aa24
Author: Clément Léger <clement.leger at bootlin.com>
Date:   Fri Nov 25 12:41:18 2022 +0100

    debugging: labs: add a note about architecture to be set for gdb
    
    Signed-off-by: Clément Léger <clement.leger at bootlin.com>


>---------------------------------------------------------------

b338ee230a164bdbe31ab82edce04e5afdf6aa24
 labs/debugging-kernel-debugging/debugging-kernel-debugging.tex | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex b/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
index 8ea81165..0591c51d 100644
--- a/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
+++ b/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
@@ -187,6 +187,15 @@ $ gdb-multiarch vmlinux
 (gdb) target remote /dev/pts/8
 \end{bashinput}
 
+Note: if you do not specify a file to be used, gdb-multiarch won't be able to
+detect the architecture automatically and the target command will fail. In that
+case, you can set the architecture using:
+
+\begin{bashinput}
+(gdb) set arch arm
+(gdb) set gnutarget elf32-littlearm
+\end{bashinput}
+
 Before continuing the execution, add a breakpoint on
 \code{watchdog_set_drvdata()} using the \code{break} GDB command and then
 continue the execution using the continue \code{command}




More information about the training-materials-updates mailing list