[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.11338227 [View]
File: 39 KB, 768x1024, debugging feels.jpg [View same] [iqdb] [saucenao] [google]
11338227

>>11329155
Ya'll are familiar with GDB I'm guessing right?

I'm used to debugging in a general sense, but am relatively new to gdb. HOW THE FUCK DO YOU GET IT TO ACTUALLY DEBUG?

It just keeps printing the fucking hex value at each breakpoint. If I set breakpoint to main, hex. Next line? Hex. It doesn't trace the code at all.

How can I get this piece of shit to actually display the line of code it is tracing? The hex is neat and all but I'm trying to practice some hacking challenges and need to know the context with what I'm working with.

On an additional note, any reason why setting the breakpoint to buffer would trigger a segmentation fault? The buffer is clearly called in the code correctly (as I can execute the program okay, and do various means of testing what is in the buffer). I figure this is probably related to the issue of GDB not tracing the code, so it has no idea when buffer is called.

I already made sure that the directory of both the c code and compiled code are included in GDB. I compiled both in the same directory with the same name, so have no idea wtf is causing this weirdness.

Navigation
View posts[+24][+48][+96]