(no title)
celrod | 1 year ago
(gdb) p unrolls_[0]
Could not find operator[].
(gdb) p unrolls_[(long)0]
Could not find operator[].
(gdb) p unrolls_.data_.mem[0]
$2 = {
`unrolls_[i]` works within C++. This `operator[]` method isn't even templated (although the container type is); the index is hard-coded to be of type `ptrdiff_t`, which is `long` on my platform.I'm on Linux, gdb 15.1.
mananaysiempre|1 year ago
That might be it. If that operator isn’t actually ever emitted out of line, then GDB will (naturally) have nothing to call. If it helps, with the following program
compiled at -g -O0 I can both `p foo[19]` and `p bar[19]`, but if I comment out the explicit instantiation marked [*], the latter no longer works. At -g -O2, the former does not work because `foo` no longer actually exists, but the latter does, provided the instantiation is left in.celrod|1 year ago