public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18601] New: Can't set breakpoint on function with abi_tag attribute
@ 2015-06-25 20:15 ks132 at yandex dot ru
  2015-06-25 20:42 ` [Bug c++/18601] " jsweval at arxan dot com
  2015-06-29 19:10 ` keiths at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: ks132 at yandex dot ru @ 2015-06-25 20:15 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18601

            Bug ID: 18601
           Summary: Can't set breakpoint on function with abi_tag
                    attribute
           Product: gdb
           Version: 7.9
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: ks132 at yandex dot ru
  Target Milestone: ---

[ks@localhost ~]$ cat test.cpp 
void f(int) __attribute ((abi_tag ("foo")));

void f(int) {
}

int main()
{
  f(42);
}
[ks@localhost ~]$ g++ -g test.cpp
[ks@localhost ~]$ 
[ks@localhost ~]$ nm -C a.out|grep foo
00000000004005b6 T f[abi:foo](int)
[ks@localhost ~]$ 
[ks@localhost ~]$ gdb -q a.out
Reading symbols from a.out...done.
(gdb) b 'f[abi:foo](int)' 
No source file named f[abi.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) 

GCC 5.1 uses abi_tag attribute for Dual ABI implementation:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

This makes impossible to set breakpoints on some functions with new ABI, which
is enabled by default:
https://gcc.gnu.org/gcc-5/changes.html#libstdcxx

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/18601] Can't set breakpoint on function with abi_tag attribute
  2015-06-25 20:15 [Bug c++/18601] New: Can't set breakpoint on function with abi_tag attribute ks132 at yandex dot ru
@ 2015-06-25 20:42 ` jsweval at arxan dot com
  2015-06-29 19:10 ` keiths at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jsweval at arxan dot com @ 2015-06-25 20:42 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18601

Jevin Sweval <jsweval at arxan dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsweval at arxan dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/18601] Can't set breakpoint on function with abi_tag attribute
  2015-06-25 20:15 [Bug c++/18601] New: Can't set breakpoint on function with abi_tag attribute ks132 at yandex dot ru
  2015-06-25 20:42 ` [Bug c++/18601] " jsweval at arxan dot com
@ 2015-06-29 19:10 ` keiths at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: keiths at redhat dot com @ 2015-06-29 19:10 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18601

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keiths at redhat dot com

--- Comment #1 from Keith Seitz <keiths at redhat dot com> ---
I hope to be working up a formal fix for this in the coming week, but I'd like
to mention a few things, including a workaround.

First, explicit locations (coming to a release some after 7.10 I suspect) "just
work":

(gdb) break -function f[abi:foo]
Breakpoint 1 at 0x4005bd: file /home/keiths/tmp/18601.cc, line 4.

Not that it will help you for the meantime (unless you apply my monstrously
large locations API patches). I'll be returning to that series of patches this
week, too.

An aside: quote-enclosing (entire) linespecs does /nothing/ in the parser.
Because IDEs have historically quote-enclosed all linespec locations, the
parser has to ignore them. Another historical bug that we have to maintain.

That's /not/ to say that quotes do nothing.

As it is, I happen to know that there is another legacy bug that the linespec
parser emulates that can be used to workaround your problem:

(gdb) b 'f[abi:foo]':1
Breakpoint 1 at 0x4005bd: file /home/keiths/tmp/18601.cc, line 4.

[The :1 should be a line-offset from the beginning of the function. That
feature was never implemented, but since it was silently ignored in previous
releases, that behavior was maintained when the linespec parser was rewritten.]

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-29 19:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 20:15 [Bug c++/18601] New: Can't set breakpoint on function with abi_tag attribute ks132 at yandex dot ru
2015-06-25 20:42 ` [Bug c++/18601] " jsweval at arxan dot com
2015-06-29 19:10 ` keiths at redhat dot com

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).