Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never emit INLINE_ORIGIN directives lacking a function name #476

Merged
merged 1 commit into from
Sep 23, 2022

Conversation

gabrielesvelto
Copy link
Collaborator

This handles cases where the names of inlined functions are missing. This is a bit odd because when it comes to symbols the name is an option and thus is None when it cannot be loaded from the debug information, but in the case of inlined functions where the name is in a separate debuginfo file pointed to by the .gnu_debugaltlink section the name is just empty.

The basic.dwz file used for testing was produced in the following way: a copy was made of the basic.dbg file then the dwz tool was used to strip away the shared data (including the .debug_str section) and put it in a separate file, the separate file was then thrown away so calling dump_syms on basic.dwz would be unable to find the names for the inlined functions. The changes to basic.dbg were obviously reverted and only the modified basic.dwz file was kept.

cp test_data/linux/basic.dbg test_data/linux/basic.dwz dwz -m basic test_data/linux/basic.dbg test_data/linux/basic.dwz

This fixes issue #475.

This handles cases where the names of inlined functions are missing.
This is a bit odd because when it comes to symbols the name is an option
and thus is None when it cannot be loaded from the debug information,
but in the case of inlined functions where the name is in a separate
debuginfo file pointed to by the .gnu_debugaltlink section the name is
just empty.

The basic.dwz file used for testing was produced in the following way:
a copy was made of the basic.dbg file then the dwz tool was used to
strip away the shared data (including the .debug_str section) and put it
in a separate file, the separate file was then thrown away so calling
dump_syms on basic.dwz would be unable to find the names for the inlined
functions. The changes to basic.dbg were obviously reverted and only the
modified basic.dwz file was kept.

cp test_data/linux/basic.dbg test_data/linux/basic.dwz
dwz -m basic test_data/linux/basic.dbg test_data/linux/basic.dwz

This fixes issue mozilla#475.
@gabrielesvelto gabrielesvelto merged commit c7df854 into mozilla:main Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant