Re: text file formats

Eli Zaretskii
2006-04-06T03:35:45Z

> Date: Wed, 5 Apr 2006 23:27:02 -0400
> From: Bob Rossi <bob_rossi@cox.net>
>
> > I have no idea what you mean. GDB gets line numbers from debug info,
> > of course; where else would it get them?
>
> 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.

> OK, I'm sorry, as usual I'm describing this bad. Let's start out by
> trying to agree with an assumption that I have. Since the file is in a
> mixed format, is it true that the line number is determined ambiguously
> by the program reading the file?

Not necessarily, see my other message.