joxeankoret icon

Untitled

joxeankoret | PRO | 01/02/18 05:24:05 PM UTC | 0 ⭐ | 389 👁️ | Never ⏰ | []
text |

1.07 KB

|

None

|

0 👍

/

0 👎

CHANGES RELEVANT TO R2
----------------------
 New table:
     sql = """create table if not exists callgraph (
                id integer primary key,
                func_id integer not null references functions(id) on delete cascade,
                address text not null,
                type text not null)"""
    cur.execute(sql)
 In this table I insert all the callers and callees:
     # Save the callers and callees of the function
    callers, callees = props[len(props)-4:len(props)-2]
    sql = "insert into callgraph (func_id, address, type) values (?, ?, ?)"
    for caller in callers:
      cur.execute(sql, (func_id, caller, 'caller'))
     for callee in callees:
      cur.execute(sql, (func_id, callee, 'callee'))
 New field:
 In the table "functions" I have added a new field called:
     assembly_addrs text
 In this field I insert a JSON list of all the addresses (sorted starting always from the entry point of the function). This list is used to match one-to-one assembly instructions from the origin database to the diffing database.

Comments