summaryrefslogtreecommitdiffstats
path: root/src/etc/gdb_providers.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:21 +0000
commit4e8199b572f2035b7749cba276ece3a26630d23e (patch)
treef09feeed6a0fe39d027b1908aa63ea6b35e4b631 /src/etc/gdb_providers.py
parentAdding upstream version 1.66.0+dfsg1. (diff)
downloadrustc-4e8199b572f2035b7749cba276ece3a26630d23e.tar.xz
rustc-4e8199b572f2035b7749cba276ece3a26630d23e.zip
Adding upstream version 1.67.1+dfsg1.upstream/1.67.1+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/etc/gdb_providers.py')
-rw-r--r--src/etc/gdb_providers.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/etc/gdb_providers.py b/src/etc/gdb_providers.py
index c351c3450..32b8d8e24 100644
--- a/src/etc/gdb_providers.py
+++ b/src/etc/gdb_providers.py
@@ -144,20 +144,16 @@ class StdVecDequeProvider:
def __init__(self, valobj):
self.valobj = valobj
self.head = int(valobj["head"])
- self.tail = int(valobj["tail"])
+ self.size = int(valobj["len"])
self.cap = int(valobj["buf"]["cap"])
self.data_ptr = unwrap_unique_or_non_null(valobj["buf"]["ptr"])
- if self.head >= self.tail:
- self.size = self.head - self.tail
- else:
- self.size = self.cap + self.head - self.tail
def to_string(self):
return "VecDeque(size={})".format(self.size)
def children(self):
return _enumerate_array_elements(
- (self.data_ptr + ((self.tail + index) % self.cap)) for index in xrange(self.size)
+ (self.data_ptr + ((self.head + index) % self.cap)) for index in xrange(self.size)
)
@staticmethod