4 ms·
I'm surprised gdb wouldn't automatically consult /proc/PID/exe to read symbols. It seems more reliable than checking argv[0] and then reading the file at that p
by ekimekim 6y ago
I'm surprised gdb wouldn't automatically consult /proc/PID/exe to read symbols. It seems more reliable than checking argv[0] and then reading the file at that path.
- bobbyi_settv 6y agoMaybe it's for portability. The /proc filesystem doesn't exist on every OS supported by gdb.
- kelnos 6y agoSure, but I'm sure there are tons of Linux-specific things in gdb behind #ifdefs already; this seems like a pretty worthwhile thing that justifies adding one more.
- account42 6y agoThis won't work if the debug symbols are in a separate file though.