1 Star 0 Fork 44

桐小哥/gdb

forked from src-openEuler/gdb 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gdb-rhbz795424-bitpos-arrayview.patch 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
HukunaMatata 提交于 2020-01-13 14:20 . upgrade version to 8.3.1
diff --git a/gdb/common/array-view.h b/gdb/common/array-view.h
--- a/gdb/common/array-view.h
+++ b/gdb/common/array-view.h
@@ -85,7 +85,7 @@ public:
using value_type = T;
using reference = T &;
using const_reference = const T &;
- using size_type = size_t;
+ using size_type = ULONGEST;
/* Default construction creates an empty view. */
constexpr array_view () noexcept
@@ -114,7 +114,7 @@ public:
count. */
template<typename U,
typename = Requires<DecayedConvertible<U>>>
- constexpr array_view (U *array, size_t size) noexcept
+ constexpr array_view (U *array, ULONGEST size) noexcept
: m_array (array), m_size (size)
{}
@@ -128,7 +128,7 @@ public:
{}
/* Create an array view from an array. */
- template<typename U, size_t Size,
+ template<typename U, ULONGEST Size,
typename = Requires<DecayedConvertible<U>>>
constexpr array_view (U (&array)[Size]) noexcept
: m_array (array), m_size (Size)
@@ -161,9 +161,9 @@ public:
/*constexpr14*/ T *end () noexcept { return m_array + m_size; }
constexpr const T *end () const noexcept { return m_array + m_size; }
- /*constexpr14*/ reference operator[] (size_t index) noexcept
+ /*constexpr14*/ reference operator[] (ULONGEST index) noexcept
{ return m_array[index]; }
- constexpr const_reference operator[] (size_t index) const noexcept
+ constexpr const_reference operator[] (ULONGEST index) const noexcept
{ return m_array[index]; }
constexpr size_type size () const noexcept { return m_size; }
@@ -196,7 +196,7 @@ operator== (const gdb::array_view<T> &lhs, const gdb::array_view<T> &rhs)
if (lhs.size () != rhs.size ())
return false;
- for (size_t i = 0; i < lhs.size (); i++)
+ for (ULONGEST i = 0; i < lhs.size (); i++)
if (!(lhs[i] == rhs[i]))
return false;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tong_1001/gdb.git
git@gitee.com:tong_1001/gdb.git
tong_1001
gdb
gdb
master

搜索帮助