I use gdb to debug a program that uses AVX2 intrinsics via immintrin.h header.
With gdb, I can print out __m256 values without any issues, like so:
>>> print scl8
$4 = {[0] = 0.0078125, [1] = 0.0078125, [2] = 0.0078125, [3] = 0.0078125, [4] = 0.0078125, [5] = 0.0078125, [6] = 0.0078125, [7] = 0.0078125}
In this particular example, all 8 lanes contain the value 1/128. And note that gdb prints out all 8 lanes!
If I want to print out epi32 values of a __m256i value, things go wrong:
>>> print msk8
$6 = {[0] = 4294967297, [1] = 4294967297, [2] = 4294967297, [3] = 4294967297}
Why would gdb print 4 lanes (of what I assume are 64bit integers) for __m256i but 8 lanes of 32bit floats for __m256 values? Where is the consistency in here?
How can I print 8 epi32 values from a __m256i using gdb?
$ gdb --version
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git