简体   繁体   中英

What's the “discriminator” in addr2line?

When running addr2line in some programs, I get a "discriminator N" comment at the end of the line:

main at /tmp/nsievebits.c:56 (discriminator 3)

The man page doesn't mention it, and a quick Google search seems to indicate mostly source code files, with no clear explanation. Is it some intentionally undocumented feature? More importantly, should I worry about it at all?

As far as I understand, discriminator can be useful when there are more than one code path on a single line, see more there . You can safely ignore those, but if one knows how to read them, they can give you very precise information about where exactly the stack points to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM