aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-08-26 18:17:40 -0600
committerTom Tromey <tom@tromey.com>2021-09-24 11:58:04 -0600
commit7ebaa5f7821682c40e79ee1fdfe43528b7d87376 (patch)
treee32d94cab5616bedf19aa1637eaea7e1c0df49fb /gdb/ada-lang.c
parent604386598d43e50f183aba65189354e04ffbdda3 (diff)
downloadgdb-7ebaa5f7821682c40e79ee1fdfe43528b7d87376.zip
gdb-7ebaa5f7821682c40e79ee1fdfe43528b7d87376.tar.gz
gdb-7ebaa5f7821682c40e79ee1fdfe43528b7d87376.tar.bz2
Move value_true to value.h
I noticed that value_true is declared in language.h and defined in language.c. However, as part of the value API, I think it would be better in one of those files. And, because it is very short, I changed it to be an inline function in value.h. I've also removed a comment from the implementation, on the basis that it seems obsolete -- if the change it suggests was needed, it probably would have been done by now; and if it is needed in the future, odds are it would be done differently anyway. Finally, this patch also changes value_true and value_logical_not to return a bool, and updates some uses.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 487d92b..a00fa14 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -11765,13 +11765,13 @@ re_set_exception (struct breakpoint *b)
user specified a specific exception, we only want to cause a stop
if the program thrown that exception. */
-static int
+static bool
should_stop_exception (const struct bp_location *bl)
{
struct ada_catchpoint *c = (struct ada_catchpoint *) bl->owner;
const struct ada_catchpoint_location *ada_loc
= (const struct ada_catchpoint_location *) bl;
- int stop;
+ bool stop;
struct internalvar *var = lookup_internalvar ("_ada_exception");
if (c->m_kind == ada_catch_assert)
@@ -11799,16 +11799,16 @@ should_stop_exception (const struct bp_location *bl)
/* With no specific exception, should always stop. */
if (c->excep_string.empty ())
- return 1;
+ return true;
if (ada_loc->excep_cond_expr == NULL)
{
/* We will have a NULL expression if back when we were creating
the expressions, this location's had failed to parse. */
- return 1;
+ return true;
}
- stop = 1;
+ stop = true;
try
{
struct value *mark;