You are not logged in.

#1 2014-04-01 22:23:36

foppe
Member
Registered: 2011-04-02
Posts: 47

[SOLVED] Add GCC debug flags

I need to debug a program called tenace [1] which I maintain in AUR [2]. My question is how do I change the FLAGS to add debug (gdb) capabilities. The program is written in C.
This is the current PKGBUILD [3]

gdb reads:

Reading symbols from tenace...(no debugging symbols found)...done.

Please be a little verbose in your answer wink I don't know what flag to add not don't I know where I would add flags. It seems to me I want to change this line:

./configure --prefix=/usr LDFLAGS=-lm

but please correct me if I'm wrong.

[1] https://www.df7cb.de/bridge/tenace/
[2] https://aur.archlinux.org/packages/tenace/
[3] https://aur.archlinux.org/packages/te/tenace/PKGBUILD

Last edited by foppe (2014-04-01 22:52:32)

Offline

#2 2014-04-01 22:31:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Add GCC debug flags

It looks like the source defaults to including the flag for building anyways.  Just add the !strip option to the PKGBUILD to prevent makepkg from stripping the symbols.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-04-01 22:52:13

foppe
Member
Registered: 2011-04-02
Posts: 47

Re: [SOLVED] Add GCC debug flags

Thanks,

Adding

options=('!strip')

does what I want it to do. Running gdb gives a backtrace with the function where the error occurs. Those function-names were previously not available.

Marking as SOLVED

Offline

Board footer

Powered by FluxBB