diff options
author | Tom de Vries <tdevries@suse.de> | 2021-09-09 12:29:39 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-09-09 12:29:39 +0200 |
commit | 86fe51fcc7a78def0b3ed289c0e1e7e8af283acc (patch) | |
tree | 253f4db9ce3f893e710d1163aabb08179dee46bc /gdb/vax-netbsd-tdep.c | |
parent | 0b233e34c801eac78a5e03b66f18585cf368e4d5 (diff) | |
download | gdb-86fe51fcc7a78def0b3ed289c0e1e7e8af283acc.zip gdb-86fe51fcc7a78def0b3ed289c0e1e7e8af283acc.tar.gz gdb-86fe51fcc7a78def0b3ed289c0e1e7e8af283acc.tar.bz2 |
[gdb/testsuite] Reimplement gdb.gdb/complaints.exp as unittest
When building gdb with "-Wall -O2 -g -flto=auto", I run into:
...
(gdb) call clear_complaints()^M
No symbol "clear_complaints" in current context.^M
(gdb) FAIL: gdb.gdb/complaints.exp: clear complaints
...
The problem is that lto has optimized away the clear_complaints function
and consequently the selftest doesn't work.
Fix this by reimplementing the selftest as a unit test.
Factor out two new functions:
- void
execute_fn_to_ui_file (struct ui_file *file, std::function<void(void)> fn);
- std::string
execute_fn_to_string (std::function<void(void)> fn, bool term_out);
and use the latter to capture the complaints output.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/vax-netbsd-tdep.c')
0 files changed, 0 insertions, 0 deletions