This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

line number missing in get_nearest_line


Hi again.

I wrote in a previous mail about a kind of bug that
make bfd_get_nearest_line to always return '0'
for the line number.

I find where is the problem:
in the debug informations (as given by objdump -g),
no file/line information are given for function headers,
as it is the case for program lines:

(...)
void f ()
{ /* 0x80483f0 */
  /* file toto.c line 6 addr 0x80483f6 */
  /* file .toto.c line 7 addr 0x80483f6 */
  /* file toto.c line 8 addr 0x8048406 */
  /* file toto.c line 9 addr 0x8048416 */
  /* file toto.c line 10 addr 0x8048426 */
  /* file toto.c line 11 addr 0x8048436 */
} /* 0x804843a */
(...)

It seems that bfd_get_nearest_line find well the
nearest "/* (...) addr */" for a given symbol
address, but in the case of function addresses
(here 0x80483f0 for f()) the line is discarded.

->
addr2line --functions --basename -e toto 0x8048406
f
toto.c:8

addr2line --functions --basename -e toto 0x80483f0
f
toto.c:0


How can I correct this problem ?

By the way, with gcc V2.95.2 (I'm now using gcc v2.95.3)
this problem never occur. Do the debug format stored
in object changed ?

Thank you for any help.

Regards,
--
Yannick




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