This is the mail archive of the
mailing list for the GDB project.
Re: Wrong mapping pc to line numbers when listing coff
- To: Andrew Volkov <Andrew dot Volkov at transas dot com>
- Subject: Re: Wrong mapping pc to line numbers when listing coff
- From: Elena Zannoni <ezannoni at cygnus dot com>
- Date: Fri, 9 Nov 2001 10:27:36 -0500
- Cc: ezannoni at redhat dot com, gdb at sources dot redhat dot com
- References: <2E74F312D6980D459F3A05492BA40F8D404237@clue.transas.com>
Andrew Volkov writes:
> Hi Elena,
> As I understand (may be I wrong :), file gdb/symtab.c belong to you. Well, I
> found next bug/incorrectness in find_pc_sect_line function:
> When I build coff target from c++ files (with templates) and debugging it,
> then find_pc_sect_line return wrong start line number. It's because this
> function consider that symbol with lower pc then current pc (argument of
> find_pc_sect_line) is belong to first line (or vice versa), this is not
> always correct, especcially for functions. In functions first line came
> after prologs, and hence, best.pc (and best.line) must be greater then
> current pc. I could correct this incorrectness, but it will be better, if
> you tell me your ideas about this situation.
yes I am one of the maintainers for that file.
Could you provide an example where this situation occurs?
Also a backtrace from find_pc_sect_line could be useful.
Have you verified that the debug information for your program is correct?