Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/misson20000/cxxfilt-rb
Ruby gem to demangle C++ symbols
https://github.com/misson20000/cxxfilt-rb
Last synced: 14 days ago
JSON representation
Ruby gem to demangle C++ symbols
- Host: GitHub
- URL: https://github.com/misson20000/cxxfilt-rb
- Owner: misson20000
- Created: 2017-06-02T23:14:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-14T21:19:09.000Z (over 4 years ago)
- Last Synced: 2024-11-23T23:06:37.632Z (about 1 month ago)
- Language: C
- Size: 123 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CXXFilt
This is a Ruby gem for demangling C++ symbols. It works the same way as the `c++filt` program from GNU binutils does. It even links with `libiberty` and uses the same demangling routines as `c++filt`.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'cxxfilt'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install cxxfilt
## Usage
Get a list of the available demanglers:
```
2.4.1 :001 > require "cxxfilt"
=> true
2.4.1 :002 > CXXFilt::demanglers
=> [
#,
#,
#,
#,
#,
#,
#,
#,
#,
#,
#]
```Demangle a symbol with the `auto` demangler:
```
2.4.1 :003 > CXXFilt::demangle("_Z1hic")
=> "h(int, char)"
2.4.1 :004 > CXXFilt::auto.demangle("_Z1hic")
=> "h(int, char)"
2.4.1 :005 > CXXFilt::demanglers[1].demangle("_Z1hic")
=> "h(int, char)"
```## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at [https://github.com/misson20000/cxxfilt-rb].