When use GDB out put error
pyhundan opened this issue · comments
Hi,
I have run the Vitis_Accel_Example such as this code
And I want to know more informations about the function enqueueMigrateMemObjects
However, no matter the Vitis compiler is used to debug the code, or GDB is used to debug the code from the command line, but the final error will be reported.
Error notification in VItis is Can't find a source file at "/opt/xrt/src/runtime_src/xdp/appdebug/appdebug.cpp"
And Error notification in GDB is
__gnu_cxx::new_allocator<cl::Memory>::deallocate (this=<optimized out>, __p=<optimized out>) at /usr/include/c++/5/ext/new_allocator.h:110
110 { ::operator delete(__p); }
(gdb)
0x00007ffff77b3f10 in operator delete(void*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb)
Single stepping until exit from function _ZdlPv,
which has no line number information.
__GI___libc_free (mem=0x63c0d0) at malloc.c:2941
2941 malloc.c: No such file or directory.
How do I debug to find the correct function call flow?
By the way, My Vitis IDE version is v2020.2.0(64.bit). And XRT version is 2020.2 and my System is Ubuntu 16.04, kernel version is 5.1.0.
Thank, hundan
Hi @pyhundan ,
To debug this issue, I would like to ask for the following information:
• When running gdb on the command line, are you calling any of the XRT application debug extensions (xprint, xmem)?
o If so, do you have an xrt.ini file with a [Debug] section that has app_debug=true?
• Can you provide the gdb backtrace (bt on the gdb command line) when the error is hit?
• If you’re trying to step through the internals of the enqueueMigrateMemObjects function, is XILINX_XRT pointing to a debug build of XRT?
Thanks,
Vishnu
Hi, @vishnuchebrolu
1、When I running gdb on the command line, I have tried to set an xrt.ini file with a [Debug] section that has app_debug=true. But it still presents the error.
2、the error show as follow
(gdb) bt
#0 __GI___libc_free (mem=0x63b540) at malloc.c:2947
#1 0x0000000000401f96 in main (argc=<optimized out>, argv=<optimized out>) at ../src/vadd.cpp:147
3、I don't understand what is "XILINX_XRT pointing to a debug build of XRT?" How can I do this?
And I just want to understand how enqueueMigrateMemObjects work and which system functions to call. And I just found it will call clEnqueueMigrateMemObjects. But the lower-level implementations cannot be viewed. I hope I can get some explanation from debugging.
Thanks,
hundan
Hi @pyhundan,
Is the issue resolved now? If not, can you try the debug build of XRT. Please following the instructions from the following link : https://github.com/Xilinx/XRT
For more details please find the following document.
https://xilinx.github.io/XRT/master/html/build.html
Thanks,
Vishnu
Closing this issue as not getting any more response. Please re-open if still facing the issue.