problem when using debugger

I’m using cuda-gdb for debugging the kernel part with two arrays(A and B) as arguments. I set a break point at kernel and when step in, I can print A for all the x, but when print B, no matter which x I set, the print result shows like: 0 ‘\0’, always have something quoted by ‘’ after the value that I stored and need to read. I dont know what does it mean.

btw, when stop at the break point, it shows some infomation like below:

Breakpoint 1, kernel<<<(1,1,1),(32,1,1)>>> (A=0x200100000, A_width=128, B=0x200300000 “”, B_width=32768)


print A[0]


print A[100]


print B[0]

0 ‘\0’

print B[100]

8 ‘\b’

print B[143]

128 ‘\200’

print B[143]

18 ‘\022’

The value (0, 8, 128, 18) in front part is what I expect to get, but " " after that is something beyond my imagination. I’m suspicious of the “” which I highlighted above to be some hint of failure for memcpy, but not sure.