Skip to content

Commit

Permalink
labs/sysdev-application-development-and-debugging: document gdb warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Opdenacker <[email protected]>
Reported-by: Mark Long <[email protected]>
  • Loading branch information
Michael Opdenacker committed Dec 8, 2023
1 parent df3360f commit 74a3031
Showing 1 changed file with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,27 @@ \section{Post mortem analysis}
target to get a \code{core.xxx} file dumped when you run
\code{nunchuk-mpd-client} again.

Once you have such a file, inspect it with \ifdefstring{\labboard}{beagleplay}{\code{aarch64-linux-gdb}}{\code{arm-linux-gdb}} on
the host, set the \code{sysroot} setting, and then generate
a backtrace to see where the program crashed.
Once you have such a file, inspect it with \ifdefstring{\labboard}{beagleplay}{\code{aarch64-linux-gdb}}{\code{arm-linux-gdb}}
on the host as explained in the lectures.

Don't be surprised, the below warnings are expected:

{\small
\begin{verbatim}
warning: Can't open file /root/nunchuk-mpd-client during file-backed mapping note processing
warning: Can't open file /usr/lib/libc.so.6 during file-backed mapping note processing
warning: Can't open file /usr/lib/libmpdclient.so.2.20 during file-backed mapping note processing
warning: Can't open file /usr/lib/ld-linux-armhf.so.3 during file-backed mapping note processing
warning: core file may not match specified executable file.
\end{verbatim}
}

In the \code{gdb} shell, set the \code{sysroot} setting as previously, and then
generate a backtrace to see where the program crashed.
You can even see the value of all variables in the different
function contexts of your program:

Expand Down

0 comments on commit 74a3031

Please sign in to comment.