GDB steping into STL Headers.

Christophe-Marie Duquesne chm.duquesne@gmail.com
Fri Feb 12 10:43:00 GMT 2010


On Fri, Feb 12, 2010 at 10:32 AM, mweglicki8208 <mweglicki@gmail.com> wrote:
>
> So could explain how should i give my compiler information not to pass those
> inline calls information? Is it possible?
>
> It's quite confusing, getting through simple line, with so many GDB "calls".
>
> I'm using older version of gcc actually and i can't change it...( 3.4.5 ).
>
> I understand that I'm quite new to the subject, and it has to be irritating
> to answer same questions all the time...But at least please point me into
> right direction.
>
> Thanks for help.
>
>
>
>
> Jim Ingham wrote:
>>
>> Hey, cool.  Our gdb's been doing that for a couple of years now, glad you
>> caught up :-D
>>
>> Jim
>>
>> On Feb 11, 2010, at 11:09 AM, Daniel Jacobowitz wrote:
>>
>>> On Thu, Feb 11, 2010 at 11:03:08AM -0800, Jim Ingham wrote:
>>>> It sounds like the STL code got inlined?  Then next would also step
>>>> in, since gdb doesn't see inlined functions as new frames.
>>>
>>> Maybe your GDB doesn't :-P  GDB 7.0 does support inlined functions -
>>> if your compiler outputs correct DWARF, at least.
>>>
>>> --
>>> Daniel Jacobowitz
>>> CodeSourcery
>>
>>
>>
>
>

Please read the manual:
http://sourceware.org/gdb/current/onlinedocs/gdb/Inline-Functions.html

"For gdb to support inlined functions, the compiler must record
information about inlining in the debug information — gcc using the
dwarf 2 format does this, and several other compilers do also. gdb
only supports inlined functions when using dwarf 2. Versions of gcc
before 4.1 do not emit two required attributes (`DW_AT_call_file' and
`DW_AT_call_line'); gdb does not display inlined function calls with
earlier versions of gcc. It instead displays the arguments and local
variables of inlined functions as local variables in the caller. "

I guess you have two solutions:
1 ) Update your compiler to gcc-4.4.3
2 ) Tell your compiler *not* to inline function, using -fno-inline

-- 
Christophe-Marie Duquesne
06 84 14 26 82 - mobile
04 76 57 48 06 - g-scop
04 97 04 27 33 - amadeus



More information about the Gdb mailing list