Commit Graph

3 Commits

Author SHA1 Message Date
Martijn Coenen dfcbcfdcdc Mark libdemangle as vendor_available.
This means the library may be installed in both the
/system and /vendor partitions, if they are used by
system and vendor code respectively.

Test: mm -j64
Bug: 38244611
Change-Id: I5874529d410a226c028a248b0d22ea5e80639445
Merged-In: I978f8e34d354e4fe03a3c19dd0dbc6899f26a793
2017-06-20 20:29:57 +00:00
Christopher Ferris a11dc8f962 Add a binary to dump demangled names.
Test: Ran the executable and verified names get demangled.
Test: Ran with the -c option to verify it compares demangled names.
Change-Id: I9118ccc4398980346d26f615cdfed0bb756b52fe
2017-03-13 16:10:08 -07:00
Christopher Ferris 9323b7219c Implement a simple demangler.
The purpose of this demangler is to avoid crashes for any string.

- It does one pass and should avoid going past the end of the string.
- The code avoids recursion to minimize the amount of stack required.
- It cannot demangle all mangled names, but it should be able to work
  on nearly all names in normal stack traces.
- If the mangled name is too large, it will stop demangling and return
  as if the name is not a demangled name.

Test: Passes new unit tests.

Change-Id: I596f74a533c0e093d1517c6bd11cced07009d321
2017-03-07 13:04:32 -08:00