Back to Browse

Advanced Programming in the UNIX Environment: Week 05, Segment 12 - Using gdb to understand pointers

1.8K views
Sep 30, 2021
19:55

In this video lecture, we use the debugger to examine memory locations in a running program and illustrate how pointers and arrays work in the C programming language. Note: in the video, we are using `sizeof(buf2)` in a call to `strncpy(3)`; `sizeof` returns 8, the size of a pointer on this platform, which only happens to be the right size. The correct use of `sizeof` is explained in much more detail in this video: https://www.youtube.com/watch?v=FyPqII2rewA Slides for this lecture: https://stevens.netmeister.org/631/05-gdb-5.pdf Code examples: https://stevens.netmeister.org/631/gdb-examples Course website: https://stevens.netmeister.org/631/ 00:00 Introduction 00:29 PrintBufs 07:00 Verifying Buffs 12:22 Overflowing Buffers 17:41 Summary

Download

0 formats

No download links available.

Advanced Programming in the UNIX Environment: Week 05, Segment 12 - Using gdb to understand pointers | NatokHD