Commit Graph

387 Commits

Author SHA1 Message Date
sivaramaaa
c55d8e4b9c Fix MIPS asm parser to display vars in disasm ##disasm 2019-02-17 05:21:08 +01:00
radare
d9197f6115
Fix #11585 - Missing main/entry substitutions ##disasm 2019-02-14 00:19:00 +01:00
Gaurav Kumar Ghildiyal
e60749ed12 Added feature to return error while parsing c header file (#13030)
* Added feature to return error while parsing c header file

* Fixed cmd_type.c to pass tests
2019-02-10 01:56:28 +01:00
Khairul Kasmiran
1e65206273 Remove some r_parse spaces 2019-02-08 00:01:02 +08:00
Khairul Azhar Kasmiran
e9acf36c4f t-* resets tcc's anonymous symbol counter (#13015) 2019-02-07 16:04:59 +01:00
Riccardo Schirone
e5b4d9294c Use RSpaces in RFlag ##refactor 2019-02-03 09:06:45 -06:00
pancake
709ffb60b6 Fixes for the android build and related warnings 2019-01-21 12:10:33 +01:00
Pepe Vila
015e7734a7 Fix Wasm function rename to ignore memory and other non-function symbols (#12832) 2019-01-18 16:30:09 +01:00
Giovanni
5f931603de WebAssembly improvements in branch lines and namings ##wasm 2019-01-18 11:29:51 +01:00
lzutao
1365948cee Do not use reversed keyword of meson ##build
`files` is a reversed keyword in meson. Try to avoid using it.
2019-01-10 14:15:50 +01:00
Jessica Creighton
d7571566a2 Have arm pseudo's replace() use the same replacement style as x86's ##disasm
* Fix `movt r0, 0x1234` from incorrectly showing up as `r0 = 0x1234 << r0`
2019-01-09 22:15:20 +01:00
pancake
b29f5bb54a Fix some issues reported by clang-analyzer 2018-12-31 05:36:14 +01:00
lzutao
9cc6d2d291 meson: Do not use glob with meson ##build
* meson: Explicit is better than implicit
* meson: Fix deprecated warnings in Meson 0.49.0
* meson: Do not need separate array for installed files

libr/socket/meson.build:30: DEPRECATION: Library r_socket was passed to
the "libraries" keyword argument of a previous call to generate() method
instead of first positional argument. Adding r_socket to "Requires" field,
but this is a deprecated behaviour that will change in a future version
of Meson. Please report the issue if this warning cannot be avoided in
your case.
2018-12-27 14:17:54 +01:00
radare
0ca4d00251
Implement support for nword in ahi ##anal (#12494)
- ahi0 == ahi
- any digit from 0 to 9 is valid
- test case:

	$ r2 -qcq - << EOF
	wx c7458843c6ff00
	pd 1
	ahi 10
	pd 1
	ahi-
	ahi1 10
	pd 1
	EOF

	mov dword [rbp - 0x78], 0xffc643
	mov dword [rbp - 120], 0xffc643
	mov dword [rbp - 0x78], 16762435

* Fix behaviour in ahi nword and assume nword is 0 by default
* Add VdI
2018-12-17 12:56:07 +01:00
radare
d05292e485
Fix 80 warnings coming from gcc8.2 (#12280) 2018-11-22 22:11:43 +01:00
Luca Di Bartolomeo
826d584405 Fix #11889 - Fix varsub when some ansi escape sequences are involved ##disasm
- findNextNumber to parse bold ascii escapes
2018-11-21 22:35:48 +01:00
lzutao
b790439e28 Cast arguments to ut8 when feeding ctype.h functions ##refactor
The behavior of the `<ctype.h>` functions is undefined for negative
arguments (other than `EOF`). In such a situation, the argument should
be cast to `unsiged char` for safety.

References:
 - C Programming: A Modern Approach, 2nd Edition: page 612, chapter 23.5
2018-11-06 13:40:00 +01:00
sivaramaaa
bc4b5933d2 Improve array indexing in disassembly ##anal 2018-11-02 18:27:45 +01:00
Riccardo Schirone
d6aab51c2b WIP: gcc8 warnings (#11795)
* arch/ebc: fix style and remove gcc8 warnings
* parse/parse_ppc_pseudo: fix gcc8 warnings
* parse/parse_mips_pseudo: fix gcc8 warnings
* anal/esil: fix strncat usage
* shlr/tcc: fix snprintf usage
* parse/parse_dalvik_pseudo: fix sprintf -> snprintf
* lang/vala: fix gcc8 warnings
* core/vmenus: fix snprintf usage
2018-10-12 12:17:29 +02:00
Khairul Azhar Kasmiran
c7a9ab9d74 Fix arm relsub when both pointer addr and pointed-to addr have flags (#11780)
* Fix arm relsub when both pointer addr and pointed-to addr have flags
* Add comment stating extra implication
* Print flag if exists, otherwise address but not both
2018-10-11 01:17:48 +08:00
radare
f7be81edbb
Fix instruments leaks (#11695)
* Fix a small memleak in the disasm reflines
* Fix huge args leaks in r_parse for arm
* Fix another memleak
* Fix memleak in VR
* Fix memleak related to bad use of r_list_join
* Fix warnings
* Fix two rlist related asserts
2018-10-01 19:57:33 +02:00
radare
47297f6d0a
Initial implementatil of asm.tailsub (#11696) 2018-09-30 11:41:19 -04:00
dogtopus
d3b5b59b05 Parse add instruction in mips.pseudo (#11689) 2018-09-28 18:24:34 -07:00
Paul I
bf29250ddd Fix #11487 (#11534) 2018-09-15 22:52:12 +02:00
fcasal
0ad81b1a7f Detect golang by looking at golang sections. (#11520) 2018-09-14 14:54:00 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Riccardo Schirone
eee1385466
Meson private (#11331)
* meson: refactor library cflags
* meson: use visibility=hidden by default
* remove unused var
* magic/meson: replace tabs with spaces
2018-09-03 10:07:28 +02:00
Giovanni
7858546004 ppc fix for rl/rw* masks (#11315) 2018-08-30 22:46:25 +02:00
pancake
77482df0ba Fix crash in asm.imm.trim
$ r2 -qc "af ; e asm.imm.trim=true ; pdf" /bin/ls
2018-08-13 18:05:32 +02:00
pancake
991e81df37 Improve ARM pseudo for LDRH 2018-08-13 16:31:42 +02:00
radare
68eb5173ba
Better asm.pseudo for arm64 (#11030) 2018-08-11 18:08:21 +02:00
Andry
6601ccb583 Fix #10895 - tcc infinite loop 2018-08-04 13:17:29 +02:00
Riccardo Schirone
7572f315ea
meson improvements (#10617)
* meson.build: fix meson build when not on git
* meson.build: make capstone a dependency
* meson.build: make r_magic library optional
* meson.build: capstone include is already in the dependency
* meson.build: use dependencies instead of manual linking + includes
* meson.build: add travis
* flag/meson.build: include sdb dependency
* travis-script: print messages based on install system
* io/meson.build: add sdb as dependency
* syscall/meson.build: missing sdb dependency
* {parse,config}/meson.build: add sdb dependency
* travis.yml: pass INSTALL_SYSTEM var to docker
* {bin/shlr}/meson.build: add sdb_dep to r2java and bin
* install meson and ninja-build in r2-travis docker
* travis.yml: allow meson build to fail for now
* anal/meson.build: add sdb and java dependencies
* egg/meson.build: add sdb dependency
* travis.yml: meson build env should be also in the includes list
* core/meson.build: add java dep
* meson.build: use dependencies also to create main r2 dependency
* rasm2/meson.build: replace link_with with dependencies
* rasm2/meson.build: add sdb as dependency
* meson.builds: convert link_with to dependencies and fix tabs
* travis-script: change meson install prefix and set PKG_CONFIG_PATH
* travis-script: add lib64 to LD_LIBRARY_PATH
2018-07-09 16:58:38 +02:00
pancake
9a1787b201 Fix #10667 - Invalid ARM instruction filtering 2018-07-09 12:17:34 +02:00
Khairul Kasmiran
b9ce57d68d Fix gcc8 warning for #10338 2018-07-05 23:03:10 +08:00
cyanpencil
b747592598 Add asm.flags.real option disabled by default 2018-07-05 00:55:51 +08:00
cyanpencil
c90d548082 Fix linking error in flag.c 2018-07-05 00:55:51 +08:00
cyanpencil
80487cde44 Display flag realname instead of name 2018-07-05 00:55:51 +08:00
sivaramaaa
f08d7f4614 Prevent register based var sub in disas 2018-06-29 14:33:11 +02:00
David CARLIER
0b56069c20 Fix asm parsing issue found in OpenBSD (#10528)
(memcpy vs memmove)
2018-06-29 13:03:52 +02:00
pancake
fa3851b76e Fix #10494 - crash in rparse.filter 2018-06-26 15:32:05 +02:00
David CARLIER
3ca17abc40 asm parse fixes. (#10470)
on Darwin and with debug symbols, feat_grep test crashes.
on OpenBSD in non debug mode, feat_grep crashes so
we make the last chunk copy consistent.
2018-06-24 20:09:03 +02:00
pancake
80935a95c0 Aim to fix an oobread in rparse 2018-06-12 16:43:44 +02:00
pancake
7c2d84594c Fix oobread in RParse 2018-05-29 12:55:11 +02:00
radare
d461644977
Add --with-libr and deprecate --with-{nonpic,pic,merged} (#10212) 2018-05-28 17:14:49 +02:00
Khairul Azhar Kasmiran
1af3b9fcd1
Honor asm.ucase in arm varsub (fp) (#10178) 2018-05-25 18:54:41 +08:00
pancake
4a3057f9fc s/\r\n/\n/g 2018-05-21 22:13:07 +02:00
pancake
be89180e7b Cleaning up asn1 apis, standarize IS_* apis and some more cleanup 2018-05-21 22:13:07 +02:00
Paul I
7e9f982849 Meson: some cleanup (#10076) 2018-05-16 10:24:35 +02:00
Khairul Azhar Kasmiran
8011226135 arm asm.pseudo supports asm.varsub_only for fp (#10074) 2018-05-11 12:53:42 +02:00