public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug python/29712] [gdb, aarch64] UNRESOLVED: gdb.python/py-disasm.exp: global_disassembler=ReadMemoryGdbErrorDisassembler: disassemble test Date: Mon, 28 Nov 2022 19:24:27 +0000 [thread overview] Message-ID: <bug-29712-4717-WZUNEcOweb@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29712-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29712 --- Comment #12 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Burgess <aburgess@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8eb7d135e32ad6b7cdcfeffe486b195058206cdb commit 8eb7d135e32ad6b7cdcfeffe486b195058206cdb Author: Andrew Burgess <aburgess@redhat.com> Date: Mon Oct 24 18:35:41 2022 +0100 gdb/disasm: mark functions passed to the disassembler noexcept While working on another patch, Simon pointed out that GDB could be improved by marking the functions passed to the disassembler as noexcept. https://sourceware.org/pipermail/gdb-patches/2022-October/193084.html The reason this is important is the on some hosts, libopcodes, being C code, will not be compiled with support for handling exceptions. As such, an attempt to throw an exception over libopcodes code will cause GDB to terminate. See bug gdb/29712 for an example of when this happened. In this commit all the functions that are passed to the disassembler, and which might be used as callbacks by libopcodes are marked noexcept. Ideally, I would have liked to change these typedefs: using read_memory_ftype = decltype (disassemble_info::read_memory_func); using memory_error_ftype = decltype (disassemble_info::memory_error_func); using print_address_ftype = decltype (disassemble_info::print_address_func); using fprintf_ftype = decltype (disassemble_info::fprintf_func); using fprintf_styled_ftype = decltype (disassemble_info::fprintf_styled_func); which are declared in disasm.h, as including the noexcept keyword. However, when I tried this, I ran into this warning/error: In file included from ../../src/gdb/disasm.c:25: ../../src/gdb/disasm.h: In constructor âgdb_printing_disassembler::gdb_printing_disassembler(gdbarch*, ui_file*, gdb_disassemble_info::read_memory_ftype, gdb_disassemble_info::memory_error_ftype, gdb_disassemble_info::print_address_ftype)â: ../../src/gdb/disasm.h:116:3: error: mangled name for âgdb_printing_disassembler::gdb_printing_disassembler(gdbarch*, ui_file*, gdb_disassemble_info::read_memory_ftype, gdb_disassemble_info::memory_error_ftype, gdb_disassemble_info::print_address_ftype)â will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type] 116 | gdb_printing_disassembler (struct gdbarch *gdbarch, | ^~~~~~~~~~~~~~~~~~~~~~~~~ So I've left that change out. This does mean that if somebody adds a new use of the disassembler classes in the future, and forgets to mark the callbacks as noexcept, this will compile fine. We'll just have to manually check for that during review. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-11-28 19:24 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-21 10:47 [Bug python/29712] New: " vries at gcc dot gnu.org 2022-10-21 13:09 ` [Bug python/29712] " vries at gcc dot gnu.org 2022-10-21 13:43 ` vries at gcc dot gnu.org 2022-10-21 14:11 ` vries at gcc dot gnu.org 2022-10-21 14:18 ` vries at gcc dot gnu.org 2022-10-21 20:54 ` aburgess at redhat dot com 2022-10-22 4:31 ` vries at gcc dot gnu.org 2022-10-24 9:17 ` vries at gcc dot gnu.org 2022-10-24 12:51 ` aburgess at redhat dot com 2022-10-31 18:17 ` brobecker at gnat dot com 2022-11-02 7:12 ` luis.machado at arm dot com 2022-11-28 19:24 ` cvs-commit at gcc dot gnu.org 2022-11-28 19:24 ` cvs-commit at gcc dot gnu.org [this message] 2022-12-01 18:10 ` tromey at sourceware dot org 2022-12-02 16:39 ` aburgess at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29712-4717-WZUNEcOweb@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).