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


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

Re: cant get gdb to list src or single step

From Cat22 <oops@invalid.org>
Newsgroups comp.os.linux.development.apps
Subject Re: cant get gdb to list src or single step
Date 2011-08-09 04:37 -0700
Organization A noiseless patient Spider
Message-ID <j1r65p$4bq$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> <j1is7p$5s5$1@dont-email.me>

Show all headers | View raw


On Sat 8/6/2011 12:58 AM, Tauno Voipio wrote:
> 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.
>
DOH! I found the problem. I had a mispelling of CFLAGS in my Makefile 
that was preventing them from being used.
I hate it when that happens
Thanks
Cat22

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