Commit Graph

82 Commits

Author SHA1 Message Date
radare
d174f66f95
Refactoring and optimization for the RBin.language identification ##bin (#11944)
* More code cleanup and bring back bin.reload for the debugger
* Benchmark: swift: 23/9549 rcore: 17232/37147 (2-400x faster)
* For DVIA iOS app this is 1s less
* Demangle all the symbols, not just few
2018-10-27 05:01:09 +02:00
pancake
4d4ce2f49c Code cleanup in the mach0 parser ##refactor 2018-10-24 13:05:29 +02:00
pancake
1f172eca0c Prefer c++ over cxx 2018-10-01 16:23:34 +02:00
Riccardo Schirone
d57b7423af
format/elf: fix is_in_pphdr function (fix #11377) (#11683)
* format/elf: fix is_in_pphdr function

That function should check if an address is in the file "side" of the
phdr, so it should check for filesz and not memsz

* format/elf: consider filesz even when looking at virtual space

A virtual address that is included in p_memsz but not in p_filesz, means
that it's an address that has no counterpart in the physical file, does
it makes no sense to look at memsz when converting an address from
virtual to physical.

* bin/demangle: demangle names that end with @@CXXABI

After last commit, we get correct mangled names that, according to other
tools, include also the @@CXXABI part. This patch removes the @@CXXABI
suffix because the cplus_demangle_v3 function is not able to deal with
it.
2018-10-01 10:47:52 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Neven Sajko
d8784641ee Add parentheses in macros where needed for safety (#11290) 2018-08-30 13:16:50 +02:00
pancake
de86371355 PDB_SERVER is now RABIN2_PDBSERVER 2017-10-30 12:46:33 +01:00
Ioannis Gasparis
1dfeb6ffa3 When a method has as an argument an object that belongs to a namespac… (#8698)
* When a method has as an argument an object that belongs to a namespace, the last :: is not the correct delimeter. It should be the last :: before the first (

* Make it beautiful

* Fix broken build
2017-10-17 01:30:11 +02:00
pancake
1b6cfb68bd Fix some memleaks, warnings and null derefs pointed out by clang analyzer 2017-07-10 11:20:03 +02:00
armijnhemel
12275461d0 Set flag to also demangle flags 2017-05-25 15:40:50 +02:00
pancake
11577f6b92 Fix #6917 - oobread in rust demangler 2017-03-09 23:15:14 +01:00
Álvaro Felipe Melchor
8c354cade7 Fix warnings when compiling 2017-01-08 12:27:28 +01:00
Moritz Eckert
e295e98d82 Remove unnecessary dereference (#6433)
Fix CID 1368290:  Incorrect expression
2017-01-05 11:55:36 +01:00
Eugene
4c7928b5cd Fix #6405 - Implement Rust Demangler
* Added rust demangling based on cxx-version
* Add rust support for rabin
2017-01-05 00:52:13 +01:00
pancake
c6ffb3e9b6 Include address into the Class symbols for the C++ demangler 2016-11-22 14:58:42 +01:00
pancake
7b94a79dcd Initial support for C++ classes extracted from the demangler 2016-11-22 14:20:52 +01:00
Álvaro Felipe Melchor
f5166f936d Fix some meamleaks (#6156) 2016-11-09 02:28:14 +01:00
Wladimir J. van der Laan
fb196362e1 Handle NULL strings in r_bin_demangle (#5587) 2016-08-23 13:11:30 +02:00
Sven Steinbauer
8da8ad740f Cleanup fixes
* For commit comments and compiler errors
* Fixes for PR comments
* fix some "infer fixes" commits

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-23 11:25:44 +02:00
pancake
6261fe32fb bugfixes + testsuite for the Internal Swift demangler 2016-05-03 04:31:36 +02:00
pancake
d2fb776e8f Enhancements in demangler performance and for relocs 2016-04-23 02:02:03 +02:00
pancake
c2b151f8c8 Fix a lot more covs 2016-03-31 13:21:51 +02:00
pancake
273b20294e Add support for swift-demangle if found in PATH 2016-03-24 00:20:59 +01:00
Álvaro Felipe Melchor
9feae374f4 Fix oob read when demangling stripped binary 2016-03-13 19:19:03 +01:00
Riccardo Schirone
5d08aee9af bin/demangle: fix possible SEGV when dereferencing binfile 2016-02-18 13:52:31 +01:00
Álvaro Felipe Melchor
feaaab517b demangle afl and disassembly 2016-02-11 01:32:36 -06:00
pancake
40e08dbd89 Get rid of _Bool 2015-12-01 12:39:12 +01:00
pancake
b5333accaa Fix objc demangle crash (thx @revskills) 2015-11-22 21:56:23 +01:00
pancake
baf63a0cba Reduce RBinSymbols memory (smaller footpronum) 2015-11-09 03:41:07 +01:00
Jeffrey Crowell
20d1886a5a fix a bunch of memleaks 2015-11-01 00:47:16 -04:00
Álvaro Felipe Melchor
7498ddff58 Fix crash demangle in objc reported by revskills 2015-10-29 12:57:06 +01:00
pancake
45c7c923af Better dtc, demangling support. Handle RABIN2_LANG, and more c++ autodetect
* r_name_filter(len:-1) strlens the string
* Show symbol names in `dtc` (calltracer)
2015-10-19 13:21:12 +02:00
pancake
49975ccf95 Fix #3286 - Use stdbool.h 2015-09-14 02:08:31 +02:00
inisisder
553e20c3d9 fix segfault and memory leaks 2015-08-10 13:48:48 +02:00
inisisder
d8af00ea36 add parsing of objc classes from binary 2015-08-10 13:48:47 +02:00
Jonathan Neuschäfer
ecf6792318 Fix #2927 and random code cleanups
- asm_dcpu16: remove an obsolete comment
  It was obsoleted in 5285d1bdea.
- Indentation fixes
- fix a few typos
- remove "#define NEW_ESIL"
- move comment about r_bin_filter_name to the right place
- README.md: Add V810 to the list of supported architectures
- Also, de-duplicate LH5801
- Add attribution to randomart.c, fixes #2927
2015-07-12 19:20:36 +02:00
pancake
45a83dc38a Detect Rust binaries in RBinLang for name demangling 2015-06-29 11:22:05 +02:00
Álvaro Felipe Melchor
ccef928dfe Fix some COVs 2015-06-28 20:15:35 +02:00
pancake
1e4638d27e Add -D <lang> all to demangle symbols via rabin2 2015-06-22 11:36:28 +02:00
Álvaro Felipe Melchor
1c7feb2240 Fix some infers 2015-06-20 17:33:09 +02:00
jvoisin
ca883330b0 Fix 3 CID 2015-02-21 22:28:49 +01:00
pancake
e2fd3ae96f Add missing demangler names in array 2015-02-19 22:56:49 +01:00
inisider
208aa0ce8a fix merged problems 2015-02-19 22:49:44 +01:00
inisider
d61353de78 MSVC demangling functions and templates
Contains 13 commits:
- add parsing og operator name codes
- add stubs for parsing function and function params
- remove uunsed code
- add initial printing of demangled functions
- fix some issues according to new testsuit
- add parsing of types abbreviation
- add support of abbreabiation of names
- fix some memory leakage
- small fix for parsing of storage class code for return
- add #undef for macro GET_VAR...
- fix some output for operatorXX()
- add parsing of templates
- isolate abbr. name list for templates
2015-02-19 09:32:21 +01:00
pancake
31e08131d1 Handle RBin demanglers from plugins and support D language 2015-02-11 02:05:22 +01:00
pancake
098d0ec1de Initial implementation of --without-gpl 2015-02-07 01:50:25 +01:00
pancake
c2febd2ffc Drop some noisy magic rules 2015-02-06 23:59:19 +01:00
inisider
cad09fa595 Add Microsoft C++ demangler
- Contains 20 commits:
- init work of demangler
- add some comments
- add parsing of name, class_name, namespace of objects(class and global)
- refactor
- add parsing of some type codes
- add skeleton of state machine for type code parsing
- add parsing of standard type for type codes state machine
- add parsing of type codes: _{J,K,T,Z,W}
- add parsing of types __m** and union
- add parsing of type codes: _m***, struct *
- add parsing of W type codes: enums...
- refactor getting of namespaces and name variables
- add class type code parsing
- add parsing of long double and bool
- add parsing of X * const volatile
- add parsing of * and & ( Q, R, S, A )
- add parsing of array
- integrate some initial part of microsofr demangler to rabin2
- fix some small bugs
- add parsing of variable storage class and do some small fix
2015-02-06 22:50:30 +01:00
pancake
75c322b613 Add bin.lang, rabin2 -D and iD commands to demangle from commandline
- Fix some warnings in windbg
- Minor fix for ARM analysis (wip)
2015-01-10 01:00:01 +01:00
pancake
2ff77e67c7 Fix crash for unknown demanglers 2015-01-02 19:27:31 +01:00