mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 18:50:53 +00:00
gdb: prepare for Seastar's "smp: allow having multiple instances of the smp class"
scylladb/seastar@e6463df8a0 ("smp: allow having multiple instances of the smp class") changes the type of seastar::smp::_qs from a unique_ptr to a regular pointer. Adjust for that change, with a fallback to support older versions. Closes #8784
This commit is contained in:
@@ -3787,7 +3787,10 @@ class scylla_smp_queues(gdb.Command):
|
||||
self.queues = set()
|
||||
|
||||
def _init(self):
|
||||
qs = std_unique_ptr(gdb.parse_and_eval('seastar::smp::_qs')).get()
|
||||
qs = gdb.parse_and_eval('seastar::smp::_qs')
|
||||
if qs.type.code != gdb.TYPE_CODE_PTR:
|
||||
# older Seastar use std::unique_ptr for this variable
|
||||
qs = std_unique_ptr(qs).get()
|
||||
for i in range(cpus()):
|
||||
for j in range(cpus()):
|
||||
self.queues.add(int(qs[i][j].address))
|
||||
|
||||
Reference in New Issue
Block a user