Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7822081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:49:30+00:00 2026-06-02T07:49:30+00:00

I have a library I am using (which is critical to my work) that

  • 0

I have a library I am using (which is critical to my work) that I am suspecting may have a bug. Unfortunately, the owner of the library is not so responsive as to trying out my sample codes. I am about to try debugging it myself.

To be more honest, it’s not just a library, it’s a library plus a set of kernel modules and the crash happens at kernel level (pretty nasty) and indeed would be hard to spot for the owner of the code too.

Sometimes that I get lucky, I get a kernel oops, that if I could build his code with -g option, I can find which line the error occurs (which greatly help, since I have just started facing huge amounts of his code with pretty much no clue).

Now the GNUmakefiles of the project are built with automake (I believe). My question is How can I tell make to add -g to CFLAGS throught the WHOLE build?

I remember reading something along the lines of how to write Makefiles so that “external” options can be added etc, but I neither know whether these makefiles would be generated with that ability (which should because it’s automake), or how those external options are given anyway!

I am guessing something like this:

make CFLAGS=-g

should do it, but honestly have no idea.


Edit: Note that, I am actually interested in the -g flag to be included when the kernel modules are being built. I cannot use try and error (for example with my command above) to see if works or not, as the kernel build just prints [CC] ... without showing any options!

Edit: Well actually I did try, but gdb ./module.ko still claims there are no debug symbols.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:49:31+00:00Added an answer on June 2, 2026 at 7:49 am

    Is there a configure script? If so, was it created by autoconf? (Probably.) Then you can do

    ./configure CFLAGS='-g -O0'
    make clean
    make
    

    to rebuild the whole thing with debugging on and optimization off.

    Otherwise, no-one can really help you unless you provide a relevant excerpt of the makefile.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C++ library that I build using Scons which is eventually linked
I have a cpp file from which I am generating a shared library (using
I am using the apache library. I have created a class which sends a
Using non-thread safe libraries with threads. Say I have a library that makes a
I have a JS library using canvas that needs to get its colors from
I am working on a class library using C#. I have designed 3 main
I have integrated Facebook using library in my previous application and it works fine
I have a WCF Service Library (implemented using NH) with one of the class
I've started using Enterprise Library and have the following questions: 1)How do I add
I have an project csproj, with app.config file, and logging Ent.Library section using configsource

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.