Skip to content

Commit

Permalink
Remove some unused members (#16164)
Browse files Browse the repository at this point in the history
  • Loading branch information
thestr4ng3r authored Mar 9, 2020
1 parent 2e9607d commit 1271d65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
8 changes: 1 addition & 7 deletions libr/anal/p/anal_java.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ static int java_switch_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data,

ut32 default_loc = (ut32) (UINT (data, pos)), cur_case = 0;
op->switch_op = r_anal_switch_op_new (addr, min_val, max_val, default_loc);
RAnalCaseOp *caseop = NULL;
pos += 12;
if (max_val > min_val && ((max_val - min_val)<(UT16_MAX/4))) {
//caseop = r_anal_switch_op_add_case(op->switch_op, addr+default_loc, -1, addr+offset);
Expand All @@ -66,12 +65,7 @@ static int java_switch_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data,
break;
}
int offset = (int)(ut32)(R_BIN_JAVA_UINT (data, pos));
caseop = r_anal_switch_op_add_case (op->switch_op,
addr + pos, cur_case + min_val, addr + offset);
if (caseop) {
caseop->bb_ref_to = addr+offset;
caseop->bb_ref_from = addr; // TODO figure this one out
}
r_anal_switch_op_add_case (op->switch_op, addr + pos, cur_case + min_val, addr + offset);
}
} else {
eprintf ("Invalid switch boundaries at 0x%"PFMT64x"\n", addr);
Expand Down
3 changes: 0 additions & 3 deletions libr/core/cmd_anal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2189,9 +2189,6 @@ static bool anal_fcn_list_bb(RCore *core, const char *input, bool one) {
pj_kn (pj, "addr", case_op->addr);
pj_kn (pj, "jump", case_op->jump);
pj_kn (pj, "value", case_op->value);
pj_kn (pj, "cond", case_op->cond);
pj_kn (pj, "bb_ref_to", case_op->bb_ref_to);
pj_kn (pj, "bb_ref_from", case_op->bb_ref_from);
pj_end (pj);
}
}
Expand Down
10 changes: 2 additions & 8 deletions libr/include/r_anal.h
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,6 @@ typedef struct r_anal_case_obj_t {
ut64 addr;
ut64 jump;
ut64 value;
ut32 cond; // TODO: treat like a regular condition
ut64 bb_ref_to;
ut64 bb_ref_from;
RAnalBlock *jumpbb;
} RAnalCaseOp;

typedef struct r_anal_switch_obj_t {
Expand Down Expand Up @@ -885,12 +881,10 @@ typedef struct r_anal_bb_t {
RAnalDiff *diff;
RAnalCond *cond;
RAnalSwitchOp *switch_op;
// offsets of instructions in this block
ut16 *op_pos;
// size of the op_pos array
ut16 *op_pos; // offsets of instructions in this block, count is ninstr - 1 (first is always 0)
ut8 *op_bytes;
ut8 *parent_reg_arena;
int op_pos_size;
int op_pos_size; // size of the op_pos array
int ninstr;
int stackptr;
int parent_stackptr;
Expand Down

0 comments on commit 1271d65

Please # to comment.