Re: analysing a coredump

From: Alexander Leidinger <Alexander_at_Leidinger.net>
Date: Thu, 30 Nov 2023 13:14:29 UTC
Am 2023-11-30 01:44, schrieb void:
> On Wed, Nov 29, 2023 at 08:58:01PM -0000, Peter 'PMc' Much wrote:
>> 
>> Hi, there are certainly people here who are doing such regularly.
>> I am only doing it when a bug hits me. I recommend recompiling with
>> debug symbols, and also setting -O0 (because otherwise many
>> interesting things get "optimized away").
>> 
>> Then a backtrace should give proper locations to be found in the
>> source, and probably understood from there.
>> 
>> Since I cannot remember the options, I coded them into my build
>> engine, as such:
>> https://gitr.daemon.contact/sysup/commit/?id=3e15a711236c90ac9d525b83d1388cb8e4e1141d
>> Adding these options to make.conf has worked for me (but may depend on 
>> how
>> the port is designed).
> 
> I have poudriere-devel, and was thinking of doing it like so:
> 
> poudriere bulk -j 132Ramd64 -O sccache -f portslist.txt -i
> (finishes bulk build, go into interactive mode)
> cd /usr/ports/www/apache24
> make -DBATCH -DDEBUG && make
> 
> but not sure here how I'd modify CFLAGS for -O0
> 
> There's no DEBUG in the options for this port

A port-build normally strips away debug info. But we have infrastructure 
for this:
     https://wiki.freebsd.org/DebuggingPorts

You can even add this to the poudriere make.conf.

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF