Results 1 to 5 of 5

Thread: gdb not working!

  1. #1
    Join Date
    Oct 2010
    Posts
    10

    Default gdb not working!

    Hi,

    I am a hobbyist interested in development and have recently decided to migrate from Windows to Linux and after trying out a number of distributions decided to use openSUSE.

    After getting somewhat more comfortable with Linux and openSUSE I decided to try and get comfortable with development on this platform.

    And hence my problem:

    After compiling the simplest of programs (hello world) and trying to step through it with gdb I get this output:

    Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
    Try: zypper install -C "debuginfo(buildid)=2b25d8329d1aa713a2cc61b5cb701f6f89c78022"
    Missing separate debuginfo for /lib64/libc.so.6
    Try: zypper install -C "debuginfo(buildid)=9b674b2caef1982db55e436bca814060e1705b7f"

    As soon as I type the command start in gdb.

    Naturally I tried the recommended zypper downloads to no avail.

    Furthermore I sought out the glibc debuginfo in the software manager and found nothing which I have not already installed.

    On my system are:-devel-32bit

    glibc
    glibc-32bit
    glibc-devel
    glibc
    glibc-info
    glibc-locale
    glibc-locale-32bit
    glibc-profile
    glibc-profile-32bit

    gdb
    gdbm
    gdbm-32bit

    All of these are the latest version from the standard 11.3 repositories. I believe these are all the requirements I should need to not have gdb give me errors but sadly that is not the case

    Lastly I am running on a 64bit verison of openSUSE 11.3.

    If any additional info is required I will provide it gladly to anyone who can help me.

    Cheers,
    Avram

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: gdb not working!

    Generally there is nothing interesting to see in ld-linux, it's just the startup stub for an executable so you could ignore that warning. Similarly for libc. But you should be able to step through lines in your C program. Set a breakpoint on the main entry point with

    break main

    then

    run

    and it should stop there.

    Also make sure you have compiled your program with -g.

  3. #3
    Join Date
    Oct 2010
    Posts
    10

    Default Re: gdb not working!

    Hi ken_yap

    Thank you for the prompt response!

    You are quite correct, I can step through this program, and others. As you pointed out the above errors do not seem to be too important. However they do distract quite heavily from the meaningful output.

    Aside from this I don't like the fact that I don't know how to fix this even though it might not be so important to fix. As I explained I am new to this environment so I am worried that these errors might be symptoms of a deeper problem that will cause me headaches in the future.

    Especially as I seem to have all the right packages installed and don't understand why I am getting these messages.

  4. #4
    Carlos E. R. NNTP User

    Default Re: gdb not working!

    On 2010-10-11 12:36, Acol wrote:

    > Aside from this I don't like the fact that I don't know how to fix this
    > even though it might not be so important to fix. As I explained I am new
    > to this environment so I am worried that these errors might be symptoms
    > of a deeper problem that will cause me headaches in the future.


    You need the debug packages, which come from a different repo - the debug repo, obviously :-).

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  5. #5
    Join Date
    Oct 2010
    Posts
    10

    Default Re: gdb not working!

    Yes!

    I just found that out myself. See I thought, originally, that the glibc-profile package was the debug info as the description mentioned it this way. I guess these are tools for if you are working on the glibc itself.

    Thanks for your help everyone, sorry for being a huge noob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •