addr2line
A library to convert addresses into filename and line number pairs
Last updated 3 years ago by avtolstoy .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install addr2line 
SYNC missed versions from official npm registry.

Usage

Class instance:

const Addr2Line = require('addr2line').Addr2Line;

let resolver = new Addr2Line(['/path/to/bin1.elf', '/path/to/bin2.elf']);
resolver.resolve('0x123456').then((res) => {
  console.log(res);
});

Convenient wrapper

const addr2line = require('addr2line').addr2line;

let resolver = addr2line(['/path/to/bin1.elf', '/path/to/bin2.elf'], '0x123456').then((res) => {
  console.log(res);
});

Options

const Addr2Line = require('addr2line').Addr2Line;

const opts = {
  // addr2line tool binary name
  bin: 'addr2line',
  // addr2line tool prefix
  // The resulting binary name is a concatenation of prefix and bin
  // e.g. {bin: 'addr2line', prefix: 'arm-none-eabi-'} -> 'arm-none-eabi-addr2line'
  prefix: '',
  // Unwind inlined functions
  inlines: true,
  // Strip path from filenames
  basenames: false,
  // Resolve functions
  functions: true,
  // Demange functions
  demangle: true
};

let resolver = new Addr2Line(['/path/to/bin1.elf', '/path/to/bin2.elf'], opts);
resolver.resolve('0x123456').then((res) => {
  console.log(res);
});

Current Tags

  • 0.0.4                                ...           latest (3 years ago)

4 Versions

  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 4
Last Day 2
Last Week 0
Last Month 2
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |