Debugging C++ Code: A Practical and Interactive Guide - Sebastian Theophil - CppNow 2023

  Рет қаралды 5,690

CppNow

CppNow

9 ай бұрын

www.cppnow.org​
/ cppnow
---
Nobody Can Program Correctly: A Practical and Interactive Guide to Debugging C++ Code - Sebastian Theophil - CppNow 2023
Slides: github.com/boostcon
---
We like to write code but-despite our best efforts-we make mistakes. Our program will contain bugs. Sometimes, we don’t write what we mean to write, sometimes we don’t understand an aspect of our programming language and at other times we lack-or fail to consider-some critical information about our program’s system environment. As a result, our program will not behave correctly. What do we do now?
In this talk, I would like to take you through the entire debugging process, starting with a program that crashes. What do we do next? Which questions do we have to ask? What information do we need? What can we do to find the cause of the crash? Which tools can help us in this quest, and, last but not least, what can we do to make sure this bug never happens again?
Thanks to real-world examples that we have encountered-and debugged-at think-cell over the years, you will learn how to reproduce, locate, understand and fix even the most difficult bugs.
---
Sebastian Theophil
Sebastian has been working at think-cell Software since its founding in 2002. In the last few years, among many other things, he has ported think-cell to run on macOS. He is also the maintainer of the typescripten project which lets programmers call JavaScript libraries from C++ code compiled to WebAssembly in a convenient and type-safe way. He enjoys leaving his desk from time to time to talk at international C++ conferences.
---
Video Sponsors: think-cell and Bloomberg Engineering
Audience Audio Sponsors: Innoplex and Maryland Research Institute
---
Videos Filmed & Edited By Bash Films: bashfilms.com/
KZbin Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
CppNow 2024
www.cppnow.org​
/ cppnow
---
#boost #cpp #debugging

Пікірлер: 6
@FalcoGer
@FalcoGer 9 ай бұрын
56:08 if your test with random data fails, then you should definitely print out the seed used to create the random data. A good idea would be to use special cases (0, 1, -1, int_min, int_max, int_min + 1, int_max - 1, and whatever might be special for your case) and an assortment of random inputs.
@about2mount
@about2mount 4 ай бұрын
Write a Python program to read through your files to check and or count for mistakes in your C++ code. In fact many are doing this already including myself. I use one to simply read and count every open tag as ( and { and [ and count them then count all the closing tags as ) and } and ] then check for even numbers as pairs. If i get an odd number I throw a line number and what type of tag is missing.
@alanwest6949
@alanwest6949 6 ай бұрын
The bugs we write are reflections of unresolved emotional issue in the soul. Those who have (debugged) healed their soul of all unresolved emotional issues, would write all correct code.
@retropaganda8442
@retropaganda8442 8 ай бұрын
26:57 You also need to be aware that the same physical shared memory may be mapped at different virtual addresses in different processes (or in the same process if you map it several times), so you can't store any pointer in there.
@victotronics
@victotronics 5 ай бұрын
It seems that lectures about debugging use 80 percent examples from threading, and the remainder examples from using "star pointers". So if you don't thread, and write modern C++ you will not have bugs?
@StefaNoneD
@StefaNoneD 9 ай бұрын
I'm pretty senstive to noise. There is a lot of background noise to hear. I think the microphone was not near enough to the mouth and the gain too high. I hope, presenters are more sensitive to that in future. Another thing is: I don't see where the presenter is pointing to with his finger. So maybe he should just use the mouse cursor.
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 12 МЛН
Sigma Girl Education #sigma #viral #comedy
00:16
CRAZY GREAPA
Рет қаралды 107 МЛН
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 164 МЛН
Black Magic 🪄 by Petkit Pura Max #cat #cats
00:38
Sonyakisa8 TT
Рет қаралды 39 МЛН
Sean Baxter: Safe C++
1:28:00
Tristan Brindle
Рет қаралды 7 М.
The Worst Best Practices - Jason Turner - [CppNow 2021]
1:29:14
Making Systems Programming Accessible by Andrew Kelley
47:47
TigerBeetle
Рет қаралды 31 М.
ЭТОТ ЗАБЫТЫЙ ФЛАГМАН СИЛЬНО ПОДЕШЕВЕЛ! Стоит купить...
12:54
Thebox - о технике и гаджетах
Рет қаралды 154 М.
Задача APPLE сделать iPHONE НЕРЕМОНТОПРИГОДНЫМ
0:57
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 1,9 МЛН
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 4 МЛН
Xiaomi Note 13 Pro по безумной цене в России
0:43
Простые Технологии
Рет қаралды 2,1 МЛН
Apple watch hidden camera
0:34
_vector_
Рет қаралды 57 МЛН