DEV IN PROGRESS

Module pychrysalide.analysis.db.items

Documentation

Python module for Chrysalide.analysis.db.items

Classes

Class BookmarkCollection

BookmarkCollection remembers all bookmark definitions.

Instances can be created using the following constructor:

    BookmarkCollection()

There should be no need for creating such instances manually.

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.db.DbCollection
           ╰── pychrysalide.analysis.db.items.BookmarkCollection

Class CommentCollection

CommentCollection remembers all comment definitions.

Instances can be created using the following constructor:

    CommentCollection()

There should be no need for creating such instances manually.

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.db.DbCollection
           ╰── pychrysalide.analysis.db.items.CommentCollection

Class DbBookmark

DbBookmark provides support for bookmarks inside the disassembled code.

Instances can be created using the following constructor:

    DbBookmark(addr, comment=None)

Where addr is a location of type vmpa and comment is a string or None.

An empty comment is not enough to delete a bookmark for a given address; the ERASER flag from the DbItemFlags enumeration must be explicitly add to the item by a call to the add_flag() function.

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.db.DbItem
           ╰── pychrysalide.analysis.db.items.DbBookmark

Attributes

address

Location of the bookmark, provided as a vmpa instance.

comment

Comment linked to the bookmark or None if the bookmark has been unset.

Class DbComment

DbComment provides support for comments to embed into the disassembled code.

Instances can be created using the following constructor:

    DbComment(addr, addr, type, flags, text=None)

Where addr is a location of type vmpa, type defines the kind of embedding as a CommentEmbeddingType value, flags states for the BufferLineFlags property of the line to attach and text is an optional string for the comment.

An empty comment is not enough to delete a comment for a given address; the ERASER flag from the DbItemFlags enumeration must be explicitly add to the item by a call to the add_flag() function.

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.db.DbItem
           ╰── pychrysalide.analysis.db.items.DbComment

Implements: pychrysalide.glibext.LineGenerator

Attributes

address

Location of the comment, provided as a vmpa instance.

embedding_type

Type of embedding required for the comment, as a CommentEmbeddingType value.

flags

Flags of the line where to attach the comment, as a BufferLineFlags value.

text

Content of the comment, as a string which may contain several lines, or None of no text is linked to the comment.

Constants

CommentEmbeddingType

Kinds of insertion for comments.

0= 0
1= 1
2= 2
3= 3

Class DbSwitcher

DbSwitcher allows to switch display for immediate operands.

Instances can be created using the following constructor:

    DbSwitcher(instr, imm, display)

Where instr is an ArchInstruction instance containing the target imm operand, which must be an ImmOperand object. The display argument defines the kind of display to apply, as a ImmOperandDisplay value.

ImmOperandDisplay.COUNT can be used to reset the display to its default state.

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.db.DbItem
           ╰── pychrysalide.analysis.db.items.DbSwitcher

Attributes

address

Location of the instruction containing the switched operand, as a vmpa instance.

display

Kind of display forced for the target operand, as an ImmOperandDisplay value.

path

Path used to retrieved internally the operand to switch.

This path is a string of the form 'n[:n:n:n]', where n is an internal index.

Class SwitcherCollection

SwitcherCollection remembers all switch definitions for immediate operand display.

Instances can be created using the following constructor:

    SwitcherCollection()

There should be no need for creating such instances manually.

Hierarchy

builtins.object
 ╰── gi._gi.GObject
      ╰── pychrysalide.analysis.db.DbCollection
           ╰── pychrysalide.analysis.db.items.SwitcherCollection