GDB 6.3 assumes that DW_AT_frame_base exists
H. J. Lu
hjl@lucon.org
Thu Dec 30 19:56:00 GMT 2004
On Thu, Dec 30, 2004 at 11:36:18AM -0800, H. J. Lu wrote:
> On Thu, Dec 30, 2004 at 11:24:24AM -0800, H. J. Lu wrote:
> > On Wed, Dec 22, 2004 at 10:43:19PM -0500, Daniel Jacobowitz wrote:
> > > On Wed, Dec 22, 2004 at 10:24:49AM -0800, H. J. Lu wrote:
> > > > > GDB not being able to debug GCC is a GDB problem. (Or possibly a
> > > > > problem of the compiler than was used to compile the GCC being
> > > > > debugged). Either way I am pretty sure that readelf is blameless in
> > > > > this situation.
> > > >
> > > > I think gcc may be correct and gdb just can't handle location list
> > > > correctly.
> > >
> > > If you believe there is a GDB bug, please submit a bug report with
> > > self-contained test case.
> >
> > I don't know if it is a gcc or gdb bug, and I don't have a
> > self-contained testcase. The only thing I see is gdb crushes on
> > cc1 from gcc 4.0. It seems that gdb 6.3 assumes DW_AT_frame_base
> > exists for a function. But not all functions in cc1 in gcc 4.0
> > have DW_AT_frame_base and gdb 6.3 crushes in dwarf_expr_frame_base.
>
> I think it is a gdb 6.3 bug since idb has no problem. When evaluating
> a location list, gdb does
>
> ...
> ctx->get_frame_base = dwarf_expr_frame_base;
> ...
>
> dwarf_expr_frame_base uses DW_AT_frame_base to get frame base. Since
> DW_AT_frame_base doesn't exist for tls_symbolic_operand, gdb crushes.
DW_AT_frame_base may be needed for location lists of local variables.
But in case of tls_symbolic_operand, there is no local variable.
Location lists are used for function parameters.
H.J.
More information about the Gdb
mailing list