blob: 8daf6cacb78e0bff1753a7520a733753c5772408 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import gdb
gr = gdb.execute
inf = gdb.selected_inferior()
pid = inf.pid
base = None
for line in open("/proc/%d/maps" % pid):
parts = line.split()
try:
lo, hi = [int(x,16) for x in parts[0].split('-')]
except Exception:
continue
if base is None and "libnvidia-eglcore" in line and int(parts[2],16) == 0:
base = lo
print("BASE 0x%x" % (base or 0))
print("--- wait site +0xA12D90..:")
print(gr("x/60i 0x%x" % (base + 0xA12D90), to_string=True))
print("--- caller +0xD690D0..:")
print(gr("x/40i 0x%x" % (base + 0xD690D0), to_string=True))
print("T95-DONE")
|