You are not logged in.

#1 2018-12-27 21:11:02

rubystallion
Member
Registered: 2018-05-05
Posts: 8

[SOLVED] How can I build debug packages with gdb debug level 3?

I would like to build the ruby debug package with gdb debug level 3 (-g3), so gdb can expand macros. For that I wrote the following ~/.makepkg.conf:

OPTIONS+=(debug strip)
DEBUG_CFLAGS="-g3"

In the configuration summary on line 683 of the log from running

makepkg -si

it says that debug flags are "-ggdb3", but when I run

readelf --debug-dump /usr/lib/debug/usr/bin/ruby.debug

, on line 23 I see the DW_AT_producer flags only include "-g", but not "-g3". How can I fix this?

Last edited by rubystallion (2018-12-28 15:39:29)

Offline

#2 2018-12-28 02:10:53

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] How can I build debug packages with gdb debug level 3?

Does ruby have a verbose mode for the build system, which allows you to see the actual command line it uses to execute gcc?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2018-12-28 15:38:58

rubystallion
Member
Registered: 2018-05-05
Posts: 8

Re: [SOLVED] How can I build debug packages with gdb debug level 3?

I solved it by removing the entire directory where I checked out ruby from ASP. smile I think before I just deleted the .pkg.tar.xz files, which apparently wasn't enough.

Offline

#4 2018-12-28 18:14:20

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] How can I build debug packages with gdb debug level 3?

Well, yes, that means you already had ruby compiled without modified DEBUG_CFLAGS. Then you tried to rebuild the package with modified DEBUG_CFLAGS in your makepkg.conf, and the build system noticed "hey, it's already been built, no need to do anything else", and short-circuited the build process and went straight to tarballing it up into a new .pkg.tar.xz


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB