This is the mail archive of the
mailing list for the GDB project.
Re: text file formats
> Date: Wed, 5 Apr 2006 23:27:02 -0400
> From: Bob Rossi <email@example.com>
> > 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.