def getAddressDetails(self, address): # FIXME: look for nearest .text, then get prev segm = get_prev_seg(address) moduleName = get_segm_name(segm) moduleBase = segm.startEA offset = address - moduleBase return (offset, moduleName)
def prev(self): """Get the previous segment.""" seg = Segment(segment_t=idaapi.get_prev_seg(self.ea)) if seg.ea >= self.ea: raise exceptions.NoMoreSegments("This is the first segment. no segments exist before it.") return seg