Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #233

Re: cant get gdb to list src or single step

From Tauno Voipio <tauno.voipio@notused.fi.invalid>
Newsgroups comp.os.linux.development.apps
Subject Re: cant get gdb to list src or single step
Date 2011-08-06 10:58 +0300
Organization A noiseless patient Spider
Message-ID <j1is7p$5s5$1@dont-email.me> (permalink)
References <j14hjh$8fs$1@dont-email.me> <F4E_p.26935$%f4.5836@newsfe16.iad> <j1i81e$9ic$1@dont-email.me>

Show all headers | View raw


On 6.8.11 5:14 , Cat22 wrote:
> On Thu 8/4/2011 2:22 PM, Roy Strachan wrote:
>> On Sun, 31 Jul 2011 14:31:26 -0700, Cat 22 wrote:
>>
>>> I am having trouble getting gdb to work properly.
>>> I did try installing the package it wants and that makes the err msg go
>>> way but i still cant debug like i should be able to e.g listing src
>>> single stepping etc.
>>> I'm using a 2.6.38 kernel not the Mandriva kernel, but I dont think gdb
>>> cares? (I dont think gdb relies on some integration with the kernel does
>>> it?)
>>>
>>> My make file uses these flags:
>>> -Wall -O0 -g3 -Werror
>>
>>
>> you need the -ggdb flag to create the debug info
>>
>>
>>>
>>> A typical session is shown below Any ideas?
>>> Thanks,
>> [snip]
> even with the -ggdb flag i get this when trying to list the soruce lines
> (gdb) l main
> No line number known for main.
> (gdb)
>

Try again:

   delete all .o files and the run file
   change the compiler options to

     -Wall -O0 -g -pedantic

   and make the code.

-- 

Tauno Voipio

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

cant get gdb to list src or single step Cat 22 <cat22@invalid.org> - 2011-07-31 14:31 -0700
  Re: cant get gdb to list src or single step Roy Strachan <rd@bj.com> - 2011-08-04 21:22 +0000
    Re: cant get gdb to list src or single step Cat22 <oops@invalid.org> - 2011-08-05 19:14 -0700
      Re: cant get gdb to list src or single step Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2011-08-06 10:58 +0300
        Re: cant get gdb to list src or single step Cat22 <oops@invalid.org> - 2011-08-09 04:37 -0700
      Re: cant get gdb to list src or single step jacob navia <jacob@spamsink.net> - 2011-08-06 09:59 +0200
        Re: Pay-for software versus for free software quality jt@toerring.de (Jens Thoms Toerring) - 2011-08-07 00:23 +0000
  Re: cant get gdb to list src or single step pacman@kosh.dhis.org (Alan Curry) - 2011-08-06 10:38 +0000

csiph-web