Initialize stack register in 'aeim'

This commit is contained in:
pancake 2015-10-01 12:04:58 +02:00
parent c381a6cdb8
commit 876a4052be
4 changed files with 6 additions and 6 deletions

View File

@ -1534,6 +1534,7 @@ static void cmd_esil_mem (RCore *core, const char *input) {
char name[128];
RCoreFile *cf;
RFlagItem *fi;
const char *sp;
char uri[32];
char nomalloc[256];
char *p;
@ -1582,7 +1583,8 @@ static void cmd_esil_mem (RCore *core, const char *input) {
// PFMT64x"`", stack_size, stack_addr);
//r_core_cmdf (core, "f stack=0x%08"PFMT64x, stack_addr);
//r_core_cmdf (core, "dr %s=0x%08"PFMT64x, sp, stack_ptr);
//r_debug_reg_set (core->dbg, sp, stack_ptr);
sp = r_reg_get_name (core->dbg->reg, R_REG_NAME_SP);
r_debug_reg_set (core->dbg, sp, addr + (size/2));
//r_core_cmdf (core, "ar %s=0x%08"PFMT64x, sp, stack_ptr);
//r_core_cmdf (core, "f %s=%s", sp, sp);
r_core_seek (core, curoff, 0);

View File

@ -199,7 +199,6 @@ static void reopen_in_debug(RCore *core, const char *args) {
RCoreFile *ofile = core->file;
RBinFile *bf = NULL;
char *binpath = NULL;
char *ofilepath = NULL;
if (!ofile || !ofile->desc || !ofile->desc->uri || !ofile->desc->fd) {
eprintf ("No file open?\n");
return;

View File

@ -40,8 +40,7 @@ R_API int r_debug_reg_sync(RDebug *dbg, int type, int write) {
eprintf ("r_debug_reg: error reading registers\n");
free (buf);
return false;
} else
r_reg_set_bytes (dbg->reg, i, buf, R_MIN(size, bufsize));
} else r_reg_set_bytes (dbg->reg, i, buf, R_MIN(size, bufsize));
free (buf);
}

View File

@ -8,7 +8,7 @@ if [ -d capstone -a ! -d capstone/.git ]; then
echo "[capstone] release with no git?"
else
if [ ! -d capstone ]; then
git clone "${CS_URL}" capstone
git clone "${CS_URL}" capstone || exit 1
fi
cd capstone || exit 1
if [ -n "${CS_REV}" ]; then
@ -25,7 +25,7 @@ else
echo "TIP ${CS_TIP}"
git reset --hard @^^^
git checkout "${CS_BRA}"
git checkout "${CS_BRA}" || exit 1
git pull
if [ -n "${CS_TIP}" ]; then
git reset --hard "${CS_TIP}"