Why are Linux debug builds of my C++ app so big?
-
@ben_lubar said in Why are Linux debug builds of my C++ app so big?:
@pie_flavor said in Why are Linux debug builds of my C++ app so big?:
@blakeyrat said in Why are Linux debug builds of my C++ app so big?:
@bulb said in Why are Linux debug builds of my C++ app so big?:
The Windows process also has the disadvantage that all the compilers, while writing different .obj files, are all writing the debug information into one .pdb, which slows things down. It is also managed by a separate process that sometimes causes problems on build servers. It also prevents things like distcc.
Again I must note that this is only the case when using shitty languages that suck.
What, in your opinion, is an example of a non-shitty systems language that doesn't suck?
Trick question. All languages suck.
But in very different ways. It's the law of conservation of annoyance: annoyance can neither be created not destroyed, just moved around and hopefully shoved out of sight. I first formulated this law while working with physics models. Some has low levels of annoyance everywhere, others were fine except for one really awful part. But it applies to software as well.
-
@benjamin-hall Languages cannot be described in a language that does not suck because one such language does not exist. Therefore, languages can never not suck.
-
@blakeyrat Why not make one?
-
@pie_flavor Sure, you can buy my time for $100/hour.
-
@pie_flavor said in Why are Linux debug builds of my C++ app so big?:
@blakeyrat Why not make one?
-
@blakeyrat Oh, no, not for me. I like my shitty languages that suck. But you could use it to transform the software industry! Cause paradigm shifts and a bunch of other things that SBS filters out.
-
@pie_flavor said in Why are Linux debug builds of my C++ app so big?:
things that SBS filters out.
Why do I give a shit what Australian TV thinks.
-
@blakeyrat I was referring to Sans Bullshit Sans.
-
@blakeyrat said in Why are Linux debug builds of my C++ app so big?:
@pie_flavor said in Why are Linux debug builds of my C++ app so big?:
things that SBS filters out.
Why do I give a shit what Australian TV thinks.
@pie_flavor said in Why are Linux debug builds of my C++ app so big?:
@blakeyrat I was referring to Sans Bullshit Sans.
To be fair, these statements are not mutually exclusive.
-
@pie_flavor said in Why are Linux debug builds of my C++ app so big?:
ans Bullshit Sans.
Yah I have no idea what that is but what a great burn I'm sure.
-
-
@pie_flavor Heh, that's actually pretty neat. (I wish they had a monospace version of it. I'd totally use it as my latex editing font.)
-
@cvi It's
info sharedlibrary
. This gets you the start and end offsets of each library.
If the stack trace mentions address123
, andlibfoo.so
is loaded at108
, then you cangdb libfoo.so
,info line *(123 - 108)
, and it'll spit out a code location.I might be misremembering the exact syntax for
info line
.
-
@pleegwat Thanks.
I briefly tried out using
dlinfo()
/link_map::l_addr
instead ofinfo sharedlibrary
, and that seems to work out. So, if I get a bunch of addresses from a stack trace (via e.g.,backtrace()
) and subtract (the correct)l_addr
from those, it seems that I can use the resulting value withgdb libfoo.so
+info line *value
after the fact and get the corresponding source location printed that way.Yay.
-
@unperverted-vixen said in Why are Linux debug builds of my C++ app so big?:
@bjolling said in Why are Linux debug builds of my C++ app so big?:
@remi Then you go to PROD with the same Release build, omitting the .pdb files
Why omit the PDB files? Is saving disk space really worth throwing away that potential information source for when something does go wrong?
The C++ program I used to work on was installed at our clients' infrastructure. So PDBs were omitted to avoid them leaving our control because they contain information that can be helpful to reverse engineer the binaries. As somebody else already mentioned, in case of a crash clients would send their dump files to us and we would use our PDBs internally to find the cause of the crash.
-
@blakeyrat said in Why are Linux debug builds of my C++ app so big?:
@remi A better idea is to just never use C++ which is a shitty language and code in something where the debug builds have all the same optimizations, and also where optimizations don't break shit.
Sure, suggest me a good language that runs on DOS, GNU/Linux, and shitty devices that only work with the non-standard C subset provided by it's manufacturer.
-
@sockpuppet7 said in Why are Linux debug builds of my C++ app so big?:
@blakeyrat said in Why are Linux debug builds of my C++ app so big?:
@remi A better idea is to just never use C++ which is a shitty language and code in something where the debug builds have all the same optimizations, and also where optimizations don't break shit.
Sure, suggest me a good language that runs on DOS, Linux, and shitty devices that only work with the non-standard C subset provided by it's manufacturer.
FORTH LOVE? IF HONK THEN
-
@dkf said in Why are Linux debug builds of my C++ app so big?:
@sockpuppet7 said in Why are Linux debug builds of my C++ app so big?:
@blakeyrat said in Why are Linux debug builds of my C++ app so big?:
@remi A better idea is to just never use C++ which is a shitty language and code in something where the debug builds have all the same optimizations, and also where optimizations don't break shit.
Sure, suggest me a good language that runs on DOS, Linux, and shitty devices that only work with the non-standard C subset provided by it's manufacturer.
FORTH LOVE? IF HONK THEN
LINE NUMBER ZERO CODE VARIABLE ONE EQUALS THE ADDRESS OF VARIABLE ZERO GOTO ONE LINE NUMBER ONE CODE READ GOTO ONE ZERO LINE NUMBER ONE ZERO CODE THE VALUE AT VARIABLE ONE EQUALS THE JUMP REGISTER GOTO ONE ONE IF THE JUMP REGISTER IS ONE GOTO ONE ZERO ZERO IF THE JUMP REGISTER IS ZERO LINE NUMBER ONE ONE CODE VARIABLE ONE EQUALS THE ADDRESS OF THE VALUE BEYOND VARIABLE ONE GOTO ONE LINE NUMBER ONE ZERO ZERO CODE VARIABLE ONE EQUALS THE ADDRESS OF VARIABLE ZERO GOTO ONE ZERO ONE LINE NUMBER ONE ZERO ONE CODE THE JUMP REGISTER EQUALS THE VALUE AT VARIABLE ONE GOTO ONE ONE ZERO IF THE JUMP REGISTER IS ONE GOTO ONE ZERO ZERO ZERO IF THE JUMP REGISTER IS ZERO LINE NUMBER ONE ONE ZERO CODE PRINT ONE GOTO ONE ONE ONE LINE NUMBER ONE ONE ONE CODE VARIABLE ONE EQUALS THE ADDRESS OF THE VALUE BEYOND VARIABLE ONE GOTO ONE ZERO ONE LINE NUMBER ONE ZERO ZERO ZERO CODE PRINT ZERO
-
@sockpuppet7 Rust?