Re: text file formats

Daniel Jacobowitz
2006-04-06T04:30:48Z

On Thu, Apr 06, 2006 at 06:35:41AM +0300, Eli Zaretskii wrote:
> > Does the debug info actually say, "at line 100 symbol foo() exists?"
>
> No, it says, for every source line, which PC addresses correspond to
> that source line. That is all GDB needs to know, because it
> manipulates PC addresses (i.e. addresses in the .text section).
>
> For symbols, the debug info says that symbol `foo' is stored in the
> .text or .data section (or .bss or something else) at address NNN.

Well, this is true, but what Bob wrote is often true also. One of them
is the line corresponding to the first PC instruction of the function;
the other is the line of declaration of the function, which may be
different (e.g. before the leading brace). I don't remember offhand if
GDB takes advantage of the latter.

(One comes from DWARF .debug_line, the other from .debug_info
DW_AT_decl_line).

--
Daniel Jacobowitz
CodeSourcery