These days I have been developing in assembly for work on a chinese
mips cpu called "loongson2f". It is a very promising CPU, soon will
be comercialized in europe and plans to comit with x86 architecture
for desktops, but the cpu is enought cold to be used on phones,
mediacenters or whatever.
The lack of already prepared tools for developing on it (only binutils
from cvs supports it) and gdb is far more unusable than on intel.
One funny characteristic is taht there is no 'single-step' operation,
but i have managed to emulateit using codeanalysis and breakpoints
to avoid damanging the pipeline while running.
The cfg.addrmod on mips is useful for finding unaligned jumps while it
loads instructions per blocks aligned to 32.
After some zen I finish the basic debugger functionalities and current
version is quite usable. The code analysis module needs some more love
because i want to add a pseudo virtual machine to analize calls indexed
by registers or things like that.
THis is the list of things done these nights:
- proper fetch of 32 and 64 registers
- correct disassembler for all loognson2f opcodes
- fix pipeline address marks to 32
- i have discovered that gcc doesnt takes care
about the pipeline to align jumps. We can take advance of this
by optimizing some loops aligning the code with nops.
- state-of-the-art step implementation using breakpoints
- uses the code analysis module to autodetect nops, jumps and calls
and put breakpoints on all possible addresses.
- a radare script to dump all symbols of a program or library
- will be used to embed symbols of other libraries or static
programs. Can be used to create shared libraries from diablo
binaries (for example).
- merge of the old code graph analysis module (this works better :P)
Have fun :)
--pancake
_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org