BRIG does not contain debugging information
harald-lang opened this issue · 4 comments
The BRIG file distributed along with the HSAIL-Debugger does not contain debugging information. Thus, the tutorial does not work as described in https://github.com/HSAFoundation/HSA-Debugger-AMD/blob/master/TUTORIAL.md
Users have to manually assemble the matrix multiplication sample: HSAILasm -g -include-source matrixMul_kernel.hsail
This in not really an issue, but might not be intended...
Hi,
Did you try the latest bits from cd5ef1a? Please let us know if you still see an issue with that commit.
Hi,
yes, I installed the .deb files from cd5ef1a
$ md5sum ~/git/HSA-Debugger-AMD/ubuntu/amd*
dc6118c4a175efab2ddddf487ba8513b /home/hl/git/HSA-Debugger-AMD/ubuntu/amd-gpu-kernel-debug-sdk_1.0.917_amd64.deb
0e4568cab691d8346992cd96374e7e4e /home/hl/git/HSA-Debugger-AMD/ubuntu/amd-hsail-gdb_1.0.917_amd64.deb
Output of hsail-gdb:
$ /opt/amd/hsa-debugger/AMDHsailGdb/bin/x86_64/hsail-gdb MatrixMul
/opt/amd/hsa-debugger/AMDHsailGdb/bin/x86_64/amd-gdb
Python Exception <type 'exceptions.ImportError'> No module named gdb:
warning:
Could not load the Python gdb module from `/usr/local/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
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.
AMD hsail-gdb 1.0.917
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"...
HSAIL Configure Steps Done
....Certain GDB signals have been changed
Reading symbols from MatrixMul...done.
(gdb) break hsail:&__OpenCL_matrixMul_kernel
HSAIL breakpoint 1 (Unknown HSAIL breakpoint type) pending.
(gdb) r
Starting program: /home/hl/tmp/samples/MatrixMultiplication/MatrixMul
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Initializing HSA runtime...
[New Thread 0x7ffef5023700 (LWP 3337)]
[hsail-gdb: <SAW A SIGALRM - Used for HSAIL >]
[hsail-gdb: <SAW A SIGALRM - Used for HSAIL >]
[hsail-gdb: HSAIL Debugging has been successfully initialized]
HSA device attributes:
name: Kaveri CPU
type: CPU
chip ID: 0x130f
HSA profile: Full
HSA device attributes:
name: Spectre
type: GPU
chip ID: 0x130f
HSA profile: Full
[New Thread 0x7ffeef56e700 (LWP 3338)]
[New Thread 0x7ffeeed6d700 (LWP 3339)]
[hsail-gdb]: Breakpoint 1 at HSAIL Kernel, &__OpenCL_matrixMul_kernel()
[hsail-gdb]: The code object for the current dispatch does not contain debug information
HSAIL kernel source debugging will not occur
Stopped on HSAIL breakpoint
(gdb)
Ah. We have only updated the matrixMul brig file (in https://github.com/HSAFoundation/HSA-Debugger-AMD/blob/master/AMDGPUKernelDebugSDK/samples/MatrixMultiplication/matrixMul_kernel.brig) with that commit.
We will update the debian package in our next update. Thanks.
Ah okay. I didn't try that one. I prefer to dpkg -i whenever possible :)
Thanks!