Using GDB and Valgrind together to find Memory Leaks

preview_player
Показать описание
Here I explain a simple C program with a memory leak and how to use GDB and Valgrind together to find leaks.
Please let me know if you have any questions!
Рекомендации по теме
Комментарии
Автор

Thanks for sharing...this definitely helps!

eddaly
Автор

This is exactly what I needed to debug my compsci homework, thanks!

pacobalthazar
Автор

Whow I had a memory leak in my brain and this help me immensely. sory for poor english. Good job!

StevenOrtizMusic
Автор

Hi, I want to debug a php-extension (for memory leak)written in C/C++. Reguest is given through apache server. How do we debug using gdb+ valgrind. Can you help

amberkhandelwal
Автор

A great video!
Unfortunately it doesn't work like that on my machine :((
In gdb after the `start` command I typed in

`target remote | --pid=100999`

and got

`A program is being debugged already.  Kill it? (y or n)`

If I chose `y` it follows with

`Remote debugging using | --pid
=100999
sh: 1: not found
Remote communication error.  Target disconnected.: Connection terminated by the other party.`

And if I choose `n` I get

`Program not killed.
(gdb)`

Maybe you know what can be done to handle it?

ФёдорПоцелуев-йс