mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 22:35:32 +08:00
Merge remote-tracking branch 'origin/GP-0-master_Dan_testFixes-2023-10-18-1'
This commit is contained in:
@@ -65,7 +65,10 @@ class Index:
|
|||||||
self.regions[r.start] = r
|
self.regions[r.start] = r
|
||||||
self.bases.append(r.start)
|
self.bases.append(r.start)
|
||||||
def compute_base(self, address):
|
def compute_base(self, address):
|
||||||
floor = self.bases[bisect.bisect_right(self.bases, address) - 1]
|
index = bisect.bisect_right(self.bases, address) - 1
|
||||||
|
if index == -1:
|
||||||
|
return address
|
||||||
|
floor = self.bases[index]
|
||||||
if floor == None:
|
if floor == None:
|
||||||
return address
|
return address
|
||||||
else:
|
else:
|
||||||
@@ -223,7 +226,10 @@ class RegionInfoReader(object):
|
|||||||
|
|
||||||
def get_regions(self):
|
def get_regions(self):
|
||||||
regions = []
|
regions = []
|
||||||
out = gdb.execute(self.cmd, to_string=True)
|
try:
|
||||||
|
out = gdb.execute(self.cmd, to_string=True)
|
||||||
|
except:
|
||||||
|
return regions
|
||||||
for line in out.split('\n'):
|
for line in out.split('\n'):
|
||||||
r = self.region_from_line(line)
|
r = self.region_from_line(line)
|
||||||
if r is None:
|
if r is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user