+2019-07-03 Pedro Alves <palves@redhat.com>
+
+ * maint-test-settings.c (maintenance_test_settings_xxx)
+ (maintenance_test_settings_yyy, maintenance_test_settings_zzz):
+ New.
+ (maintenance_test_settings_enums): Use them.
+ (maintenance_test_settings_enum): Default to
+ maintenance_test_settings_xxx.
+ (_initialize_maint_test_settings): Initialize
+ MAINTENANCE_TEST_SETTINGS_FILENAME.
+
2019-07-02 Simon Marchi <simon.marchi@polymtl.ca>
* breakpoint.h (remove_breakpoints_inf): Change return type to
static char *maintenance_test_settings_filename;
-static const char *maintenance_test_settings_enum;
-
/* Enum values for the "maintenance test-settings set/show boolean"
commands. */
+static const char maintenance_test_settings_xxx[] = "xxx";
+static const char maintenance_test_settings_yyy[] = "yyy";
+static const char maintenance_test_settings_zzz[] = "zzz";
+
static const char *const maintenance_test_settings_enums[] = {
- "xxx", "yyy", "zzz", nullptr
+ maintenance_test_settings_xxx,
+ maintenance_test_settings_yyy,
+ maintenance_test_settings_zzz,
+ nullptr
};
+static const char *maintenance_test_settings_enum
+ = maintenance_test_settings_xxx;
+
/* The "maintenance test-options show xxx" commands. */
static void
void
_initialize_maint_test_settings (void)
{
+ maintenance_test_settings_filename = xstrdup ("/foo/bar");
+
add_prefix_cmd ("test-settings", no_class,
maintenance_test_settings_cmd,
_("\
+2019-07-03 Pedro Alves <palves@redhat.com>
+
+ * gdb.base/settings.exp (test-string): Adjust expected out when
+ testing "maint test-settings show filename"
+
2019-07-02 Pedro Alves <palves@redhat.com>
* gdb.base/options.exp (test-info-threads): New procedure.
set set_cmd "maint test-settings set $variant"
set show_cmd "maint test-settings show $variant"
- # Empty string. Also checks that gdb doesn't crash if we haven't
- # set the string yet.
- gdb_test "$show_cmd" "^$show_cmd\r\n" "$show_cmd: empty first time"
+ # Checks that gdb doesn't crash if we haven't set the string yet.
+ if {$variant != "filename"} {
+ gdb_test "$show_cmd" "^$show_cmd\r\n" "$show_cmd: show default"
+ } else {
+ gdb_test "$show_cmd" "/foo/bar" "$show_cmd: show default"
+ }
# A string value.
gdb_test_no_output "$set_cmd hello world"