1346 Commits

Author SHA1 Message Date
radare
c98136300d
Fix #12667 - Fix heap overflow in RCons.grep ##cons 2019-01-07 16:08:54 +01:00
David CARLIER
e325b3c6de FreeBSD debug slight improvements. (#12609)
Getting couple of process info, to get the full path name
it would require a bit more calls while not sure it worths it
but we get at least the exe name and figuring out its status.
2019-01-03 00:38:13 +01:00
pancake
b29f5bb54a Fix some issues reported by clang-analyzer 2018-12-31 05:36:14 +01:00
radare
dc185e242a
Add scr.wideoff to make offsets and reg values depend on asm.bits ##visual 2018-12-31 03:06:05 +01:00
David CARLIER
2eb706029c Few code/cleanups mem leaks potential (#12591) 2018-12-31 00:21:47 +01:00
David CARLIER
cae13a0e14 Improving slighty debug support on FreeBSD. (#12572)
When a process is interrupted by a signal, we try to
figure out the reason if the information is still available.
2018-12-27 23:18:55 +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
GustavoLCR
7530895d0a Fix a few clang scan-build bugs (#12562)
* Removed unnecessary variable from libr/core/disasm.c
* Removed not necessary assignment in libr/core/casm.c
* Removed not used assignment in libr/bin/dwarf.c
* Rem. duplicate declaration and not used values
* Fixed potential memory leak in java/class.c
* Fixed potential memory leak in ragg2
* Removed unnecessary variable in visual.c
* Another potential memory leak in class.c
* Removed not used value assignment
* Fixed memory leak in dwarf.c
* Removed not needed assignments
* Remove more not used assignments
* Refactored where bin_sections gets arch & bits for clarity
* Removed more assignments that are not used
* Rem. more unused assignments
* Surround assignment with paranthesis
2018-12-26 12:54:12 +01:00
Riccardo Schirone
738bc9cb19 Fix warnings by using more r_str_ncpy
* Fix wrong logic in visual_search

When the string to be searched is wrapped in " ", you want to remove the
first and last quotes and look only for the internal string.

* Increase size to prevent string truncation (and fix compiler warning)
* Fix "destination unchanged after copying no bytes" warning
* Move msp430_register_names where it belongs to
* Fix Wstringop-truncation warning
2018-12-19 12:07:49 +01:00
pancake
a6f943d87d Fix musl build (required for Alpine) 2018-12-18 18:24:09 +01:00
dav1901
0a65d76eb8 Minor cleanups/fixes 2018-12-18 16:26:17 +01:00
dav1901
5b644dcb74 Minor cleanups/fixes (#12478) 2018-12-14 00:17:50 +01:00
dav1901
97b94b3f94 Fix more clang warnings (#12458) 2018-12-12 12:22:36 +01:00
dav1901
b88806f65f Fix more clang-analyzer warnings (#12424) 2018-12-06 16:55:09 +01:00
pancake
cd4d226059 Fix crash in gdb when desc is null 2018-12-03 01:30:00 +01:00
Riccardo Schirone
baf9305ea2 Warn fixes (#12360)
* Remove unused variable from __io_attach
* Avoid using empty string with snprintf, just set \0
2018-11-30 12:09:01 +01:00
pancake
842dadc41d Add mips software breakpoint in the macro 2018-11-27 10:19:07 +01:00
lzutao
becc3000a8 Change unneeded global static vars to local static (#12324) 2018-11-26 23:21:19 +01:00
pancake
b84cbd5434 Fix linux-arm64 build 2018-11-26 05:32:28 +01:00
radare
d05292e485
Fix 80 warnings coming from gcc8.2 (#12280) 2018-11-22 22:11:43 +01:00
pancake
e821230045 Fix last covs 2018-11-22 16:19:25 +01:00
dav1901
9bcfc5cc20 Fix few covs (#12251) 2018-11-21 13:34:43 +01:00
Florian Märkl
7c0687b8fb Fix #12022 - Slow backtrace fixed by speeding up ptrace_wrap_func() ##debug 2018-11-20 01:13:30 +01:00
dav1901
8e7aea3198 Minor cleanups (#12231) 2018-11-19 22:55:34 +01:00
dav1901
c7fc809bd7 Minor dead code cleanups (#12203) 2018-11-19 13:00:53 +01:00
dav1901
558a79cae7 Fix few minor leaks and remove dead code (#12201) 2018-11-17 18:19:04 +01:00
lzutao
50320592a6 Fix #12060 and #12072 - Rewrite r_num_abs and r_num_units ##core
r_num_abs:

- Make r_num_abs static inline
- Use unsigned long long type when defining TB macro
- Use st64 instead of long long

r_num_units:

- Add len argument for buf in r_num_units
- Add PB and EB for r_num_units
- Always display one number after decimal point

  * This change simplifies the code
- Use long double type as assigning from ut64 to double cause data loss

r_num_tail_base:

- Use isxdigit (fast) instead of isHexDigit (slower)
- Rename nth to get_nth_nibble

Update all functions to use with new r_num_units:

- Remove side effect when using in other functions like cb_printf

* Trim trailing .0 when input is power of 2
2018-11-14 23:35:44 +01:00
dav1901
c1f30de193 Minor code cleanups free/R_FREE (#12157) 2018-11-14 21:23:20 +01:00
radare
a4ddb43fef
Fix ios-arm32 ##build 2018-11-13 02:12:55 +01:00
Paweł Łukasik
22ff13e069 Add dbg.verbose variable to show more info when debugging ##debug 2018-11-13 02:10:21 +01:00
David CARLIER
9b3075b137 Support DragonflyBSD build and backtrace ##port
including backtrace support. the manpage mentions FreeBSD 10 release
and DragonflyBSD has different versioning, and radare not into
their port tree yet anyway, it might safe enough.
2018-11-07 00:31:00 +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
pancake
3738a97623 Fix several asserts and crashes when loading invalid reg profiles 2018-11-05 16:55:34 +01:00
Florian Märkl
daddf534e3 Fix #11799 - Fix ptrace warnings (#11800) 2018-10-12 18:15:46 +02:00
Florian Märkl
0c0fee7b48 ptrace-wrap (#11723)
* Add ptrace-wrap
* Add r_io_ptrace* and r_debug_ptrace()
* Use wrappers instead of calling ptrace and fork directly
* Sleep while waiting in linux_debug
* Add ptrace-wrap Makefile
* Link io against ptrace-wrap with acr
* Define ptrace usages in r_userconf.h
* Conditional ptrace-wrap in acr
* Fix HAVE_PTRACE
* Some fixes for Solaris
* Fixes for FreeBSD
* More fixes for Solaris
* Style Fix
2018-10-12 12:20:18 +02:00
David CARLIER
cb63dbc232 NetBSD/OpenBSD build fix (#11772)
* NetBSD build fix

* OpenBSD has same build issue
2018-10-08 22:38:45 +02:00
Riccardo Schirone
ab4578a546
remove random warnings when compiling (#11767)
* remove random warnings when compiling

* debug_native: provide r_debug_handle_signals on windows
2018-10-08 13:21:50 +02:00
saucec0de
b06c44385b Fix debugging in FreeBSD 11.2 (#11726) 2018-10-04 02:48:15 +02:00
Riccardo Schirone
f801cad1c2 Clangification (#11660) 2018-09-26 07:48:22 -07:00
Mathieu Tarral
6148694dfa print hit breakpoint on stderr
avoid polluting stdout when using r2pipe and cmdj
2018-09-25 13:42:32 -07:00
Mathieu Tarral
08aa66a88d drj cmd: change value format to llu instead of lld (#11650) 2018-09-25 11:50:58 -07:00
pancake
41ec949204 Fix #11112 - Rename {srwx,flags,perms} to perm. (-21 LOC)
Unify R_IO, R_BIN, R_BP, .. into R_PERM_* using 1 letter syntax
2018-09-22 11:31:45 +02:00
pancake
e242a1affb Fix #11586 - Wrong reg profile for macos-x64 2018-09-20 15:14:35 +02:00
radare
01bd0d38d8
Fix #11509 - XNU debugger (#11557)
* Use PT_ATTACHEXC and PT_SIGEXC on mac to get BSD signals as XNU exceptions
2018-09-18 11:35:10 +02:00
radare
f85ebe34cb
Fix #11437 - syscall calling conventions for x86-64 (#11549)
* Fix windows x64 fastcall conventions
2018-09-17 12:46:59 +02:00
Paul I
bf29250ddd Fix #11487 (#11534) 2018-09-15 22:52:12 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Pierre Pronchery
7b1f59b682 Trivial build fixes for NetBSD (#11423)
* Fix build on NetBSD
* Only use WIFCONTINUED if available
2018-09-07 11:37:40 +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
pancake
507c678924 Fix #11352 - slow esil emulation visual panel 2018-09-03 01:48:47 +10:00