bluecherrydvr / bluecherry-apps

Bluecherry surveillance system (server application)
http://www.bluecherrydvr.com
GNU General Public License v2.0
217 stars 68 forks source link

Put stripped debug symbols back into bluecherry-dbg #681

Closed andrey-utkin closed 7 months ago

andrey-utkin commented 7 months ago

Previously, the debug symbols were discarded by our building environment.

With this change, bluecherry-dbg packages again contain the debug symbols stripped from the built code.

Alternatively, we could change this code to "dh_strip --keep-debug" which adds 7 MB to bluecherry.deb, taking it from 28M to 35M.

The situation with instant access to crash backtraces enriched with debug symbols is now the following: the stack trace logged by bc-server itself lists the libraries for every stack frame, but not function names or line nubmers. This info is in the debug info shipped, but it is not used by glibc's backtrace() (wouldn't even if we avoid stripping overall).

The ways to use all the debug info are:

sudo -u bluecherry gdb -ex run -ex bt --args /usr/sbin/bc-server -s
sudo -u bluecherry rr record /usr/sbin/bc-server -s
sudo -u bluecherry rr replay # there: continue, bt...