[PATCH] I'm debugging https://github.com/helix-editor/helix.git@63dcaae1b9083396fb3faaef9eaa2421f7e48fb9, which is a editor implemented with rust lang. When I type gdb command below: (gdb) b pars gdb dumped. I got: m_match = 0x7fffd8173cc7 "parse::h3bbecc5bbd82b347" m_ignored_ranges = { first = 0x7fffd8173cbb "<impl str>::parse::h3bbecc5bbd82b347", second = 0x7fffd8173cc5 "::parse::h3bbecc5bbd82b347" }
Zheng Zhan Liang
linuxmaker@163.com
Mon Jan 2 12:43:34 GMT 2023
From: Zheng Zhan <zzlossdev@163.com>
---
gdb/completer.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gdb/completer.h b/gdb/completer.h
index 8b4ad8ec4d4..b1faa1b2d71 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -163,8 +163,11 @@ class completion_match_for_lcd
const char *prev = m_match;
for (const auto &range : m_ignored_ranges)
{
- m_finished_storage.append (prev, range.first);
- prev = range.second;
+ if (prev < range.first)
+ {
+ m_finished_storage.append (prev, range.first);
+ prev = range.second;
+ }
}
m_finished_storage.append (prev);
--
2.38.1
More information about the Gdb-patches
mailing list