g++ and gdb problem: debug symbols for shared libraries not found











up vote
1
down vote

favorite












I am porting a large set of applications and libraries from Debian 7 to Ubuntu 16.04. This is a GNU autotools project, so libtool is involved. gdb cannot find the symbols for the majority of the shared libraries, even though I am building with options that have always worked for me before. I am wondering if anyone else has encountered this problem, and if so what recommendations they might have.



I am using gdb version Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1.



I am compiling with -g O0 and other compiler options. These options are consistently employed when building 12 libraries. Exactly one of them emerges from the build process with debugging symbols. We'll designate that one libA. (In the discussion below, is just a substitution for the project path.)



Leaving out many -I directives, the options being used are:



-g -O0 -Wconversion -Woverloaded-virtual -Wall -Werror -Wreturn-type - 
Wformat -Wparentheses -Wswitch -Wno-deprecated -Wsign-compare -fno-
strict-aliasing -Wunused -D__STDC_LIMIT_MACROS -MT MyModule.lo -MD -MP
-MF .deps/MyModule.Tpo -fPIC -DPIC -o .libs/MyModule.o


When I look at libA using gdb, file, and other utilities it looks fine.



u16dev01:(18:01:32):file libA.so.0.0.0                 ~/dev/product- 
<path>lib/liba/.libs
libA.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked,
BuildID[sha1]=14dc765142914be4c32a07eaa1683b5b2a2f6dae, not stripped


The object files look like this:



u16dev01:(18:01:43):file AModule1.o                          
<path>/lib/liba/.libs
AModule1.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not
stripped


If I open the shared library with gdb, I have symbols and I can list the code. If I open any of its .o files with gdb, I get symbols and can list code.



Of the remaining 11, the file command reports two as being SYSV and the other 9 as being GNU/Linux, for example:



u16dev01:(18:08:34):file libD.so.0.0.0                      
~/<path>/lib/.libs
libD.so.0.0.0: ELF 64-bit LSB shared object, x86-64,
version 1 (GNU/Linux), dynamically linked,
BuildID[sha1]=059733fbc888c3dce86eae21984ea82cddc5b0e9, not stripped


gdb sees no symbols when I open this library or any of its .o files. The file command also reports GNU/Linux for the .o files. There are no symbols.



There are two libraries which file reports as SYSV. Their .o files are also devoid of debugging information, and so are the libraries.



I renamed the strip program to preclude the possibility of the Makefiles from running strip, even though a careful search of compiler output told me it wasn't. So this is not a case of symbols being stripped after library build.



I tried to build a little test library, using the compiler options of my project. It builds a SYSV library and gdb loads debug symbols just fine.



objdump -g output is sparse in the cases when gdb can't load symbols.



I and a couple of my colleagues have been scratching our heads over this one for a few days now. Why does the build procedure produce viable symbols for only one of the libraries? There's nothing special about that library. Why are 9 of the remaining 11 reported GNU/Linux and 2 reported as SYSV? Why don't those 2 have symbols either?



Any ideas would be very appreciated.










share|improve this question







New contributor




robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Have you downloaded a full set of development libraries
    – rhubarbdog
    Dec 3 at 23:45










  • I've many development packages: build-essentials, libc6-dev, libxml2-dev, libstdc++-5-dev, and others. (99 total ... I have boost dev libraries installed but not referring to them yet.) GNU autotools, of course.
    – robgarv
    Dec 4 at 0:24















up vote
1
down vote

favorite












I am porting a large set of applications and libraries from Debian 7 to Ubuntu 16.04. This is a GNU autotools project, so libtool is involved. gdb cannot find the symbols for the majority of the shared libraries, even though I am building with options that have always worked for me before. I am wondering if anyone else has encountered this problem, and if so what recommendations they might have.



I am using gdb version Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1.



I am compiling with -g O0 and other compiler options. These options are consistently employed when building 12 libraries. Exactly one of them emerges from the build process with debugging symbols. We'll designate that one libA. (In the discussion below, is just a substitution for the project path.)



Leaving out many -I directives, the options being used are:



-g -O0 -Wconversion -Woverloaded-virtual -Wall -Werror -Wreturn-type - 
Wformat -Wparentheses -Wswitch -Wno-deprecated -Wsign-compare -fno-
strict-aliasing -Wunused -D__STDC_LIMIT_MACROS -MT MyModule.lo -MD -MP
-MF .deps/MyModule.Tpo -fPIC -DPIC -o .libs/MyModule.o


When I look at libA using gdb, file, and other utilities it looks fine.



u16dev01:(18:01:32):file libA.so.0.0.0                 ~/dev/product- 
<path>lib/liba/.libs
libA.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked,
BuildID[sha1]=14dc765142914be4c32a07eaa1683b5b2a2f6dae, not stripped


The object files look like this:



u16dev01:(18:01:43):file AModule1.o                          
<path>/lib/liba/.libs
AModule1.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not
stripped


If I open the shared library with gdb, I have symbols and I can list the code. If I open any of its .o files with gdb, I get symbols and can list code.



Of the remaining 11, the file command reports two as being SYSV and the other 9 as being GNU/Linux, for example:



u16dev01:(18:08:34):file libD.so.0.0.0                      
~/<path>/lib/.libs
libD.so.0.0.0: ELF 64-bit LSB shared object, x86-64,
version 1 (GNU/Linux), dynamically linked,
BuildID[sha1]=059733fbc888c3dce86eae21984ea82cddc5b0e9, not stripped


gdb sees no symbols when I open this library or any of its .o files. The file command also reports GNU/Linux for the .o files. There are no symbols.



There are two libraries which file reports as SYSV. Their .o files are also devoid of debugging information, and so are the libraries.



I renamed the strip program to preclude the possibility of the Makefiles from running strip, even though a careful search of compiler output told me it wasn't. So this is not a case of symbols being stripped after library build.



I tried to build a little test library, using the compiler options of my project. It builds a SYSV library and gdb loads debug symbols just fine.



objdump -g output is sparse in the cases when gdb can't load symbols.



I and a couple of my colleagues have been scratching our heads over this one for a few days now. Why does the build procedure produce viable symbols for only one of the libraries? There's nothing special about that library. Why are 9 of the remaining 11 reported GNU/Linux and 2 reported as SYSV? Why don't those 2 have symbols either?



Any ideas would be very appreciated.










share|improve this question







New contributor




robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Have you downloaded a full set of development libraries
    – rhubarbdog
    Dec 3 at 23:45










  • I've many development packages: build-essentials, libc6-dev, libxml2-dev, libstdc++-5-dev, and others. (99 total ... I have boost dev libraries installed but not referring to them yet.) GNU autotools, of course.
    – robgarv
    Dec 4 at 0:24













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am porting a large set of applications and libraries from Debian 7 to Ubuntu 16.04. This is a GNU autotools project, so libtool is involved. gdb cannot find the symbols for the majority of the shared libraries, even though I am building with options that have always worked for me before. I am wondering if anyone else has encountered this problem, and if so what recommendations they might have.



I am using gdb version Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1.



I am compiling with -g O0 and other compiler options. These options are consistently employed when building 12 libraries. Exactly one of them emerges from the build process with debugging symbols. We'll designate that one libA. (In the discussion below, is just a substitution for the project path.)



Leaving out many -I directives, the options being used are:



-g -O0 -Wconversion -Woverloaded-virtual -Wall -Werror -Wreturn-type - 
Wformat -Wparentheses -Wswitch -Wno-deprecated -Wsign-compare -fno-
strict-aliasing -Wunused -D__STDC_LIMIT_MACROS -MT MyModule.lo -MD -MP
-MF .deps/MyModule.Tpo -fPIC -DPIC -o .libs/MyModule.o


When I look at libA using gdb, file, and other utilities it looks fine.



u16dev01:(18:01:32):file libA.so.0.0.0                 ~/dev/product- 
<path>lib/liba/.libs
libA.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked,
BuildID[sha1]=14dc765142914be4c32a07eaa1683b5b2a2f6dae, not stripped


The object files look like this:



u16dev01:(18:01:43):file AModule1.o                          
<path>/lib/liba/.libs
AModule1.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not
stripped


If I open the shared library with gdb, I have symbols and I can list the code. If I open any of its .o files with gdb, I get symbols and can list code.



Of the remaining 11, the file command reports two as being SYSV and the other 9 as being GNU/Linux, for example:



u16dev01:(18:08:34):file libD.so.0.0.0                      
~/<path>/lib/.libs
libD.so.0.0.0: ELF 64-bit LSB shared object, x86-64,
version 1 (GNU/Linux), dynamically linked,
BuildID[sha1]=059733fbc888c3dce86eae21984ea82cddc5b0e9, not stripped


gdb sees no symbols when I open this library or any of its .o files. The file command also reports GNU/Linux for the .o files. There are no symbols.



There are two libraries which file reports as SYSV. Their .o files are also devoid of debugging information, and so are the libraries.



I renamed the strip program to preclude the possibility of the Makefiles from running strip, even though a careful search of compiler output told me it wasn't. So this is not a case of symbols being stripped after library build.



I tried to build a little test library, using the compiler options of my project. It builds a SYSV library and gdb loads debug symbols just fine.



objdump -g output is sparse in the cases when gdb can't load symbols.



I and a couple of my colleagues have been scratching our heads over this one for a few days now. Why does the build procedure produce viable symbols for only one of the libraries? There's nothing special about that library. Why are 9 of the remaining 11 reported GNU/Linux and 2 reported as SYSV? Why don't those 2 have symbols either?



Any ideas would be very appreciated.










share|improve this question







New contributor




robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am porting a large set of applications and libraries from Debian 7 to Ubuntu 16.04. This is a GNU autotools project, so libtool is involved. gdb cannot find the symbols for the majority of the shared libraries, even though I am building with options that have always worked for me before. I am wondering if anyone else has encountered this problem, and if so what recommendations they might have.



I am using gdb version Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1.



I am compiling with -g O0 and other compiler options. These options are consistently employed when building 12 libraries. Exactly one of them emerges from the build process with debugging symbols. We'll designate that one libA. (In the discussion below, is just a substitution for the project path.)



Leaving out many -I directives, the options being used are:



-g -O0 -Wconversion -Woverloaded-virtual -Wall -Werror -Wreturn-type - 
Wformat -Wparentheses -Wswitch -Wno-deprecated -Wsign-compare -fno-
strict-aliasing -Wunused -D__STDC_LIMIT_MACROS -MT MyModule.lo -MD -MP
-MF .deps/MyModule.Tpo -fPIC -DPIC -o .libs/MyModule.o


When I look at libA using gdb, file, and other utilities it looks fine.



u16dev01:(18:01:32):file libA.so.0.0.0                 ~/dev/product- 
<path>lib/liba/.libs
libA.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked,
BuildID[sha1]=14dc765142914be4c32a07eaa1683b5b2a2f6dae, not stripped


The object files look like this:



u16dev01:(18:01:43):file AModule1.o                          
<path>/lib/liba/.libs
AModule1.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not
stripped


If I open the shared library with gdb, I have symbols and I can list the code. If I open any of its .o files with gdb, I get symbols and can list code.



Of the remaining 11, the file command reports two as being SYSV and the other 9 as being GNU/Linux, for example:



u16dev01:(18:08:34):file libD.so.0.0.0                      
~/<path>/lib/.libs
libD.so.0.0.0: ELF 64-bit LSB shared object, x86-64,
version 1 (GNU/Linux), dynamically linked,
BuildID[sha1]=059733fbc888c3dce86eae21984ea82cddc5b0e9, not stripped


gdb sees no symbols when I open this library or any of its .o files. The file command also reports GNU/Linux for the .o files. There are no symbols.



There are two libraries which file reports as SYSV. Their .o files are also devoid of debugging information, and so are the libraries.



I renamed the strip program to preclude the possibility of the Makefiles from running strip, even though a careful search of compiler output told me it wasn't. So this is not a case of symbols being stripped after library build.



I tried to build a little test library, using the compiler options of my project. It builds a SYSV library and gdb loads debug symbols just fine.



objdump -g output is sparse in the cases when gdb can't load symbols.



I and a couple of my colleagues have been scratching our heads over this one for a few days now. Why does the build procedure produce viable symbols for only one of the libraries? There's nothing special about that library. Why are 9 of the remaining 11 reported GNU/Linux and 2 reported as SYSV? Why don't those 2 have symbols either?



Any ideas would be very appreciated.







g++ gdb






share|improve this question







New contributor




robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 3 at 23:37









robgarv

163




163




New contributor




robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Have you downloaded a full set of development libraries
    – rhubarbdog
    Dec 3 at 23:45










  • I've many development packages: build-essentials, libc6-dev, libxml2-dev, libstdc++-5-dev, and others. (99 total ... I have boost dev libraries installed but not referring to them yet.) GNU autotools, of course.
    – robgarv
    Dec 4 at 0:24


















  • Have you downloaded a full set of development libraries
    – rhubarbdog
    Dec 3 at 23:45










  • I've many development packages: build-essentials, libc6-dev, libxml2-dev, libstdc++-5-dev, and others. (99 total ... I have boost dev libraries installed but not referring to them yet.) GNU autotools, of course.
    – robgarv
    Dec 4 at 0:24
















Have you downloaded a full set of development libraries
– rhubarbdog
Dec 3 at 23:45




Have you downloaded a full set of development libraries
– rhubarbdog
Dec 3 at 23:45












I've many development packages: build-essentials, libc6-dev, libxml2-dev, libstdc++-5-dev, and others. (99 total ... I have boost dev libraries installed but not referring to them yet.) GNU autotools, of course.
– robgarv
Dec 4 at 0:24




I've many development packages: build-essentials, libc6-dev, libxml2-dev, libstdc++-5-dev, and others. (99 total ... I have boost dev libraries installed but not referring to them yet.) GNU autotools, of course.
– robgarv
Dec 4 at 0:24










2 Answers
2






active

oldest

votes

















up vote
1
down vote













The problem was eventually tracked down to a legacy custom m4 macro. It failed to detect a library package and clobbered its contribution to the variables that were written to Makefile.in for include paths. The result was a -I with no path in the sequence of many -I directives. Oddly this produced no error ... but it did seem to cause the -g option which immediately followed it to be "swallowed". (The result was a long list of -I paths which ended with "-I -g". It looks like this prevented g++ from processing the -g option.).



Correcting the erroneous m4 macro to produce a non-empty and valid include file path fixed the problem.






share|improve this answer








New contributor




robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    up vote
    0
    down vote













    You need to use -g in your compile command. See the man page for gcc at the section titled: Options for Debugging Your Program
    They have some cautions when used with the -O option.






    share|improve this answer





















    • Hmmm ... without turning off optimizations, it can be tricky understanding what's going on when stepping thru code. -O0 is supposed to turn off optimization (and it's always worked for me before). Apparently the manual recommends a -Og option ... so I tried that. Made no difference. So then I tried just -g ... no -O option of any kind. Exact same results. It's quite baffling. Thanks for the response.
      – robgarv
      Dec 4 at 7:53











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    robgarv is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1098257%2fg-and-gdb-problem-debug-symbols-for-shared-libraries-not-found%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    The problem was eventually tracked down to a legacy custom m4 macro. It failed to detect a library package and clobbered its contribution to the variables that were written to Makefile.in for include paths. The result was a -I with no path in the sequence of many -I directives. Oddly this produced no error ... but it did seem to cause the -g option which immediately followed it to be "swallowed". (The result was a long list of -I paths which ended with "-I -g". It looks like this prevented g++ from processing the -g option.).



    Correcting the erroneous m4 macro to produce a non-empty and valid include file path fixed the problem.






    share|improve this answer








    New contributor




    robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      1
      down vote













      The problem was eventually tracked down to a legacy custom m4 macro. It failed to detect a library package and clobbered its contribution to the variables that were written to Makefile.in for include paths. The result was a -I with no path in the sequence of many -I directives. Oddly this produced no error ... but it did seem to cause the -g option which immediately followed it to be "swallowed". (The result was a long list of -I paths which ended with "-I -g". It looks like this prevented g++ from processing the -g option.).



      Correcting the erroneous m4 macro to produce a non-empty and valid include file path fixed the problem.






      share|improve this answer








      New contributor




      robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















        up vote
        1
        down vote










        up vote
        1
        down vote









        The problem was eventually tracked down to a legacy custom m4 macro. It failed to detect a library package and clobbered its contribution to the variables that were written to Makefile.in for include paths. The result was a -I with no path in the sequence of many -I directives. Oddly this produced no error ... but it did seem to cause the -g option which immediately followed it to be "swallowed". (The result was a long list of -I paths which ended with "-I -g". It looks like this prevented g++ from processing the -g option.).



        Correcting the erroneous m4 macro to produce a non-empty and valid include file path fixed the problem.






        share|improve this answer








        New contributor




        robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        The problem was eventually tracked down to a legacy custom m4 macro. It failed to detect a library package and clobbered its contribution to the variables that were written to Makefile.in for include paths. The result was a -I with no path in the sequence of many -I directives. Oddly this produced no error ... but it did seem to cause the -g option which immediately followed it to be "swallowed". (The result was a long list of -I paths which ended with "-I -g". It looks like this prevented g++ from processing the -g option.).



        Correcting the erroneous m4 macro to produce a non-empty and valid include file path fixed the problem.







        share|improve this answer








        New contributor




        robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered yesterday









        robgarv

        163




        163




        New contributor




        robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        robgarv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.
























            up vote
            0
            down vote













            You need to use -g in your compile command. See the man page for gcc at the section titled: Options for Debugging Your Program
            They have some cautions when used with the -O option.






            share|improve this answer





















            • Hmmm ... without turning off optimizations, it can be tricky understanding what's going on when stepping thru code. -O0 is supposed to turn off optimization (and it's always worked for me before). Apparently the manual recommends a -Og option ... so I tried that. Made no difference. So then I tried just -g ... no -O option of any kind. Exact same results. It's quite baffling. Thanks for the response.
              – robgarv
              Dec 4 at 7:53















            up vote
            0
            down vote













            You need to use -g in your compile command. See the man page for gcc at the section titled: Options for Debugging Your Program
            They have some cautions when used with the -O option.






            share|improve this answer





















            • Hmmm ... without turning off optimizations, it can be tricky understanding what's going on when stepping thru code. -O0 is supposed to turn off optimization (and it's always worked for me before). Apparently the manual recommends a -Og option ... so I tried that. Made no difference. So then I tried just -g ... no -O option of any kind. Exact same results. It's quite baffling. Thanks for the response.
              – robgarv
              Dec 4 at 7:53













            up vote
            0
            down vote










            up vote
            0
            down vote









            You need to use -g in your compile command. See the man page for gcc at the section titled: Options for Debugging Your Program
            They have some cautions when used with the -O option.






            share|improve this answer












            You need to use -g in your compile command. See the man page for gcc at the section titled: Options for Debugging Your Program
            They have some cautions when used with the -O option.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 4 at 2:31









            ubfan1

            9,14141527




            9,14141527












            • Hmmm ... without turning off optimizations, it can be tricky understanding what's going on when stepping thru code. -O0 is supposed to turn off optimization (and it's always worked for me before). Apparently the manual recommends a -Og option ... so I tried that. Made no difference. So then I tried just -g ... no -O option of any kind. Exact same results. It's quite baffling. Thanks for the response.
              – robgarv
              Dec 4 at 7:53


















            • Hmmm ... without turning off optimizations, it can be tricky understanding what's going on when stepping thru code. -O0 is supposed to turn off optimization (and it's always worked for me before). Apparently the manual recommends a -Og option ... so I tried that. Made no difference. So then I tried just -g ... no -O option of any kind. Exact same results. It's quite baffling. Thanks for the response.
              – robgarv
              Dec 4 at 7:53
















            Hmmm ... without turning off optimizations, it can be tricky understanding what's going on when stepping thru code. -O0 is supposed to turn off optimization (and it's always worked for me before). Apparently the manual recommends a -Og option ... so I tried that. Made no difference. So then I tried just -g ... no -O option of any kind. Exact same results. It's quite baffling. Thanks for the response.
            – robgarv
            Dec 4 at 7:53




            Hmmm ... without turning off optimizations, it can be tricky understanding what's going on when stepping thru code. -O0 is supposed to turn off optimization (and it's always worked for me before). Apparently the manual recommends a -Og option ... so I tried that. Made no difference. So then I tried just -g ... no -O option of any kind. Exact same results. It's quite baffling. Thanks for the response.
            – robgarv
            Dec 4 at 7:53










            robgarv is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            robgarv is a new contributor. Be nice, and check out our Code of Conduct.













            robgarv is a new contributor. Be nice, and check out our Code of Conduct.












            robgarv is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1098257%2fg-and-gdb-problem-debug-symbols-for-shared-libraries-not-found%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            數位音樂下載

            When can things happen in Etherscan, such as the picture below?

            格利澤436b