12 Commits

Author SHA1 Message Date
Ahmed Mohamed Abd El-MAwgood
c474aa5a9f Fixing nasty bug in CC implementation (#5650)
That is not the kind of bug I see everyday
1- calling convention db is loaded
2- function cc types is initialized by project file, that string is only
one copy across the whole database for memory efficiency.
3- The db is reloaded due to change in arch or what ever, Old strings
are freed and new one is created with totally new address. Most cases it
just reload the same database.
4- Addresses in function cc types are not updates, they are already
freed at reloading db step

Solution implemented at db reloading step:
1- create new temp db with all possible available calling conventions and
the adresses in memory of these calling conventions
2- once db is reloaded, grab adress of cc from function, match it with
the name in the new temp db, then replace it with the constant value
from the newly loaded db
2016-08-30 15:47:04 +02:00
Akihiko Odaki
2a64686981 Fix #5634: Use 32 bit calling convention for ARM Thumb 2016-08-29 11:39:50 +02:00
pancake
6d040b2f71 Syntax indentation fixes in mach0 and cbin 2016-08-29 01:09:10 +02:00
Wladimir J. van der Laan
da564f28ee Remove unused field addr from SymName 2016-08-24 00:01:40 +02:00
pancake
0b86c2ac55 Fix memleaks and r2pipe annoyance with izz 2016-08-23 01:39:16 +02:00
Ahmed Mohamed Abd El-MAwgood
4c60a11f7e Types docs (#5557)
* Adding types documentation

* refactoring and optimizing types databases

All based on docs

* fixing r_core_types_init

Basically we needed to try all possible 7 combinatios of file name,
I am not sure if there is a way to do that automatically.
one extra thing, since this is init subroutine we should make sure
that the db is already empty, when reloading this function
(by changing env vars), it will be reloaded thus it needs a reset first.
2016-08-19 14:31:41 -04:00
pancake
ed4e5afbbb Load types and cc info on asm.arch change 2016-08-16 11:59:34 +02:00
radare
93cb2941d3 Merge pull request #5527 from crorvick/cr/fix-backward-seek
Fix backward seek
2016-08-16 00:40:59 +02:00
Chris Rorvick
9b47635f0c remove `next' param from r_core_block_read()
This was originally used to cause a seek to the next block prior to
reading such that successive calls to r_core_block_read() would progress
through memory one block at a time.  This was broken, though, by commit
452669d94113 ("more cleanup in r_core_block_read") when when it used
`next' to directly calculate the offset rather than via a seek.

Only one call site remains that attempts to read the next block instead
of the current, and this probably was not even observable due to the
"hacky fix" added in commit 3bfa61946eca ("Cleaner pvj, fix tinype load,
and honor 'ao N's").

The current of semantics of `next' appear to be broken and there is very
little dependence on it.  If the original behavior should be restored
anywhere, it would be much better to add a new function, or just do the
seek explicitly, rather than parameterizing r_core_block_read() on it.
2016-08-15 14:26:58 -05:00
Ahmed Mohamed Abd El-MAwgood
397790250c Update types databases 2016-08-15 08:50:46 +02:00
pancake
059ad1a51c Differentiate methods from functions in objc parser 2016-08-09 01:40:12 +02:00
pancake
0777232b1b Rename core/bin.c as cbin.c to avoid confussion with bin/bin.c 2016-08-08 10:45:49 +02:00