mirror of
https://github.com/boostorg/unordered.git
synced 2026-07-21 13:43:30 +00:00
Fix GDB pretty-printers to work with GCC and C++26 (#342)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2024-2025 Braden Ganetsky
|
# Copyright 2024-2026 Braden Ganetsky
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
# https://www.boost.org/LICENSE_1_0.txt
|
# https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
@@ -16,8 +16,14 @@ class BoostUnorderedHelpers:
|
|||||||
return n
|
return n
|
||||||
|
|
||||||
def maybe_unwrap_foa_element(e):
|
def maybe_unwrap_foa_element(e):
|
||||||
if f"{e.type.strip_typedefs()}".startswith("boost::unordered::detail::foa::element_type<"):
|
# Sometimes the complex typedefs can't be resolved through a pointer
|
||||||
return e["p"]
|
if e.type.strip_typedefs().code == gdb.TYPE_CODE_PTR:
|
||||||
|
foa_element = e.dereference()
|
||||||
|
else:
|
||||||
|
foa_element = e
|
||||||
|
|
||||||
|
if f"{foa_element.type.strip_typedefs()}".startswith("boost::unordered::detail::foa::element_type<"):
|
||||||
|
return foa_element["p"]
|
||||||
else:
|
else:
|
||||||
return e
|
return e
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// Copyright 2024-2025 Braden Ganetsky
|
// Copyright 2024-2026 Braden Ganetsky
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
// Generated on 2025-08-21T03:09:19
|
// Generated on 2026-01-24T00:34:53
|
||||||
|
|
||||||
#ifndef BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP
|
#ifndef BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP
|
||||||
#define BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP
|
#define BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP
|
||||||
@@ -29,8 +29,14 @@ __asm__(".pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n"
|
|||||||
".ascii \" return n\\n\"\n"
|
".ascii \" return n\\n\"\n"
|
||||||
|
|
||||||
".ascii \" def maybe_unwrap_foa_element(e):\\n\"\n"
|
".ascii \" def maybe_unwrap_foa_element(e):\\n\"\n"
|
||||||
".ascii \" if f\\\"{e.type.strip_typedefs()}\\\".startswith(\\\"boost::unordered::detail::foa::element_type<\\\"):\\n\"\n"
|
".ascii \" # Sometimes the complex typedefs can't be resolved through a pointer\\n\"\n"
|
||||||
".ascii \" return e[\\\"p\\\"]\\n\"\n"
|
".ascii \" if e.type.strip_typedefs().code == gdb.TYPE_CODE_PTR:\\n\"\n"
|
||||||
|
".ascii \" foa_element = e.dereference()\\n\"\n"
|
||||||
|
".ascii \" else:\\n\"\n"
|
||||||
|
".ascii \" foa_element = e\\n\"\n"
|
||||||
|
|
||||||
|
".ascii \" if f\\\"{foa_element.type.strip_typedefs()}\\\".startswith(\\\"boost::unordered::detail::foa::element_type<\\\"):\\n\"\n"
|
||||||
|
".ascii \" return foa_element[\\\"p\\\"]\\n\"\n"
|
||||||
".ascii \" else:\\n\"\n"
|
".ascii \" else:\\n\"\n"
|
||||||
".ascii \" return e\\n\"\n"
|
".ascii \" return e\\n\"\n"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user