2884 Commits

Author SHA1 Message Date
Florian Märkl
93d9f4ec66 Add mask parameter to r_anal_op() 2018-03-16 11:10:15 +01:00
Florian Märkl
94bdf5ce56 Enable xtensa in meson
Fix r_anal_op() for anal_xtensa if ESIL is disabled

Fix anal_xtensa for Windows
2018-03-16 11:10:15 +01:00
redmed666
24e076e19e Fix #9595 (#9673)
* Added an address mask inside the RAnalEsil struct in order to be sure that the address accessed is relevant with the asm.bits of the file + Changed the calls to r_anal_esil_new

* Corrected the addrmask in r_anal_esil_new

* RTTI: Read MSVC Complete Object Locator

* RTTI: Read MSVC Class Hierarchy Descriptor

* VTable End on Reference

* RTTI: Read MSVC Type Descriptor

* RTTI: Read MSVC Base Class Array, Better Printing

* Add anal.cpp.abi

* Minor Code Style Changes in RTTI

* Fix rahash2 entropy to show non truncated double (#9629)

* Anal - whitespace fixes

* Honor CFLAGS on the static build test compilation (#9677)

* change coding style tab width to 4 (#9670)

* Meson: use more built-in options (#9678)

* Add support for extended regex in asm search (#9675)

* Fix #9665 - Backwardly handle scr.color={bool}

* Fix #9676 - Infinite loop in ecs with scr.color=2

* Adding help for redirection (#9679)

* Refactores function r_str_split_list to receive the character to split by (#9672)

* Fix #9666 - lines with comments do not use Unicode reflines

* Fix uninitialized optypes_list issue in cmd_debug

* update asan.sh to actually take the env for ASAN

* removed incorrect return (#9685)

* Fix UB in ESIL

* Initial import of the CoreUndo API and uc command

* Initial implementation of cmd.pdc to select pseudo-decompiler

* Handle recursive pdc calls

* Fix RPrint.strconv_mode memleak

* Fix leaks in RSyscall.srdb

* Use r_syscall_ref to avoid dblfree-or-leak issue

* Arm thumb/thumb selector for the armass (#9681)

* added function to translate number to imm12
* added function to get thumb shifts easily
* added selector, newfangled implementation of adc
* add bitmask for command suffixes
* added new routine for parsing suffixes to opcodes. Error check added in getnum. Bugfixes.

* Few improvements to 8051 memory mapping (#9686)

* update memory map when idata/sfr/xdata regs change
* set address space name on map
* fix regression, remove debug output
* fix regression, enable map name

* Some fixups for #9682 (#9688)

* Fix: coredump generation for huge programs (#9680)

* Refix #9666 - lines with comments do not use Unicode reflines

* Removed code unnecessary due to dcf3db025085c45124ec21890550a4ef19bd015c

* Fixed free const warning

* Fix another memleak in RSyscall

* Fix more memleaks

* Fix leak in RConsPal.rainbow

* Fix 18K leak in anal.x86.cs

* Fix some more memleaks in disasm and fix issue in str overlap

* Fix memleak in RCore.anal_refs and fix regression

* Revert "Fix some more memleaks in disasm and fix issue in str overlap"

This reverts commit a902df837b0d499e1723179ed5c957c078703b51.

* Fix memleak regressions

* Bring back another memleak fix

* Fix an undefined behaviour in RParse.filter

* Fix memleaks in disasm.c

* Add cundo.c to Meson (#9694)

* Bring back an ugly buffer pack access issue to make it work

* Cast to void * in R_FREE (#9692)

* Set anal.cpp.abi to msvc for pe

* Add better help for av

* Split avr into avr and avra

* Make av, avr and avra breakable

* Add RTTI struct specific print functions

* RTTI: Support MSVC x86_64

* PE: Fix too short section name.

* PDB: define a constant to store the max length of a section name and use id.

* PDB: dump the size of structure and union in JSON mode.

* Fix cast issue in eprintf for debug.core.linux

* Move the asm and anal plugins for x86.udis to extras

Available via r2pm -ci udis86

* Remove more udis86 references

* Fix warnings

* fix pcache ptr-fuckup

* Fix defragger theme

* Fix crash in asl and fix its behaviour

* Fix memory leak in blaze anal and silent a warning

* Implement ?q to be like ?v but in quiet mode

* Fix Meson build

* Add missing 8, 16, 32 bit registers (and flags) for the linux-arm64 debugger reg profile

* Fix 'Cannot find function at UT64_MAX message'

* Add some Pingu to fortunes.fun

* Loading Core (x86, x86_64, aarch64) (#9669)

* Ragg2-cc -> Ragg2 merge (#9658)

- change of 'access' function for 'r_file_exists' for windows portability
- several changes in the way ragg2.c is done, see PR #9658 pancake comments
- change function for the remove of 'file'.text
- open changed for r_file_dump
- some elt of cEnv_t are now const
- skip all the pointers verification in set_cEnv but do them in check_cEnv instead
- add 2 r_str_sanitize for file and CC in parseCFile
- rewrite the removal of .o, .tmp, .bin, .s files, with cleaner code
- changed the long command with sed and grep to 2 C functions.
  - The function parseCompiled that basically does what the command was doing
  - And r_str_stripLines that is equivalent to "grep -v" (maybe we should put this one in str.c ?)
- simplify a bit getCompiler function with a const char* array
- add ternary operator for armOrMips condition
- use r_file_path for finding path to compilers
- new file created in libr/egg which contains all the C file parser
- modifications of 2 files to match the change :
  - libr/egg/r_egg.h
  - libr/egg/Makefile
- the function r_str_stripLine is simplier (the mallocs wasn't needed)
- the function r_str_stripLine is moved to libr/util/str.c
- libr/include/r_util/r_str.h is changed accordingly

* Revert bd3465c9a3fbeddf83980dc07eaac588320f7d (warning remains fixed)

This reverts commit titled "Fixed free const warning".

* Added an address mask inside the RAnalEsil struct in order to be sure that the address accessed is relevant with the asm.bits of the file + Changed the calls to r_anal_esil_new

* Corrected the addrmask in r_anal_esil_new

* Cleanup expressions in esil.c (addr &=...)

* Corrected r_anal_esil_new definition in r_anal.h

* Added an address size max in the ESIL config (maximum address size reachable by the ESIL VM)
2018-03-16 10:45:17 +01:00
pancake
2682d34291 Fix warnings 2018-03-14 23:54:27 +01:00
pancake
023e4389ed Remove more udis86 references 2018-03-14 23:43:53 +01:00
pancake
3e8f8a2863 Move the asm and anal plugins for x86.udis to extras
Available via r2pm -ci udis86
2018-03-14 22:38:41 +01:00
Florian Märkl
4a14ab1fe9 RTTI: Support MSVC x86_64 2018-03-14 20:05:33 +01:00
Florian Märkl
ec2b05309e Add RTTI struct specific print functions 2018-03-14 20:05:33 +01:00
Florian Märkl
c01bfe9ea1 Make av, avr and avra breakable 2018-03-14 20:05:33 +01:00
Florian Märkl
74566827d1 Split avr into avr and avra 2018-03-14 20:05:33 +01:00
pancake
debcd1387e Fix memleaks in disasm.c 2018-03-14 19:52:09 +01:00
pancake
18f805d296 Fix 18K leak in anal.x86.cs 2018-03-14 15:43:59 +01:00
Khairul Kasmiran
dcf3db0250 Refix #9666 - lines with comments do not use Unicode reflines 2018-03-14 20:13:49 +08:00
Oscar Salvador
58369b86f5 Some fixups for #9682 (#9688) 2018-03-14 13:08:01 +01:00
Adrian Studer
3983af51c5 Few improvements to 8051 memory mapping (#9686)
* update memory map when idata/sfr/xdata regs change
* set address space name on map
* fix regression, remove debug output
* fix regression, enable map name
2018-03-14 13:07:22 +01:00
pancake
3c9879656e Use r_syscall_ref to avoid dblfree-or-leak issue 2018-03-14 12:58:16 +01:00
Anton Kochkov
cd5f69b094 Fix UB in ESIL 2018-03-14 14:40:52 +08:00
Florian Märkl
ca2ef8a438 Minor Code Style Changes in RTTI 2018-03-12 23:34:34 +01:00
Florian Märkl
086c3a144e Add anal.cpp.abi 2018-03-12 23:34:34 +01:00
Florian Märkl
f95432fceb RTTI: Read MSVC Base Class Array, Better Printing 2018-03-12 23:34:34 +01:00
Florian Märkl
1138cd06a0 RTTI: Read MSVC Type Descriptor 2018-03-12 23:34:34 +01:00
Florian Märkl
8fb26b919b VTable End on Reference 2018-03-12 23:34:34 +01:00
Florian Märkl
d39970e83b RTTI: Read MSVC Class Hierarchy Descriptor 2018-03-12 23:34:34 +01:00
Florian Märkl
94b486cf3e RTTI: Read MSVC Complete Object Locator 2018-03-12 23:34:34 +01:00
Dirk Eibach
405524d2f8 Make segment granularity adjustable (#9631)
* core: Make segment granularity adjustable

Segments in x86 real mode have 16 byte granularity(4 address bits).
There are however systems (namely the Vautomation/ARC Turbo 186 cores)
that use 256 byte(8 address bits) instead to allow access to 16MiB memory.

Unfortunately fixed granularity is hard coded in lots of places in r2.

This patch adds asm.seggrn configuration and fixes the hardcoded
assumptions in core.

Signed-off-by: Dirk Eibach <eibach@gdsys.cc>

* anal_x86_cs: Make segment granularity adjustable

Fix hard coded segment granularity assumptions in capstone
anal module.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
2018-03-12 12:37:35 +01:00
Anton Kochkov
114f59a7e0
Fix vtables detection 2018-03-12 18:28:05 +08:00
redmed666
2ecaaf4939 Switch cases for imul and idiv when there is only 1 argument (like for mul operation) (#9654) 2018-03-11 16:12:26 +01:00
Khairul Azhar Kasmiran
60a9825f3c
esil: inline x86 esi pic thunk (#9642)
* esil: inline x86 esi pic thunk

* Initialize buffer and check return value of read_at
2018-03-11 21:36:29 +08:00
Florian Märkl
e61339a3d0 More VTables (#9646)
* List vtable methods without fcn, Merge r_anal_list_vtables() and r_anal_list_vtables_all()

* Additional info in av*
2018-03-10 21:28:27 +01:00
Paul I
69e655fd49 Meson: enable Propeller and Java (#9639) 2018-03-09 20:05:47 +08:00
Florian Märkl
59e4408d70 Move VTables from Core to Anal (#9638) 2018-03-09 20:02:39 +08:00
pancake
8f43e155c4 Fix warning and remove graph layer warning message 2018-03-07 00:51:49 +01:00
pancake
6f7d72f12c Fix undeletable function bug. Test: af+ $$ foo; af- $$ 2018-03-06 21:47:08 +01:00
Khairul Kasmiran
f5f9ee39d3 Moved read_at into RAnal 2018-03-06 22:26:02 +08:00
Khairul Kasmiran
2244152360 new_read_window 🡒 read_at 2018-03-06 22:19:57 +08:00
Khairul Kasmiran
3d1689bd3c modify_read_window → new_read_window 2018-03-06 20:18:25 +08:00
Paul I
9c0d682e60 Meson: Invoke python via <python3> module + some little fixes (#9594)
* Meson: Invoke python via <python3> module

* Meson: Added version check

* Meson: Disable git output for capstone cloning command
2018-03-06 08:28:40 +01:00
Khairul Kasmiran
3819134003 Cannot initial declare in for loop 2018-03-05 21:04:38 +08:00
Benno Fünfstück
18bffe1257 feat(anal_avr): implement opcode masking for improved zignatures (#9569)
AVR instruction encoding is weird, we really need custom masking to get useful
zignatures.
2018-03-05 11:39:48 +01:00
Benno Fünfstück
6c77168732 feat(anal_avr): add missing opcode info (val, ptr) (#9568) 2018-03-05 11:23:03 +01:00
Anton Kochkov
6a41524599 Revert "char* is a pointer (#9580)"
This reverts commit d57ae7ae1b6f9bed66077b41c261967324b8bc22.
2018-03-05 12:33:11 +08:00
Guillaume Valadon
d57ae7ae1b char* is a pointer (#9580) 2018-03-05 00:18:42 +01:00
Paul I
13f7013696 Meson: Added sdb building/installation rules (#9575) 2018-03-05 00:10:28 +01:00
Benno Fünfstück
61198eca8f fix(anal): use r_anal_op_free instead of free for op (#9565) 2018-03-04 21:54:44 +01:00
Florian Märkl
5e1f811ec0 Fix meson indentation (#9567) 2018-03-03 22:08:37 +01:00
Florian Märkl
95a1b75784 Install Headers and .pc Files with Meson (#9548)
Use meson pkgconfig for .pc files

meson 0.44

Install same headers as acr
2018-03-03 20:00:18 +08:00
pancake
b3d465f38e Fix build and move anal.setHints from plug to the anal loop 2018-02-27 19:13:12 +01:00
Khairul Azhar Kasmiran
cf4efd5984 resize_read_buf -> modify_read_window (#9507) 2018-02-26 10:01:25 +01:00
Khairul Azhar Kasmiran
bcb7dcf717 bf: fix crash when unbalanced loop and no aes (#9495) 2018-02-24 19:17:00 +01:00
xarkes
7e98502666 Code refactoring for the color palette handling
* RConsPrintablePalette initialization
* Remove scr.rgbcolor
* Added RColor support to cons_pal_parse
* Added warnings about pal_set and missing event_update
* Code cleaning (char* to RColor), less rgb_parse
2018-02-23 19:00:47 +01:00