This is an archive of the discontinued LLVM Phabricator instance.

llvm-bcanalyzer - added new option
Needs ReviewPublic

Authored by spetrovic on Dec 12 2016, 6:52 AM.

Details

Reviewers
mehdi_amini
Summary

This patch extends llvm-bcanalyzer tool with option "-print-fncs-and-globals". It prints function list and list of globals (and values of globals if the values are strings). It has similar output as GNU strings tool just input is LLVM IR file (.bc) instead object file.

Diff Detail

Event Timeline

spetrovic updated this revision to Diff 81076.Dec 12 2016, 6:52 AM
spetrovic retitled this revision from to llvm-bcanalyzer - added new option.
spetrovic updated this object.
spetrovic added a reviewer: mehdi_amini.
spetrovic added subscribers: llvm-commits, ivanbaev, petarj.
mehdi_amini edited edge metadata.Dec 12 2016, 11:12 AM

Since you mention the GNU strings tool, the way we usually approach this is by providing a full replacement for the tool: i.e. llvm-strings that would work on any file format including bitcode. Are you interested in giving it a shot?

Initially my idea was to expand llvm-strings tool that works with bitcode file as you said, but I got suggestion to move this functionality to llvm-bcanalyzer ( https://reviews.llvm.org/D26959 ).