GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - compiler-explorer/asm-parser

BranchesTags
Open more actions menu

Latest commit

 

History

164 Commits
164 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
bench-results
bench-results
 
 
resources
resources
 
 
scripts
scripts
 
 
src
src
 
 
.clang-format
.clang-format
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.sh
build.sh
 
 
conan_provider.cmake
conan_provider.cmake
 
 
conanfile.txt
conanfile.txt
 
 
known-leaks.txt
known-leaks.txt
 
 
prettyjson.js
prettyjson.js
 
 
setup.sh
setup.sh
 
 
test.sh
test.sh
 
 
test7000.sh
test7000.sh
 
 

Repository files navigation

asm-parser

Categorises and filters assembly in a way that's understood by Compiler Explorer.

Possible filters as command line parameters:

  • -binary changes to the Binary mode filtering that's based on the assembly output from GNU Objdump
  • -unused_labels try to filter out functions that aren't strongly used
  • -directives filter out .directives
  • -comment_only filter out comments
  • -whitespace
  • -library_functions try to filter out functions that belong in other libraries that are used (filtering is based on filepaths)
  • -dont_mask_filenames always output the filename if available

Other parameters:

  • -plt Also leaves out labels that End with @plt (without this, only labels that Start with .plt are left out)
  • -nocompat Leaves some experimental extra information
  • -stdin Reads assembly from STDIN instead of from a given file
  • -outputtext Instead of writing to JSON, output the filtered assemblys
  • -objdump <path> -- <objdump arguments> Runs objdump itself (without a shell) and parses its output as it comes in, implies -binary. Everything after -- is passed to objdump as-is. Exits with a non-zero code when objdump can't be started or fails

Example usage

Feeding an objdump via stdin into asm-parser:

objdump -d a.out -l --insn-width=16 | asm-parser -stdin -binary

Or let asm-parser run objdump, which doesn't need a shell:

asm-parser -binary -objdump /usr/bin/objdump -- -d a.out -l --insn-width=16

Building locally (debug build)

You'll need gcc 12 or later (or hack your settings to support your compiler).

  1. setup.sh sets up a venv, installs conan2 in it and uses that to install packages (fmt needs to be explicitly built for some reason):
$ ./setup.sh
  1. Then you can:
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug
$ make -j$(nproc)
$ make test

(see https://github.com/compiler-explorer/asm-parser/blob/main/build.sh for an example, you might need to configure PATH first before doing so)

The built executable should be found in the path ./build/src/asm-parser .

About

No description, website, or topics provided.

Resources

Readme
BSD-2-Clause license
Activity
Custom properties

Stars

36 stars

Watchers

3 watching

Forks

10 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.