Home | Trees | Indices | Help |
---|
|
1 #!/usr/bin/python 2 ######################################################################## 3 # Copyright (c) 2012 4 # Daniel Plohmann <daniel.plohmann<at>gmail<dot>com> 5 # Alexander Hanel <alexander.hanel<at>gmail<dot>com> 6 # All rights reserved. 7 ######################################################################## 8 # 9 # This file is part of IDAscope 10 # 11 # IDAscope is free software: you can redistribute it and/or modify it 12 # under the terms of the GNU General Public License as published by 13 # the Free Software Foundation, either version 3 of the License, or 14 # (at your option) any later version. 15 # 16 # This program is distributed in the hope that it will be useful, but 17 # WITHOUT ANY WARRANTY; without even the implied warranty of 18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 # General Public License for more details. 20 # 21 # You should have received a copy of the GNU General Public License 22 # along with this program. If not, see 23 # <http://www.gnu.org/licenses/>. 24 # 25 ######################################################################## 26 27 # operand types defined by IDA 28 # o_void = 0 # No Operand 29 # o_reg = 1 # General Register (al,ax,es,ds...) reg 30 # o_mem = 2 # Direct Memory Reference (DATA) addr 31 # o_phrase = 3 # Memory Ref [Base Reg + Index Reg] phrase 32 # o_displ = 4 # Memory Reg [Base Reg + Index Reg + Displacement] phrase+addr 33 # o_imm = 5 # Immediate Value value 34 # o_far = 6 # Immediate Far Address (CODE) addr 35 # o_near = 7 # Immediate Near Address (CODE) addr 36 3739 """ 40 This class is an information container for parameters that are handed over during function calls. 41 """ 428044 self.parameter_type = "" 45 self.parameter_name = "" 46 self.push_address = -1 47 self.ida_operand_type = -1 48 self.ida_operand_value = -1 49 self.value = -1 50 self.valid = True 51 pass5254 """ 55 Get the address of this parameter in hex string form. 56 @return: the parameter address in hex string form or "unresolved" if it has not been assigned. 57 """ 58 if self.push_address != -1: 59 return "0x%x" % self.push_address 60 else: 61 return "unresolved"6264 """ 65 Get the value of this parameter in hex string form. 66 @return: the value in hex string form or "unresolved" if it has not been assigned. 67 """ 68 if self.value != -1: 69 return "0x%x" % self.value 70 else: 71 return "unresolved"72
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Sep 17 13:18:34 2012 | http://epydoc.sourceforge.net |