7 Star 15 Fork 12

Gitee 极速下载/srsLTE

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/srsLTE/srsLTE
克隆/下载
.gdbinit 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
#
# Copyright 2013-2020 Software Radio Systems Limited
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the distribution.
#
############################################
# Pretty-Printers
############################################
python
###### srsran::bounded_vector<T, N> ########
class BoundedVectorPrinter(object):
def __init__(self, val):
self.val = val
self.value_type = self.val.type.template_argument(0)
def children(self):
start = self.val['buffer']['_M_elems'].cast(self.value_type.pointer())
length = int(self.val['size_'])
for idx in range(length):
yield f'[{idx}]', start[idx]
def to_string(self):
length = int(self.val['size_'])
capacity = int(self.val.type.template_argument(1))
return f'bounded_vector of length {length}, capacity {capacity}'
def display_hint(self):
return 'array'
def make_bounded_vector(val):
if 'bounded_vector<' in str(val.type):
return BoundedVectorPrinter(val)
gdb.pretty_printers.append(make_bounded_vector)
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/mirrors/srsLTE.git
git@gitee.com:mirrors/srsLTE.git
mirrors
srsLTE
srsLTE
master

搜索帮助