Skip to Content
Embedded Programming with Modern C++ Cookbook
book

Embedded Programming with Modern C++ Cookbook

by Igor Viarheichyk
April 2020
Intermediate to advanced
412 pages
9h 58m
English
Packt Publishing
Content preview from Embedded Programming with Modern C++ Cookbook

How to do it...

We have learned how to copy an application to the target system and run it there. Now, let's learn how to start debugging an application on a target system using GDB. In this recipe, we will only learn how to invoke the debugger and run applications in the debugger environment. It will be used as a foundation for more advanced and practical debugging techniques later:

  1. Switch to the QEMU window.
  2. If you have not done so already, log in using pi as the username and raspberry as the password.
  3. Run the following command:
$ gdb ./hello
  1. This will open the gdb command line.
  2. Type run to run the application:
(gdb) run
  1. You should see Hello, world in the output.
  2. Now, run the quit command, or just q:
(gdb) q

This terminates the debugging ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ System Programming Cookbook

C++ System Programming Cookbook

Onorato Vaticone
C++ Cookbook

C++ Cookbook

D. Ryan Stephens, Christopher Diggins, Jonathan Turkanis, Jeff Cogswell

Publisher Resources

ISBN: 9781838821043Supplemental Content