mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-01 02:38:10 +00:00
* Some sorting of TODOs
* Disable asm.x86.nasm assembly on non-intel syntax * rpathstrip after install (should fix debian issue)
This commit is contained in:
parent
1881f9803a
commit
9fcdcce2a7
31
TODO
31
TODO
@ -7,8 +7,7 @@
|
||||
|
||||
<{include libr/TODO}>
|
||||
|
||||
* Breakpoints are ignored in some situations.. we must check
|
||||
for them and toggle a .dbg variable to break
|
||||
See libr/*/TODO FMI
|
||||
|
||||
BUGS
|
||||
====
|
||||
@ -16,36 +15,30 @@ BUGS
|
||||
* console grep
|
||||
* x@esp&&x@eip # BUG
|
||||
|
||||
* diff code analysis
|
||||
- diff two programs
|
||||
1st level:
|
||||
- check all functions EQUAL, DIFFERENT, REMOVED, ADDED
|
||||
- check all symbols
|
||||
- check all imports
|
||||
- check all strings
|
||||
2nd level:
|
||||
- basic block level diffing (output in graph mode)
|
||||
|
||||
* stack analysis
|
||||
* code analysis with r_parse
|
||||
|
||||
* Write manpages
|
||||
|
||||
* ALL threads must be stopped when a breakpoint is handled..
|
||||
-- how to do this?
|
||||
* Finish to write manpages
|
||||
|
||||
* Move 'r_syscall_t' stuff into r_debug
|
||||
- Sync r_core
|
||||
|
||||
* regio not implemented
|
||||
- floating point registers
|
||||
- mmx/xmm
|
||||
- drX control
|
||||
* FileDescriptors
|
||||
- df -- copy from !fd in r1
|
||||
|
||||
* Implement dump+restore as macros
|
||||
(dump,)
|
||||
|
||||
* Implement process launcher wrapper
|
||||
- opens xterm and redirects stdin/stdout/stderr
|
||||
- Allows to change chroot
|
||||
- Allows to setup chroot
|
||||
- Define uid/gid
|
||||
|
||||
* BUG:
|
||||
rasm2 -s att -a x86.nasm 'push 0x1e(%esp)'
|
||||
|
||||
* Added lib_handle stub in r_lib, so we can add plugin support to
|
||||
any library by using just a macro
|
||||
|
||||
|
@ -103,6 +103,8 @@ install: install-includes install-pkgconfig install-bins install-test-bins
|
||||
${INSTALL_DATA} $$a ${PFX}/lib/radare2 ; done
|
||||
${INSTALL_DATA} lang/p/radare.* ${PFX}/lib/radare2
|
||||
echo "lang/p/radare.* ${PFX}/lib/radare2"
|
||||
# strip rpath from ALL bins
|
||||
./rpathstrip.sh ${PFX}
|
||||
|
||||
deinstall uninstall:
|
||||
# libraries
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* radare - LGPL - Copyright 2009 pancake<nopcode.org> */
|
||||
/* radare - LGPL - Copyright 2009-2010 pancake<nopcode.org> */
|
||||
|
||||
#include <r_types.h>
|
||||
#include <r_util.h>
|
||||
@ -8,20 +8,25 @@
|
||||
#include "fastcall_x86.h"
|
||||
|
||||
#if 0
|
||||
static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, ut8 *buf, ut64 len)
|
||||
{
|
||||
static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, ut8 *buf, ut64 len) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf) {
|
||||
int len = 0;
|
||||
static int assemble(RAsm *a, RAsmAop *aop, const char *buf) {
|
||||
char cmd[R_ASM_BUFSIZE];
|
||||
ut8 *out;
|
||||
sprintf(cmd, "nasm /dev/stdin -o /dev/stdout <<__\nBITS %i\nORG 0x%llx\n%s\n__", a->bits, a->pc, buf);
|
||||
out = (ut8 *)r_sys_cmd_str(cmd, "", &len);
|
||||
int len = 0;
|
||||
if (a->syntax != R_ASM_SYNTAX_INTEL) {
|
||||
eprintf ("asm.x86.nasm does not support non-intel syntax\n");
|
||||
return -1;
|
||||
}
|
||||
snprintf (cmd, sizeof (cmd),
|
||||
"nasm /dev/stdin -o /dev/stdout <<__\n"
|
||||
"BITS %i\nORG 0x%llx\n%s\n__", a->bits, a->pc, buf);
|
||||
out = (ut8 *)r_sys_cmd_str (cmd, "", &len);
|
||||
if (out) {
|
||||
memcpy(aop->buf, out, len<=R_ASM_BUFSIZE?len:R_ASM_BUFSIZE);
|
||||
free(out);
|
||||
memcpy (aop->buf, out, len<=R_ASM_BUFSIZE?len:R_ASM_BUFSIZE);
|
||||
free (out);
|
||||
}
|
||||
aop->inst_len = len;
|
||||
return len;
|
||||
@ -36,7 +41,7 @@ struct r_asm_handle_t r_asm_plugin_x86_nasm = {
|
||||
.fini = NULL,
|
||||
.disassemble = NULL, /*&disassemble,*/
|
||||
.assemble = &assemble,
|
||||
.fastcall = fastcall,
|
||||
.fastcall = &fastcall,
|
||||
};
|
||||
|
||||
#ifndef CORELIB
|
||||
@ -50,11 +55,11 @@ struct r_lib_struct_t radare_plugin = {
|
||||
main() {
|
||||
struct r_asm_fastcall_t *f;
|
||||
//f = r_asm_plugin_x86_nasm.fastcall;
|
||||
printf("fastcall=%p\n", *r_asm_plugin_x86_nasm.fastcall);
|
||||
printf("fastcall=%p\n", fastcall);
|
||||
printf ("fastcall=%p\n", *r_asm_plugin_x86_nasm.fastcall);
|
||||
printf ("fastcall=%p\n", fastcall);
|
||||
f = fastcall;//r_asm_plugin_x86_nasm.fastcall;
|
||||
printf("f=%p (%s)\n", f, f);
|
||||
printf("f[0]=%p (%s)\n", f[0], f[0]);
|
||||
printf("f[3].arg[1]=%s\n", f[3].arg[1]);
|
||||
printf ("f=%p (%s)\n", f, f);
|
||||
printf ("f[0]=%p (%s)\n", f[0], f[0]);
|
||||
printf ("f[3].arg[1]=%s\n", f[3].arg[1]);
|
||||
}
|
||||
#endif
|
||||
|
14
libr/debug/TODO
Normal file
14
libr/debug/TODO
Normal file
@ -0,0 +1,14 @@
|
||||
Debugger TODO
|
||||
=============
|
||||
* Breakpoints are ignored in some situations.. we must check
|
||||
for them and toggle a .dbg variable to break
|
||||
* ALL threads must be stopped when a breakpoint is handled..
|
||||
-- how to do this?
|
||||
* regio not implemented
|
||||
- floating point registers
|
||||
- mmx/xmm
|
||||
- drX control
|
||||
* FileDescriptors
|
||||
- df -- copy from !fd in r1
|
||||
* Implement dump+restore as macros
|
||||
(dump,)
|
35
libr/rpathstrip.sh
Executable file
35
libr/rpathstrip.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
# UGLY HACK to remove all rpaths and make r2 work without
|
||||
# installation.. rpath should be removed at some point..
|
||||
|
||||
BIN=bin/t/rpathdel
|
||||
BINS="rasm2 radare2 rabin2 radiff2 rahash2 rax2 rafind2 rasign2"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: ./rpathstrip.sh /usr"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -x "${BIN}" ]; then
|
||||
echo "Not stripping rpaths"
|
||||
exit 0
|
||||
fi
|
||||
echo "Stripping rpath from installed binaries..."
|
||||
|
||||
for a in ${BINS}; do
|
||||
${BIN} $1/bin/$a $1/bin/$a
|
||||
done
|
||||
|
||||
for a in ${LIBS}; do
|
||||
${BIN} $1/lib/$a $1/lib/$a
|
||||
done
|
||||
|
||||
for a in `cd $1/lib/radare2 ; ls`; do
|
||||
${BIN} $1/lib/radare2/$a $1/lib/radare2/$a
|
||||
done
|
||||
|
||||
for a in `cd $1/lib/radare2/test ; ls`; do
|
||||
${BIN} $1/lib/radare2/test/$a $1/lib/radare2/test/$a
|
||||
done
|
||||
|
||||
exit 0
|
Loading…
x
Reference in New Issue
Block a user