aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.h
diff options
context:
space:
mode:
authorLancelot SIX <lsix@lancelotsix.com>2021-10-05 19:55:19 +0000
committerLancelot SIX <lsix@lancelotsix.com>2021-10-05 21:43:13 +0000
commit1461d3712b921466015ab877b6e08ac27456a6a6 (patch)
tree4aea2e9da857be9982684a925a97aaf68fa1be6d /gdb/command.h
parentacbf4a58ef324e506cad9cc867a67164d2ca19d4 (diff)
downloadgdb-1461d3712b921466015ab877b6e08ac27456a6a6.zip
gdb-1461d3712b921466015ab877b6e08ac27456a6a6.tar.gz
gdb-1461d3712b921466015ab877b6e08ac27456a6a6.tar.bz2
gdb: Remove deprecated assertion in setting::get
The commit 702991711a91bd47b209289562843a11e7009396 (gdb: Have setter and getter callbacks for settings) makes it possible for a setting not to be backed by a memory buffer but use callback functions instead to retrieve or set the setting's value. An assertion was not properly updated to take into account that the m_var member (which points to a memory buffer, if used) might be nullptr if the setting uses callback functions. If the setting is backed by a memory buffer, the m_var has to be non nullptr, which is already checked before the pointer is dereferenced. This commit removes this assertion as it is not valid anymore.
Diffstat (limited to 'gdb/command.h')
-rw-r--r--gdb/command.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/gdb/command.h b/gdb/command.h
index 7c226f1..0049ab6 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -288,7 +288,6 @@ struct setting
const T &get () const
{
gdb_assert (var_type_uses<T> (m_var_type));
- gdb_assert (m_var != nullptr);
if (m_var == nullptr)
{