From: Nadav Har'El <[email protected]>
Committer: Nadav Har'El <[email protected]>
Branch: master
gdb: fix "osv mmap" on connect on older distros
In commit ce177a50, I fixed "osv mmap" on newer distros as gdb started
requiring quotes around the typename mmu::vma. Unfortunately, these quotes
are considered a syntax error on older gdb. So in this patch we try both
syntaxes, trying the new one first, and if they it fails, the old one.
Signed-off-by: Nadav Har'El <[email protected]>
Message-Id: <[email protected]>
---
diff --git a/scripts/loader.py b/scripts/loader.py
--- a/scripts/loader.py
+++ b/scripts/loader.py
@@ -287,7 +287,10 @@ def vma_list(node=None):
node = intrusive_set_root_node(fpr)
if node:
- offset =
gdb.parse_and_eval("(int)&(('mmu::vma'*)0)->_vma_list_hook")
+ try:
+ offset =
gdb.parse_and_eval("(int)&(('mmu::vma'*)0)->_vma_list_hook")
+ except:
+ offset =
gdb.parse_and_eval("(int)&((mmu::vma*)0)->_vma_list_hook")
vma = node.cast(gdb.lookup_type('void').pointer()) - offset
vma = vma.cast(gdb.lookup_type('mmu::vma').pointer())
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.