UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
4,593 Views
Registered: ‎04-17-2012

Displaying __global float*a during debugging doesn't work

Hi,

 

I am using a the "vmul_vadd" example from Xilinx repo to debug simple kernels.

The program multiplies and adds arrays, in an element-by element manner.


During debug, I can inspect values of global int arguments such as a, b, c:

__kernel __attribute__ ((reqd_work_group_size(1, 1, 1)))
void krnl_vmul(__global int* a, __global int* b, __global int* c)
{
    for(int i = 0; i < 16; i++){
        c[i] = a[i] * b[i];
    }
}

Original code uses arrays of ints. I modified this to work with instead with array of floats, but I cannot see the previous values as in the previous case during debugging:

GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/wimi/lvs/ESA_Projects/sda20154/SDx-master/Examples/SDAccel/GettingStarted/vmul_vadd/vector_mult_add/impl/sim/cpu_em/vector_mult_add.exe...done.
(gdb) b krnl_vmul
Function "krnl_vmul" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (krnl_vmul) pending.
(gdb) r
Starting program: /home/wimi/lvs/ESA_Projects/sda20154/SDx-master/Examples/SDAccel/GettingStarted/vmul_vadd/vector_mult_add/impl/sim/cpu_em/vector_mult_add.exe bin_vmul.xclbin bin_vadd.xclbin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff671a700 (LWP 2506)]
[New Thread 0x7ffff5d19700 (LWP 2507)]
[New Thread 0x7ffff5318700 (LWP 2508)]
[New Thread 0x7ffff470d700 (LWP 2509)]
[Switching to Thread 0x7ffff470d700 (LWP 2509)]

Breakpoint 1, krnl_vmul ()
    at /home/wimi/lvs/ESA_Projects/sda20154/SDx-master/Examples/SDAccel/GettingStarted/vmul_vadd/vector_mult_add/impl/_xocc_bin_vmul_link.dir/impl/kernels/krnl_vmul/krnl_vmul/cpu_sources/krnl_vmul.cl:45
45	        c[i] = a[i] * b[i];
(gdb) p a[0]
cannot subscript something of type `<data variable, no debug info>'
(gdb) p a[1]
cannot subscript something of type `<data variable, no debug info>'
(gdb) p b[0]
cannot subscript something of type `<data variable, no debug info>'
(gdb) 

is this expected with floats?

I attach the whole project code.

 

Thank you for your help.

 

 

 


Best,
L30nardo SV
0 Kudos