Re: analysing a coredump

From: Peter 'PMc' Much <pmc_at_citylink.dinoex.sub.org>
Date: Thu, 30 Nov 2023 15:15:27 UTC
On 2023-11-30, void <void@f-m.fm> wrote:
> 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

I do not use poudriere, but, as Alexander has pointed out, it
might actually be enough to add "WITH_DEBUG= yes" and
"DEBUG_FLAGS= -g -O0" into the /etc/make.conf that poudriere is going
to use, for the time of that port's building.