Skip to content

Commit

Permalink
minor fix in class Address
Browse files Browse the repository at this point in the history
  • Loading branch information
hugsy committed Jan 1, 2018
1 parent 07a8676 commit edbadbe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,14 @@ def __str__(self):
return value

def is_in_text_segment(self):
return hasattr(self.info, "name") and ".text" in self.info.name
return (hasattr(self.info, "name") and ".text" in self.info.name) or \
(get_filepath() == self.section.path and self.section.is_executable())

def is_in_stack_segment(self):
return hasattr(self.section, "path") and "[stack]" in self.section.path
return hasattr(self.section, "path") and "[stack]" == self.section.path

def is_in_heap_segment(self):
return hasattr(self.section, "path") and "[heap]" in self.section.path
return hasattr(self.section, "path") and "[heap]" == self.section.path

def dereference(self):
addr = align_address(long(self.value))
Expand Down

0 comments on commit edbadbe

Please sign in to comment.