public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] Breakpoints in symbols with ABI tags (PR c++/19436) Date: Wed, 29 Nov 2017 22:06:00 -0000 [thread overview] Message-ID: <bd69330db86b2367aac8aac5915f1686451c9d5d@gdb-build> (raw) *** TEST RESULTS FOR COMMIT bd69330db86b2367aac8aac5915f1686451c9d5d *** Author: Pedro Alves <palves@redhat.com> Branch: master Commit: bd69330db86b2367aac8aac5915f1686451c9d5d Breakpoints in symbols with ABI tags (PR c++/19436) Trying to set a breakpoint in a function with an ABI tag does not work currently. E.g., debugging gdb itself, we see this with the "string_printf" function: (top-gdb) b string_print [TAB] (top-gdb) b string_printf[abi:cxx11](char const*, ...) [RET] No source file named string_printf[abi. Make breakpoint pending on future shared library load? (y or [n]) Quoting doesn't help: (top-gdb) b 'string_printf[abi:cxx11]'(char const*, ...) malformed linespec error: unexpected string, "(char const*, ...)" (top-gdb) b 'string_printf[abi:cxx11](char const*, ...)' No source file named string_printf[abi. Make breakpoint pending on future shared library load? (y or [n]) n This patch fixes this, and takes it a bit further. The actual symbol name as demangled by libiberty's demangler is really string_printf[abi:cxx11](char const*, ...) however, this patch makes it possible to set the breakpoint with string_printf(char const*, ...) too. I.e., ignoring the ABI tag. And to match, it teaches the completer to complete the symbol name without the ABI tag, i.e., "string_pri<TAB>" -> "string_printf(char const*, ...)" If however, you really want to break on a symbol with the tag, then you simply start writing the tag, and GDB will preserve it, like: "string_printf[a<TAB>" -> "string_printf[abi:cxx11](char const*, ...)" Grows the gdb.linespec/ tests like this: -# of expected passes 8977 +# of expected passes 9176 gdb/ChangeLog: 2017-11-29 Pedro Alves <palves@redhat.com> PR c++/19436 * NEWS: Mention setting breakpoints on functions with C++ ABI tags. * completer.h (completion_match_for_lcd) <match, mark_ignored_range>: New methods. <finish>: Consider ignored ranges. <clear>: Clear ignored ranges. <m_ignored_ranges, m_finished_storage>: New fields. * cp-support.c (cp_search_name_hash): Ignore ABI tags. (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the completion_match_for_lcd pointer to strncmp_iw_with_mode. (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests. * language.c (default_symbol_name_matcher): Pass the completion_match_for_lcd pointer to strncmp_iw_with_mode. * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags. * utils.c (skip_abi_tag): New function. (strncmp_iw_with_mode): Add completion_match_for_lcd parameter. Handle ABI tags. * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd parameter. gdb/testsuite/ChangeLog: 2017-11-29 Pedro Alves <palves@redhat.com> PR c++/19436 * gdb.linespec/cpls-abi-tag.cc: New file. * gdb.linespec/cpls-abi-tag.exp: New file. gdb/doc/ChangeLog: 2017-11-29 Pedro Alves <palves@redhat.com> PR c++/19436 * gdb.texinfo (Debugging C Plus Plus): Document setting breakpoints in functions with ABI tags.
next reply other threads:[~2017-11-29 22:06 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-11-29 22:06 sergiodj+buildbot [this message] 2017-11-29 22:06 ` Failures on Fedora-s390x-m64, branch master sergiodj+buildbot 2017-11-30 1:43 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot 2017-11-30 1:58 ` Failures on Ubuntu-AArch64-m64, " sergiodj+buildbot 2017-11-30 2:12 ` Failures on Fedora-i686, " sergiodj+buildbot 2017-11-30 2:50 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot 2017-11-30 2:56 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot 2017-11-30 12:47 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot 2017-11-30 13:25 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, " sergiodj+buildbot 2017-11-30 14:03 ` Failures on Ubuntu-AArch32-m32, " sergiodj+buildbot
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=bd69330db86b2367aac8aac5915f1686451c9d5d@gdb-build \ --to=sergiodj+buildbot@sergiodj.net \ --cc=gdb-testers@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).