forked from osandov/drgn
-
Notifications
You must be signed in to change notification settings - Fork 6
Merge branch 'master' into '6.0/stage' #19
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doxygen warns about a few obsolete Doxyfile options. Update it with doxygen -u. Signed-off-by: Omar Sandoval <[email protected]>
The Doxygen documentation for libdrgn has bit-rotted over time. Bring back the Internal module, clean up a few renamed members and parameters, and fix broken parsing caused by the generic definition macros. Signed-off-by: Omar Sandoval <[email protected]>
drgn_type_members_eq() skips comparing the types of anonymous members. Fix that and add a test for it. Signed-off-by: Omar Sandoval <[email protected]>
These will be used in upcoming changes. Signed-off-by: Omar Sandoval <[email protected]>
And improve their documentation. Signed-off-by: Omar Sandoval <[email protected]>
min() and max() from the Linux kernel go through the trouble of resulting in a constant expression if the arguments are constant expressions, but they can't be used outside of a function due to their use of ({ }). This means that they can't be used for, e.g., enumerators or global arrays. Let's simplify min() and max() and instead add explicit min_iconst() and max_iconst() macros that can be used everywhere that an integer constant expression is required. We can then use it in hash_table.h. While we're here, let's split these into their own header file and document them better. Signed-off-by: Omar Sandoval <[email protected]>
Use *_hash_pair() for hash functions that do the full double hashing and return a struct hash_pair and hash_*() for other hashing utility functions. Also change some of the equality function names to be more symmetric and improve the documentation. Signed-off-by: Omar Sandoval <[email protected]>
These were added in commit e5874ad ("libdrgn: use libdwfl"), but they have never been used. Remove them. Signed-off-by: Omar Sandoval <[email protected]>
The next commit will allow using the offline path for the live kernel, so the offline naming won't make much sense. Fold the offline path into the top-level functions, and make the live path an escape hatch. Also add some comments and improve naming for the file and directory handles and update the coding style. Signed-off-by: Omar Sandoval <[email protected]>
…and /sys/module We use /proc/modules and /sys/module to find loaded kernel modules for the running kernel instead of walking the module list in the core dump as an optimization. To make it easier to test the core dump path, add an environment variable to disable the optimization. Signed-off-by: Omar Sandoval <[email protected]>
We're freeing path and then using it to report an error. This has some weird knock-on effects. Since we freed the path, the error message contains garbage. So, PyErr_SetString() can't decode it as a UTF-8 string. The end result is a MissingDebugInfoError with no message. Fix it by creating the error before freeing the path. Signed-off-by: Omar Sandoval <[email protected]>
If cache_kernel_module_sections() in report_loaded_kernel_module() fails, we continue to the next iteration without advancing to the next kernel module. Then, we fail on that same kernel module and repeat. Make sure that we go to the next kernel module. Fixes: 423d2cd ("libdrgn: dwarf_index: rework file reporting") Reported-by: Serapheim Dimitropoulos <[email protected]> Signed-off-by: Omar Sandoval <[email protected]>
Linux v5.8 changed the module section structure, so we need to get the section name differently. Closes osandov#73. Reported-by: Serapheim Dimitropoulos <[email protected]> Signed-off-by: Omar Sandoval <[email protected]>
sdimitro
approved these changes
Oct 16, 2020
prakashsurya
approved these changes
Oct 16, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.