Fix "set debug timestamp"
authorTom Tromey <tom@tromey.com>
Tue, 27 Dec 2022 23:34:44 +0000 (16:34 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 28 Dec 2022 15:55:40 +0000 (08:55 -0700)
commita60535c39ba52d88c47740db6ab116db32e2331a
tree4eb843517714633ee45e0b39bba8ee596efa06be
parent47ecb26f71563b119667c1289a113358f53410b0
Fix "set debug timestamp"

PR cli/29945 points out that "set debug timestamp 1" stopped working
-- this is a regression due to commit b8043d27 ("Remove a ui-related
memory leak").

This patch fixes the bug and adds a regression test.

I think this should probably be backported to the gdb 13 branch.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29945
gdb/testsuite/gdb.base/timestamp.exp [new file with mode: 0644]
gdb/top.c