NULL
};
-/* Print a message reporting an internal error/warning. Ask the user
- if they want to continue, dump core, or just exit. Return
- something to indicate a quit. */
+/* Data structure used to control how the internal_vproblem function
+ should behave. An instance of this structure is created for each
+ problem type that GDB supports. */
struct internal_problem
{
+ /* The name of this problem type. This must not contain white space as
+ this string is used to build command names. */
const char *name;
- int user_settable_should_quit;
+
+ /* When this is true then a user command is created (based on NAME) that
+ allows the SHOULD_QUIT field to be modified, otherwise, SHOULD_QUIT
+ can't be changed from its default value by the user. */
+ bool user_settable_should_quit;
+
+ /* Reference a value from internal_problem_modes to indicate if GDB
+ should quit when it hits a problem of this type. */
const char *should_quit;
- int user_settable_should_dump_core;
+
+ /* Like USER_SETTABLE_SHOULD_QUIT but for SHOULD_DUMP_CORE. */
+ bool user_settable_should_dump_core;
+
+ /* Like SHOULD_QUIT, but whether GDB should dump core. */
const char *should_dump_core;
};
}
static struct internal_problem internal_error_problem = {
- "internal-error", 1, internal_problem_ask, 1, internal_problem_ask
+ "internal-error", true, internal_problem_ask, true, internal_problem_ask,
};
void
}
static struct internal_problem internal_warning_problem = {
- "internal-warning", 1, internal_problem_ask, 1, internal_problem_ask
+ "internal-warning", true, internal_problem_ask, true, internal_problem_ask,
};
void
}
static struct internal_problem demangler_warning_problem = {
- "demangler-warning", 1, internal_problem_ask, 0, internal_problem_no
+ "demangler-warning", true, internal_problem_ask, false, internal_problem_no,
};
void