This is the mail archive of the gdb@sourceware.org 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: text file formats


> 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.


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