Bug 17385 - addr2line returns spurious inlined-by line in pipeline mode
Summary: addr2line returns spurious inlined-by line in pipeline mode
Status: RESOLVED OBSOLETE
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.23
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-12 14:26 UTC by Tomasz Grabiec
Modified: 2022-08-03 11:04 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Grabiec 2014-09-12 14:26:47 UTC
When I provide symbols to addr2line via stdin and I use the following address sequence (note that the second address is repeated):

$ cat > a
0x3c3d67
0x438b7d
0x438b7d
^D
$ addr2line -Cfpi -e loader.elf < a
void sched::thread::do_wake_with<waiter::wake()::{lambda()#1}>(waiter::wake()::{lambda()#1}, unsigned int) at /data/tgrabiec/src/osv/include/osv/sched.hh:1119 (discriminator 1)
 (inlined by) void sched::thread::wake_with_from_mutex<waiter::wake()::{lambda()#1}>(waiter::wake()::{lambda()#1}) at /data/tgrabiec/src/osv/include/osv/sched.hh:1143 (discriminator 1)
 (inlined by) waiter::wake() at /data/tgrabiec/src/osv/include/osv/wait_record.hh:38 (discriminator 1)
 (inlined by) lockfree::mutex::unlock() at /data/tgrabiec/src/osv/core/lfmutex.cc:247 (discriminator 1)
pthread_mutex_unlock at /data/tgrabiec/src/osv/libc/pthread.cc:389
 (inlined by) soreceive_generic at /data/tgrabiec/src/osv/bsd/sys/kern/uipc_socket.cc:1328
pthread_mutex_unlock at /data/tgrabiec/src/osv/libc/pthread.cc:389

$ addr2line -v
GNU addr2line version 2.23.2

Notice how for the first occurrence of 0x438b7d I get:

pthread_mutex_unlock at /data/tgrabiec/src/osv/libc/pthread.cc:389
 (inlined by) soreceive_generic at 

And for the second I get:

pthread_mutex_unlock at /data/tgrabiec/src/osv/libc/pthread.cc:389

The second one is correct.

I can provide you with loader.elf if needed.
Comment 1 Nick Clifton 2014-09-15 10:08:20 UTC
Hi Tomasz,

  Have you tried the 2.24 binutils release or the mainline development sources ?

  If you have, and the problem still exists, please could you upload the loader.elf file so that we can investigate further.

Cheers
  Nick
Comment 2 Alan Modra 2022-08-03 11:04:25 UTC
No reply to Nick's question.