From: Nadav Har'El <n...@scylladb.com>
Committer: Nadav Har'El <n...@scylladb.com>
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 <n...@scylladb.com>
Message-Id: <20170316083910.27964-1-...@scylladb.com>
---
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 osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.