libbpf / blazesym

blazesym is a library for address symbolization and related tasks
BSD 3-Clause "New" or "Revised" License
99 stars 24 forks source link

cli: Add --procmap-query option to normalize user sub-command #812

Closed danielocfb closed 1 week ago

danielocfb commented 1 week ago

Introduce the --procmap-query option to the 'normalize user' sub-command. This option can be used to use the PROCMAP QUERY ioctl for retrieving VMAs instead of parsing parsing the /proc//maps file.

$ cargo run -- normalize user --procmap-query --pid 308844 0x7f7d3b3ae000

Error: failed to normalize addresses

Caused by: PROCMAP_QUERY is not supported

On a kernel with PROCMAP_QUERY ioctl support: $ blazecli normalize user --procmap-query --pid 96 0x7f504f5a9000

0x007f504f5a9000: file offset 0x28000 in /usr/lib64/libc.so.6 (build ID: 77c77fee058b19c6f001cf2cb0371ce3b8341211)

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.58%. Comparing base (9e5b5b6) to head (7c339ec). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #812 +/- ## ========================================== - Coverage 94.59% 94.58% -0.02% ========================================== Files 52 52 Lines 9725 9725 ========================================== - Hits 9199 9198 -1 - Misses 526 527 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.