aboutsummaryrefslogtreecommitdiff
path: root/gdb/skip.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-10-02 10:23:25 -0600
committerTom Tromey <tromey@adacore.com>2020-10-02 14:08:28 -0600
commitd55199131070963cc61871d2cac5384eb100a6c0 (patch)
tree64c9d953b7bf113dd09632c5879c180910e2b69f /gdb/skip.c
parent42c36b7366dcff8886d3c50ccf38b227ce4a4da2 (diff)
downloadgdb-d55199131070963cc61871d2cac5384eb100a6c0.zip
gdb-d55199131070963cc61871d2cac5384eb100a6c0.tar.gz
gdb-d55199131070963cc61871d2cac5384eb100a6c0.tar.bz2
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.
Diffstat (limited to 'gdb/skip.c')
-rw-r--r--gdb/skip.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gdb/skip.c b/gdb/skip.c
index 419dd7a..e6499d6 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"));
}
}