public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/27579] New: stap-probe.c : Invalid use of incomplete type ‘struct std::hash<exp_opcode>’
@ 2021-03-15 11:37 vvinayag at arm dot com
  2021-03-15 14:58 ` [Bug build/27579] " tromey at sourceware dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: vvinayag at arm dot com @ 2021-03-15 11:37 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27579
           Summary: stap-probe.c : Invalid use of incomplete type ‘struct
                    std::hash<exp_opcode>’
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vvinayag at arm dot com
  Target Milestone: ---

After this commit [1], I am seeing this error: invalid use of incomplete type
‘struct std::hash<exp_opcode>’.


In file included from /usr/include/c++/4.8.2/bits/hashtable.h:35:0,
                 from /usr/include/c++/4.8.2/unordered_map:47,
                 from src/binutils-gdb--gdb/gdb/stap-probe.c:40:
/usr/include/c++/4.8.2/bits/hashtable_policy.h: In instantiation of ‘struct
std::__detail::_Hash_code_base<exp_opcode, std::pair<const exp_opcode,
std::unique_ptr<expr::operation> (*)(std::unique_ptr<expr::operation>&&,
std::unique_ptr<expr::operation>&&)>, std::__detail::_Select1st,
std::hash<exp_opcode>, std::__detail::_Mod_range_hashing,
std::__detail::_Default_ranged_hash, true>’:
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1402:10:   required from ‘struct
std::__detail::_Hashtable_base<exp_opcode, std::pair<const exp_opcode,
std::unique_ptr<expr::operation> (*)(std::unique_ptr<expr::operation>&&,
std::unique_ptr<expr::operation>&&)>, std::__detail::_Select1st,
std::equal_to<exp_opcode>, std::hash<exp_opcode>,
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash,
std::__detail::_Hashtable_traits<true, false, true> >’
/usr/include/c++/4.8.2/bits/hashtable.h:174:11:   required from ‘class
std::_Hashtable<exp_opcode, std::pair<const exp_opcode,
std::unique_ptr<expr::operation> (*)(std::unique_ptr<expr::operation>&&,
std::unique_ptr<expr::operation>&&)>, std::allocator<std::pair<const
exp_opcode, std::unique_ptr<expr::operation>
(*)(std::unique_ptr<expr::operation>&&, std::unique_ptr<expr::operation>&&)> >,
std::__detail::_Select1st, std::equal_to<exp_opcode>, std::hash<exp_opcode>,
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash,
std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true,
false, true> >’
/usr/include/c++/4.8.2/bits/unordered_map.h:100:18:   required from ‘class
std::unordered_map<exp_opcode, std::unique_ptr<expr::operation>
(*)(std::unique_ptr<expr::operation>&&, std::unique_ptr<expr::operation>&&)>’
/src/binutils-gdb--gdb/gdb/stap-probe.c:439:60:   required from here
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1070:12: error: invalid use of
incomplete type ‘struct std::hash<exp_opcode>’
     struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2,
            ^
In file included from /usr/include/c++/4.8.2/bits/basic_string.h:3033:0,
                 from /usr/include/c++/4.8.2/string:52,
                 from /usr/include/c++/4.8.2/stdexcept:39,
                 from /usr/include/c++/4.8.2/array:38,
                 from /usr/include/c++/4.8.2/tuple:39,
                 from /usr/include/c++/4.8.2/functional:55,
                 from /src/binutils-gdb--gdb/gdb/../gdbsupport/ptid.h:35,
                 from
/src/binutils-gdb--gdb/gdb/../gdbsupport/common-defs.h:123,
                 from /src/binutils-gdb--gdb/gdb/defs.h:28,
                 from /src/binutils-gdb--gdb/gdb/stap-probe.c:20:
/usr/include/c++/4.8.2/bits/functional_hash.h:58:12: error: declaration of
‘struct std::hash<exp_opcode>’
     struct hash;
            ^

The build/host/target setup is:
Build: x86_64 (Linux)
Host: : x86_64 (Linux)
Target: arm-none-eabi / arm-none-linux-gnueabi  / aarch64-none-elf /
aarch64-none-linux-gnu


[1]
commit 4c5e7a930a46ddd6844eb7aede3ef60df535bc33
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Mar 8 07:27:57 2021 -0700

    Convert stap probes to create operations

    This changes the stap probe code to create operations, rather than
    exp_elements.

    gdb/ChangeLog
    2021-03-08  Tom Tromey  <tom@tromey.com>

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

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

end of thread, other threads:[~2021-03-15 17:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 11:37 [Bug gdb/27579] New: stap-probe.c : Invalid use of incomplete type ‘struct std::hash<exp_opcode>’ vvinayag at arm dot com
2021-03-15 14:58 ` [Bug build/27579] " tromey at sourceware dot org
2021-03-15 15:01 ` tromey at sourceware dot org
2021-03-15 15:10 ` vvinayag at arm dot com
2021-03-15 15:49 ` tromey at sourceware dot org
2021-03-15 15:49 ` tromey at sourceware dot org
2021-03-15 15:51 ` vvinayag at arm dot com
2021-03-15 16:08 ` tromey at sourceware dot org
2021-03-15 16:54 ` vvinayag at arm dot com
2021-03-15 17:32 ` cvs-commit at gcc dot gnu.org
2021-03-15 17:35 ` tromey at sourceware dot org
2021-03-15 17:36 ` tromey at sourceware dot org

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