[binutils-gdb] Unconditionally use REG_EXTENDED
Tom Tromey
tromey@sourceware.org
Fri Oct 2 20:13:17 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d55199131070963cc61871d2cac5384eb100a6c0
commit d55199131070963cc61871d2cac5384eb100a6c0
Author: Tom Tromey <tromey@adacore.com>
Date: Fri Oct 2 10:23:25 2020 -0600
Unconditionally use REG_EXTENDED
skip.c checks whether REG_EXTENDED is defined -- but this should
always be available, and is used unconditionally in other parts of
gdb. This patch removes this check, then further simplifies this
code, removing a declaration and a repeated assertion.
2020-10-02 Tom Tromey <tromey@adacore.com>
* skip.c (skiplist_entry::skiplist_entry): Unconditionally use
REG_EXTENDED.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/skip.c | 10 ++--------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ca7a0caae5c..0e8bbe3bee4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-10-02 Tom Tromey <tromey@adacore.com>
+
+ * skip.c (skiplist_entry::skiplist_entry): Unconditionally use
+ REG_EXTENDED.
+
2020-10-02 Simon Marchi <simon.marchi@efficios.com>
* aix-thread.c (aix_thread_inferior_created): Remove parameters.
diff --git a/gdb/skip.c b/gdb/skip.c
index 419dd7a4682..e6499d619c7 100644
--- a/gdb/skip.c
+++ b/gdb/skip.c
@@ -139,14 +139,8 @@ skiplist_entry::skiplist_entry (bool file_is_glob,
if (m_function_is_regexp)
{
gdb_assert (!m_function.empty ());
-
- int flags = REG_NOSUB;
-#ifdef REG_EXTENDED
- flags |= REG_EXTENDED;
-#endif
-
- gdb_assert (!m_function.empty ());
- m_compiled_function_regexp.emplace (m_function.c_str (), flags,
+ m_compiled_function_regexp.emplace (m_function.c_str (),
+ REG_NOSUB | REG_EXTENDED,
_("regexp"));
}
}
More information about the Gdb-cvs
mailing list