Re: Reducing debug info for stack traces, while preserving for gdb

2022-12-24 Thread Iain Buclaw via D.gnu
Hi, On Wednesday, 14 December 2022 at 22:23:49 UTC, Witold Baryluk wrote:> The bulk of information is in `.debug_info`. But I believe it contains way more information than is really needed to just produce line numbers. You're observation is correct. GDC uses libbacktrace to produce stack

Re: Reducing debug info for stack traces, while preserving for gdb

2022-12-14 Thread Witold Baryluk via D.gnu
For example to give you some context. This is an example small app, the actual app is significantly larger (binary with debug symbols is about 20MB, without debug symbols only 2-3MB). ``` $ ~/bloaty/build/bloaty binary-O3-g-g3-gz # (original binary) FILE SIZEVM SIZE

Reducing debug info for stack traces, while preserving for gdb

2022-12-14 Thread Witold Baryluk via D.gnu
Hi, I am trying to split debug symbols out of final binary, to reduce its size. But I would like to preserve at least line numbers in the stacktraces from `Exception`s. Linux, amd64. gdc 12.2.0 on Debian testing. Binary is compiled using `-O3 -g -g3` (and possibly -gz). I then use `objcopy`