public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/31422] New: Replace gdb::array_view with std::span
@ 2024-02-27 17:05 tromey at sourceware dot org
  2024-02-27 17:05 ` [Bug gdb/31422] " tromey at sourceware dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tromey at sourceware dot org @ 2024-02-27 17:05 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 31422
           Summary: Replace gdb::array_view with std::span
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

C++20 includes std::span.
We could rewrite gdb::array_view to work like std::span,
then use the standard one when it is available.

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

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

* [Bug gdb/31422] Replace gdb::array_view with std::span
  2024-02-27 17:05 [Bug gdb/31422] New: Replace gdb::array_view with std::span tromey at sourceware dot org
@ 2024-02-27 17:05 ` tromey at sourceware dot org
  2024-02-27 17:13 ` simon.marchi at polymtl dot ca
  2024-04-06 15:12 ` tromey at sourceware dot org
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at sourceware dot org @ 2024-02-27 17:05 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |31419

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Marking this as blocking c++17, even though it's somewhat
unrelated.


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=31419
[Bug 31419] [meta] Convert GDB to C++17
-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug gdb/31422] Replace gdb::array_view with std::span
  2024-02-27 17:05 [Bug gdb/31422] New: Replace gdb::array_view with std::span tromey at sourceware dot org
  2024-02-27 17:05 ` [Bug gdb/31422] " tromey at sourceware dot org
@ 2024-02-27 17:13 ` simon.marchi at polymtl dot ca
  2024-04-06 15:12 ` tromey at sourceware dot org
  2 siblings, 0 replies; 4+ messages in thread
From: simon.marchi at polymtl dot ca @ 2024-02-27 17:13 UTC (permalink / raw)
  To: gdb-prs

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

Simon Marchi <simon.marchi at polymtl dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simon.marchi at polymtl dot ca

--- Comment #2 from Simon Marchi <simon.marchi at polymtl dot ca> ---
If we want something compatible with std::span, we could use:

https://github.com/martinmoene/span-lite

I use it for another project, it works well.

Licence-wise, it's BSL (Boost), which GNU says is compatible with GPL, so it
shouldn't be a problem:

https://www.gnu.org/licenses/license-list.en.html#boost

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

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

* [Bug gdb/31422] Replace gdb::array_view with std::span
  2024-02-27 17:05 [Bug gdb/31422] New: Replace gdb::array_view with std::span tromey at sourceware dot org
  2024-02-27 17:05 ` [Bug gdb/31422] " tromey at sourceware dot org
  2024-02-27 17:13 ` simon.marchi at polymtl dot ca
@ 2024-04-06 15:12 ` tromey at sourceware dot org
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at sourceware dot org @ 2024-04-06 15:12 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
I have a patch for this, but really using std::span means
making even more changes, e.g.:

      if (dwarf2_evaluate_property (&prop, nullptr, &addr_stack, &result,
                                    {addr_stack.addr}))
        return (int) (result - addr_stack.addr);

../../binutils-gdb/gdb/gnu-v3-abi.c: In function ‘int
gnuv3_baseclass_offset(type*, int, const bfd_byte*, LONGEST, CORE_ADDR, const
value*)’:
../../binutils-gdb/gdb/gnu-v3-abi.c:495:36: error: could not convert
‘{addr_stack.property_addr_info::addr}’ from ‘<brace-enclosed initializer
list>’ to ‘gdb::span<long unsigned int>’ {aka ‘std::span<long unsigned int,
18446744073709551615>’}

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

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

end of thread, other threads:[~2024-04-06 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 17:05 [Bug gdb/31422] New: Replace gdb::array_view with std::span tromey at sourceware dot org
2024-02-27 17:05 ` [Bug gdb/31422] " tromey at sourceware dot org
2024-02-27 17:13 ` simon.marchi at polymtl dot ca
2024-04-06 15:12 ` 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).