this post was submitted on 21 May 2024
1610 points (98.8% liked)

Programmer Humor

32724 readers
519 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 7 months ago (1 children)

Whoo that seems complicated, I mean you akready compile a debug version.

Thanks for the explanation!

[โ€“] [email protected] 3 points 7 months ago* (last edited 7 months ago) (1 children)

The debug version you compile doesn't affect the code; it just stores more information about symbols. The whole shtick about the debugger replacing instructions with INT3 still happens.

You can validate that the code isn't affected yourself by running objdump on two binaries, one compiled with debug symbols and one without. Otherwise if you're lazy (like me ๐Ÿ˜„):

https://stackoverflow.com/a/8676610

And for completeness: https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Debugging-Options.html

[โ€“] [email protected] 1 points 7 months ago

Thanks, excellent information!

How come debug exes are bigger? Is the nifty stuff tucked on at the end?