This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] btrace, gdbserver: use exceptions to convey btrace enable/disable errors
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Fri, 09 Feb 2018 11:32:16 -0500
- Subject: [binutils-gdb] btrace, gdbserver: use exceptions to convey btrace enable/disable errors
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 9ee23a853c18da3c83530c7957464bc6b6e9fb16 ***
Author: Markus Metzger <markus.t.metzger@intel.com>
Branch: master
Commit: 9ee23a853c18da3c83530c7957464bc6b6e9fb16
btrace, gdbserver: use exceptions to convey btrace enable/disable errors
Change error reporting to use exceptions and be prepared to catch them in
gdbserver. We use the exception message in our error reply to GDB.
This may remove some detail from the error message in the native case since
errno is no longer printed. Later patches will improve that.
We're still using error strings on the RSP level. This patch does not affect
the interoperability of older/newer GDB/gdbserver.
gdbserver/
* server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
(handle_btrace_disable): Change return type to void. Use exceptions
to report errors.
(handle_btrace_general_set): Catch exception and copy message to
return message.
gdb/
* nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
btrace failed.
* x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
exception and use message in own exception.
- Follow-Ups:
- Failures on Fedora-s390x-m64, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Ubuntu-AArch64-m64, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master
- Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master