This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: step into function fails


On Tue, Jun 24, 2003 at 10:05:09AM +0200, Bernd Geiser wrote:
> I experienced it is not possible to step into functions of an executable 
> with stabs-debug-info. Only "stepi" seems to help! A little research 
> showed that this test (in gdb/infrun.c) fails:
> 
>     /* If we have line number information for the function we
>          are thinking of stepping into, step into it.
> 
>          If there are several symtabs at that PC (e.g. with include
>          files), just want to know whether any of them have line
>          numbers.  find_pc_line handles this.  */
>       {
>         struct symtab_and_line tmp_sal;
>         tmp_sal = find_pc_line (ecs->stop_func_start, 0);
> ===>    if (tmp_sal.line != 0)
>           {
>             step_into_function (ecs);
>             return;
>           }
>       }
> 
> Consequently this one gets called:
> 
>   step_over_function (ecs);
> 
> which is obviously wrong.
> 
> I use gdb 5.3 and compiled the program with gcc 2.95.3 (both configured for a 
> MIPS-target, but also the ARM-target fails, when compiling with -gstabs). The 
> host is x86.

This is a known bug in GCC 2.95.3.  We added some code to GDB to try to
work around it, and in some cases it works, but the debug info is just
too messed up to get right reliably.

Recommend not using that version :)  3.2 does not seem to suffer from
this problem.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]