From the course: Debugging C Code

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Using the GNU debugger in Codespaces

Using the GNU debugger in Codespaces - C Tutorial

From the course: Debugging C Code

Using the GNU debugger in Codespaces

- [Instructor] I don't know for certain, but I guess that the Codespaces debugger is a front end of the GNU debugger. Let's see how it works in here though it's more awkward than using the command line. This is the same dump1 program you saw in another video that demonstrated how GDB works at the command prompt, build it and debug it without any break points. And the program is built with the debugging information included. The debug console is your direct link to the GNU debugger. Here's the command prompt, but it's active only while a program is being debugged. So to get that moving I will set a break point at line 13 and run it again. Now the debug console is active, but remember you must prefix each command with -exec, which is an extra step and can be annoying. What is the value of variable A? print a and the value matches what's shown up here in the variables paint. To see the value at variable a - exec print *a and there is the value 64. It's the first element in the array. To…

Contents