Commit Graph

1453 Commits

Author SHA1 Message Date
Rene Laemmert
261675ef3b Make old gcc happy again (#8128) 2017-08-04 19:00:02 +02:00
xarkes
3da3958db8 Windbg FIX #7660 + typos (#8126) 2017-08-04 17:49:41 +02:00
xarkes
3d681b0fe5 Renamed windbg plugin (#8117) 2017-08-03 14:58:39 +02:00
pancake
97a38e6eea More tweaks for the jemalloc support 2017-08-03 13:56:45 +02:00
pancake
e913c770f5 Fix build 2017-08-03 13:27:11 +02:00
Srimanta Barua
74c80f9e09 min-checks on gdb packet size (#8106) 2017-08-02 14:14:11 +02:00
pancake
bf8651454b Avoid another divbyzero in gdb code 2017-08-02 13:28:07 +02:00
Srimanta Barua
7b5de5cb51 fix divide by zero (#8100) 2017-08-02 12:13:28 +02:00
Srimanta Barua
f6f5199ef6 let gdbserver select thread (#8101) 2017-08-02 12:10:43 +02:00
Srimanta Barua
9f9192232a Fix a lot of incorrect 'garbage at end of packet' messages (#8080) 2017-08-01 11:40:33 +02:00
Srimanta Barua
d93977358d Small gdb fixes, and added alternate way to get baddr (#8055)
* check if 'g' is supported before switching to reading regs using '?'
* stabilize gdbserver a bit more
* added ability to get baddr even if we can't read memory map (if qOffsets packet is supported)
2017-07-29 17:58:20 +02:00
xarkes
221b312046 Meson builds generates sdb files (+build clean) (#8035) 2017-07-26 23:15:41 +02:00
Srimanta Barua
277771156c fix gdb covs (#8036) 2017-07-26 20:20:07 +02:00
Srimanta Barua
058d5fe7b0 More fixes for when process dies (#8032) 2017-07-26 15:50:55 +02:00
Srimanta Barua
d05f865f77 read registers from lldb (#8004) 2017-07-25 16:28:58 +08:00
pancake
fb4294c36b Fix #8000 - null deref in pkcs7 2017-07-24 15:32:05 +02:00
pancake
76448886cb Looks like dex needs lit too, and force n in cspatch 2017-07-24 13:38:40 +02:00
Srimanta Barua
6f25437342 Handling of more stop reasons, cleanly close gdb connection (#7998) 2017-07-24 12:39:53 +02:00
Srimanta Barua
e4cce06671 Added reading of executed file name to gdbserver 2017-07-21 20:06:41 +02:00
Guillaume Valadon
ea8adc48da Use void in prototypes (#7974) 2017-07-20 14:50:13 +02:00
Srimanta Barua
6f2eb2843b Added command to get/set packet size for gdb io system (#7961)
* Added pktsz to io system
* Add env var to control gdb packet size
2017-07-20 11:57:29 +02:00
pancake
2829d9e398 Detect kotlin in java classes 2017-07-19 13:55:05 +02:00
pancake
770f3e752f Fix #7932 - Support relative addresses in java assembler 2017-07-17 12:17:53 +02:00
Srimanta Barua
8c6a05dd58 Add reporting of debug info (#7941) 2017-07-17 11:39:34 +02:00
Srimanta Barua
4916b318d8 fix memleak in gdbserver (#7940) 2017-07-17 09:30:48 +02:00
Srimanta Barua
7858bb970d Un-hardcode reporting of stop reason, and add read/write of single reg to gdbserver (#7938)
* Better reporting of stop reason by gdbserver

* Added read/write of single reg
2017-07-17 08:51:30 +02:00
Srimanta Barua
b59276938e Added debugging of protocol messages in gdbserver (#7931) 2017-07-16 12:01:17 +02:00
pancake
6e1f9c981e Fix latest covs 2017-07-14 17:36:21 +02:00
Srimanta Barua
066e85554e gdb get exec file name, and threads list (#7908)
* Thread list

* Added check if thread is dead

* Added exec_file command to io system
2017-07-13 00:33:53 +02:00
pancake
1b6cfb68bd Fix some memleaks, warnings and null derefs pointed out by clang analyzer 2017-07-10 11:20:03 +02:00
Srimanta Barua
47a081c5df cleanup redundant gdbr_send_command (#7890) 2017-07-09 20:55:15 +02:00
Srimanta Barua
9e437f861b Added qRcmd monitor commands to io_gdb (#7877)
* Added qRcmd to io_gdb

* Printing reply to pkt and prompting for ack if required. Also adhering to r2 coding conventions
2017-07-08 10:29:11 +02:00
pancake
39e63acfe0 Fix last COVs (double free and memleak in grub code) 2017-07-05 13:13:53 +02:00
Sven Steinbauer
b61e278c01 Conditionally remove sh for iOS 2017-07-05 13:01:02 +02:00
j123123
f3f71b195b Add NULL check at shlr/sdb/src/json/api.c (#7859) 2017-07-05 06:52:56 +02:00
Srimanta Barua
6d5585fc68 Fix for incorrect pc after breakpoint, in x86 gdb (using signal 5) 2017-07-04 19:44:09 +02:00
pancake
c57997e76e Fix r2_hbo_grub_memmove ext2 crash 2017-07-04 19:38:33 +02:00
pancake
8c3035acc2 Fix ios-sdk builds 2017-07-04 19:16:24 +02:00
Srimanta Barua
d453d7430f pid/tid specific continue with signal for gdb (#7848)
* Corrected tid syntax, added pid/thread-specific continue
* Added continue with sig
2017-07-02 19:09:04 +02:00
Srimanta Barua
2424f962ce Check which vcont commands and use them if they are (#7847) 2017-07-01 21:16:48 +02:00
Srimanta Barua
ff7b6c1df2 Optimized gdbserver mem read, and added gdbserver mem write 2017-06-29 17:17:22 +02:00
pancake
48fd6485bc Update sdb 2017-06-27 23:29:56 +02:00
pancake
fc41044e93 Iterate over all DT_FLAGS, and update capstone 2017-06-27 18:16:37 +02:00
SrimantaBarua
59a5c07d8f invalidate reg cache 2017-06-26 11:39:30 +02:00
SrimantaBarua
5938053422 gdb reg caching 2017-06-26 11:39:30 +02:00
pancake
2320b29e8f Fix memleak and invalid format string for gdb 2017-06-24 20:49:59 +02:00
pancake
87fe418092 Fix #7706 - Enhance the Java assembler 2017-06-24 19:58:48 +02:00
SrimantaBarua
9651b6a997 Attach pid 2017-06-23 11:50:26 +08:00
xarkes
ca5a68ebb3 Adding files to meson + windows env refactor 2017-06-20 18:03:30 +08:00
Srimanta Barua
c5eb7ef058 Support for dm commands in gdb (#7770)
* Added reading of memory maps from /proc/pid/maps
* Don't enable extended mode by default, only do so when attaching to process. Otherwise can't quit gdbserver
* Better gdb file reading
2017-06-19 19:43:55 +02:00
xarkes
c1a565e381 Windows environment fix 2017-06-19 15:51:07 +08:00
Adrian Pistol
3381ae974e Fixes to #7759 which I failed to push in. (#7766) 2017-06-18 02:45:37 +02:00
pancake
473c1ba28f honor-unsigned capstone patch has been merged upstream 2017-06-18 02:00:22 +02:00
Sajjad Pourali
efe373de18 add #include <stdlib.h> for free func (#7762) 2017-06-18 01:01:11 +02:00
Adrian Pistol
d8f5cdb11c io_gdb: gdb://host:port/pid support; Add gdbr_{attach,detach,detach_pid,kill_pid} to gdbclient. (#7759)
Try to activate extended mode; Attach helper function requires extended mode to actually do something.

Tries to attach to the given pid in io_gdb.
This isn't proper, but it's better than running into the two-pid-vals-no-sync issue.
2017-06-18 00:59:13 +02:00
Srimanta Barua
ba1bba5401 Speed up gdb considerably if gdbserver supports no-ack mode (#7763) 2017-06-18 00:58:38 +02:00
Srimanta Barua
040ea8cafd Bug-fixes for read/write mem (#7758) 2017-06-17 03:02:05 +02:00
xarkes
675fa9b9ff Windows fixes and fix graph tests 2017-06-16 21:18:50 +02:00
pancake
0b4eb1740c Update the capstone-x86-unsigned patch 2017-06-15 10:07:20 +02:00
Srimanta Barua
fe6372339d Corrected gdbserver register-setting 2017-06-14 15:38:10 +02:00
Srimanta Barua
e5e860a3ea Added loading of offsets 2017-06-14 15:38:10 +02:00
Zohn_Z
76f0ce7c9f Several fixes for ragg2
* fixed some bugs in rcc_pushstr in egg_lang.c
* fix bugs when strings within ',' and strating with non-zero char
* fix some error fixes
* fix the segment fault when calling functions with arguments
* add support for directory in include
* make some little changes
* add support for include and alias
* add some debug eprintf
* fix wrong label bugs in "while" syntax and rename some label
* fix odd syntax in "while" and "if"
* rename the labels
* add support for if\-else
* make some little changes for pretty print
* take a snapshot before writing confusing mathop
* finish mathop
* delete some unnecessary code in if-else frame to bypass test
* reindent all the thing
2017-06-14 15:35:29 +02:00
xarkes
46deac0dde Fixing appveyor build (#7735) 2017-06-14 13:45:48 +02:00
pancake
6c37a9aa10 Add serial support in RSocket for gdb:///dev/ttyUSB0:9600 2017-06-12 22:25:58 +02:00
pancake
966b6475c4 Fix warnings in rcons and update www-m 2017-06-12 17:20:34 +02:00
pancake
bda42cb592 Update the www-t 2017-06-12 15:33:21 +02:00
pancake
54150fa3db Fix last covs 2017-06-12 11:28:54 +02:00
pancake
65000a7fd9 Fix #7723 - crash in ext2 GRUB code because of variable size array in stack 2017-06-12 09:57:30 +02:00
Srimanta Barua
d81f369fa1 Fix gdb client packet size (#7703)
* Fixes for packet too long
* Proper escaping in packets and run-length encoding
* Removed old cache code
* Removed currently unnecessary code from client initialization
* Preparation for customized packet sizes
* Better packet-size configuration
* Minimum packet size (for AVR)
* mem_write too
* Corrections to packing code
* Was overcompensating for AVR. (pkt_sz = 16 => read_mem_len = 8)
2017-06-11 02:12:44 +02:00
pancake
aad2d70552 Fix some warnings 2017-06-09 03:22:18 -11:00
Sajjad Pourali
028099f185 fix an unimportant warning (gdbserver/core.c) (#7695) 2017-06-07 16:27:28 +02:00
pancake
608d10dc4b Fix grub warnings 2017-06-06 18:46:21 +02:00
pancake
90480d325b Fix last covs 2017-06-05 13:23:39 +02:00
pancake
796dd28aaa Fix ext2 buffer overflow in r2_sbu_grub_memmove 2017-06-05 12:38:39 +02:00
Srimanta Barua
ad764839b2 Initial breakpoints, step, and continue for gdbserver. Plus *started* talking to GDB (#7679)
* GDB doesn't crash when connecting to us anymore

* Added initial support for breakpoints, step, continue to gdbserver
2017-06-04 22:22:01 +02:00
Sajjad Pourali
347e72a8ad Remove Unused variable (bt) in tccgen.c (#7668) 2017-06-03 11:55:32 +02:00
pancake
b15b3d71fb Return early on grub-ext2 error 2017-06-01 19:17:15 +02:00
Francesco Tamagni
1c6ee8dd3a Honor cpu on anal_mips_cs and add/fix some mips64 instruction (#7643)
* Honor cpu on anal_mips_cs and add/fix some mips64 instruction
* Add mips2 capstone patch
* mips: add v2 cpu, remove 64v2, mips32/64 is default
2017-06-01 18:18:15 +02:00
Anton Kochkov
f4a2b07139 TCC - Saving types across sessions and add Arch/OS specific defines 2017-06-01 16:57:00 +02:00
pancake
9a21711c5d Fix #7650 - Division by zero in Ext2 code from Grub 2017-06-01 13:14:11 +02:00
SkUaTeR
dc7914644e Meson improvements 2017-05-31 13:38:47 +02:00
pancake
91daa516eb Fix build for android-mips 2017-05-30 19:39:22 +02:00
pancake
e16e42568b Release 1.5.0 - Codename RubyCup 2017-05-30 18:46:34 +02:00
SkUaTeR
0596c1c08e Meson shlr libs 2017-05-30 18:38:19 +02:00
pancake
75a71affe4 Update capstone from git 2017-05-29 21:51:48 +02:00
pancake
d6642b10dd Fix last covs 2017-05-29 21:50:57 +02:00
Srimanta Barua
0da8862a83 Add read reg/mem to gdbserver (#7625)
* bug fixes in client, and adding kill signal for server without multiprocess support
* commented out currently unnecessary packets sent by client
* Corrections to client kill signal code
* More functionality for gdbserver. Read regs and memory
2017-05-29 21:36:42 +02:00
pancake
5a90a375db Update cdb.h to make skuater happy 2017-05-29 21:23:19 +02:00
pancake
4ee963ee98 Fix some clang-analyzer issues 2017-05-29 15:01:11 +02:00
Sajjad Pourali
46ba923963 Fix Access of Unallocated Memory spp.h (#7623) 2017-05-29 14:17:46 +02:00
pancake
1b854be75e Add file.lastpath to fix regression in projects using malloc:// 2017-05-29 14:02:50 +02:00
pancake
5bf37c2bf7 Update sdb from git to make msvc happy 2017-05-29 12:44:04 +02:00
pancake
40b87865a8 Fix listing methods of classes in Java bins 2017-05-29 01:18:04 +02:00
pancake
6758e3753d Remove configure-plugins dependency for the make meson 2017-05-26 02:43:53 +02:00
radare
49332a26ba Fix capstone x86 disassembler showing kernel addresses immediates 2017-05-25 17:10:23 +02:00
Srimanta Barua
06aae3080e Added kill signal for gdb client 2017-05-25 15:41:07 +02:00
pancake
582863189d Update sdb from git 2017-05-25 15:14:23 +02:00
pancake
3a262ba5d7 Fix file containing (null) issue in dwarf 2017-05-25 15:14:18 +02:00
pancake
9b44b6bb23 Fixes for the -lr_socket issue 2017-05-24 02:00:56 +02:00
pancake
9e19118eff Fix latest covs 2017-05-23 11:24:04 +02:00
Srimanta Barua
d3958f00e4 Initial stub for gdbserver support
* Renaming functions, reorganizing code, adding temporary hack for closing gdbserver
2017-05-22 19:37:48 +02:00
Raúl Peñacoba
435ecdef66 class.c: add missing free to avoid a memleak (#7549) 2017-05-20 23:04:26 +02:00
pancake
632e98eebb Update capstone from next 2017-05-20 12:30:18 +02:00
SkUaTeR
66628139d1 Add changes to compile more plugins with MSVC 2017-05-17 23:42:22 +02:00
SkUaTeR
7d7c9cb5a7 More fixes in shlr for MSVC 2017-05-16 20:14:39 +02:00
SkUaTeR
28f785daa0 MSVC compile correctly (WIP) 2017-05-13 00:42:00 +02:00
SkUaTeR
1b5a746786 add more fixes to msvc build (#7468)
* add more fixes to msvc build

* more fixes
2017-05-10 22:12:49 +02:00
pancake
1c0638c959 Update capstone from next after confirming test3 was ok 2017-05-10 19:51:09 +02:00
pancake
ad54e9ddf1 Refix mingw32 build 2017-05-10 00:34:05 +02:00
SkUaTeR
beb80cfc16 Fixes for MSVC 2017-05-09 23:53:20 +02:00
pancake
69b4c61b8a Fix mingw32 build 2017-05-09 22:57:47 +02:00
xarkes
926f024909 Improved MSVC support (WIP) 2017-05-09 14:25:57 +02:00
pancake
c69b39798a Fix uninitialization issues in capstone 2017-05-09 14:18:17 +02:00
pancake
098318211f Fix clone branch issue in capstone.sh when selecting non-next 2017-05-08 00:35:27 +02:00
Srimanta Barua
a4d4002ce0 Reorganized shlr/gdb in preparation for gdbserver 2017-05-07 11:53:17 +02:00
pancake
c9995d034c Upgrade capstone-next 2017-05-07 11:47:23 +02:00
pancake
ccc93739ff Update capstone from git 2017-05-04 23:30:28 +02:00
pancake
60f9667654 Remove support for bjam build system
- Delete all Jamroot files
2017-05-02 05:48:40 +02:00
pancake
8edc242324 Remove judy and libzip unused code 2017-05-02 05:34:05 +02:00
pancake
fa671b9a16 Initial support for the Meson build system
- Integrated with current ACR
- Fix some stale fails got removed
2017-05-02 05:05:36 +02:00
pancake
96cae18de6 Update to sdb-0.12 fixing some mem issues 2017-04-28 14:48:01 +02:00
pancake
96a6bd7d8f Update SDB from git fixing several vulns 2017-04-28 02:04:18 +02:00
pancake
0551d780af Update capstone from git and remove two undefined behaviour patches 2017-04-26 11:24:51 +02:00
Michael Scherer
0e69dfbb56 Do not fail if vFile:fstat is not implemented on the remote side
See handle_vFile in ./gdb/gdbserver/hostio.c in gdb git, and the documentation
https://sourceware.org/gdb/onlinedocs/gdb/Host-I_002fO-Packets.html#Host-I_002fO-Packets

         An empty response indicates that this operation is not recognized.

vFile:fstat is not supported by gdb 7.6.1, shipped on RHEL 7, for example.
2017-04-21 10:08:18 +02:00
pancake
d692bfb37a Fix undefined behaviour issue in capstone-x86 2017-04-20 16:46:02 +02:00
pancake
f52b27e2ec Update spp to reduce global symbols 2017-04-20 14:12:36 +02:00
pancake
f0d9c9bd5a Fix capstone patch and update spp to fix an underflow 2017-04-18 01:27:36 +02:00
pancake
985e164d1c Fix underflow access in capstone tms320c64x disassembler 2017-04-18 01:21:47 +02:00
pancake
16c73edfa5 Fix 3 null derefs and two overflows in java 2017-04-18 01:16:07 +02:00
pancake
ffe0da0fa1 Fix many more clang-analyzer null derefs and overflows 2017-04-18 00:38:24 +02:00
pancake
35fd1894f3 Fix oobread in libzip 2017-04-18 00:36:18 +02:00
pancake
b22656289e Fix undefined variable bug in capstone
Ref https://github.com/aquynh/capstone/pull/893
2017-04-17 23:41:14 +02:00
pancake
54f6efddde Upgrade capstone-next to get tms320c64x support and more fixes for SFC 2017-04-17 23:37:04 +02:00
pancake
a66cc10d46 Fix a huge list of null derefs from clang-analyzer 2017-04-17 22:02:04 +02:00
pancake
e641318973 Fix a bunch of bugs reported by clang-analyzer 2017-04-17 19:59:14 +02:00
pancake
08d824824e Fix build 2017-04-15 13:29:27 +02:00
pancake
fd8c64f7bb Update capstone from git 2017-04-15 13:08:47 +02:00
pancake
47d90a9842 strdup g->data in qStatus 2017-04-12 03:51:45 +02:00
pancake
3081163a9e Fix two java crashes 2017-04-11 19:18:14 +02:00
pancake
65776308c9 RAR disassembler and bin plugin moved to radare2-extras 2017-04-11 13:53:58 +02:00
pancake
c1592008a0 Fix #7231 - cant connect and read memory with gdb:// 2017-04-10 17:32:07 +02:00
pancake
a8106859a5 Fix crash in gdb:// 2017-04-10 17:00:26 +02:00
pancake
45889c7307 Implement Pn+, and fix bugs (thx clang-analyzer)
- Update SDB (use memmove)
- Fix garbage read in capstone x86 and lm32
- Add UT16/32/64_ALIGN macro for proper (ut16*) allocations
- Add Pn+ command
2017-04-10 00:49:02 +02:00
Raúl Peñacoba
1450deba84 asm: Add missing free() (#7201) 2017-04-02 22:58:51 +02:00
alvarofe
1d8ffe7ee6 Bump latest sdb fixing some issues 2017-04-02 12:14:49 +02:00
pancake
a6fee9b791 Update www-m from git 2017-03-30 11:42:00 +02:00
alvarofe
5c820132f6 Bump sdb e24f06002d15209f561d0d3234250a177613e872 2017-03-27 21:32:55 +02:00
Srimanta Barua
e7909f008c Improve gdb remote debugging (#7027)
* Added bitflag structure for qSupported

* Get if process is attached/created and get file name

* Set process/thread id for subsequent 'g' commands

* Use strbuf instead of big buffer,started work on fstat

* Fix indent, brackets. Use bool instead of bitflags

* Minor fixes
2017-03-20 15:26:18 +01:00
xarkes
f5c67d8bdf Added custom tab to sdb json_indent function (#7050) 2017-03-19 21:34:30 +01:00
pancake
42f9d62a61 Update /m and /p to sync with |H 2017-03-19 02:29:55 +01:00