I have a library that I use (which is critical for my work), which I suspect may have an error. Unfortunately, the library owner is not so responsive to try out my code samples. I'm going to try debugging it myself.
To be more honest, this is not just a library, it is a library plus a set of kernel modules, and the accident occurs at the kernel level (rather unpleasant), and it will really be difficult to notice for the owner of the code.
Sometimes I get lucky, I get the oops kernel, that if I could build his code with the -g option, I can find in which line the error occurs (which helps a lot since I just started to encounter huge volumes of his code pretty much no idea).
Now the GNUmakefiles of the project are built using automake (I believe). My question is How can I say makeadd -gin CFLAGSthrough the WHOLE assembly?
I remember reading something like writing Makefiles to add “external” parameters, etc., but I don’t know if these makefiles will be generated with this ability (which should be related to automation) or how these external parameters are given anyway!
I guess something like this:
make CFLAGS=-g
should do it, but honestly I have no idea.
: , -g, , . try error (, ), , , [CC] ..., !
: , gdb ./module.ko , .