Questions tagged [gdb]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9
votes
1answer
3k views

Surprise with GDB way of reading bfType BMP headers

Why if i check with the xxd an image eg. small.bmp the bfType is 0x424d and when you run copy in GDB the value of bf.bfType is 19778 and the program "copy" in line 55 check with 0x4d42. Is it reading ...
1
vote
1answer
217 views

pset5 load function segfault do not show in gdb

I cannot figure what's wrong with the code, it gives me a segfault, but runs in valgrind and in gdb. So far, i only wrote the load function, so anything else is still empty. #include <stdbool....
0
votes
2answers
599 views

Variable optimized out eventhough it will be used later

When trying to debug my implementation of server.c, asking gdb to print out the variable line results in a <optimized out>. (gdb) p line (gdb) <optimized out> After doing a bit of ...
0
votes
1answer
87 views

Where to link libraries to the debugger in ide.cs50.io?

I need to debug a program that uses the crypt library, so I have to use -lcrypt, but the debugger automatically uses make, and I don't know how to tell him to use clang with arguments. So here I ...