gdb debug print

gdb debug print

HiI am trying to debug under ubuntu with gdb some arbb function.I compiled the code with icc with -g option.I added stl support to have pretty print (http://sourceware.org/gdb/wiki/STLSupport) with python (first option).The stl print is ok for exemple for a vector of size 2:"
gdb) p d$5 = std::vector of length 2, capacity 2 = {9, 10}gdb) p d$5 = std::vector of length 2, capacity 2 = {9, 10}"But when trying to print for exemple a boolean in arbb code :"83 _if (bVendeur)(gdb) p bVendeur$6 = {m_detail_scalar = {m_scalar_type = arbb_boolean, m_variable = {m_capture_copy_in = false, m_impl = 0x1be29d0}, m_global_variable = {m_object = 0x0}, m_debug_data = { m_data = std::vector of length 80, capacity 80 = {0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000', 0 '\\000'}}}}(gdb)"I wonder which fancy printer you use for your data ?Sincerely yours

4 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Zhang Z (Intel)

ArBB has its own pretty-printer. You don't have to add another one. Check out this page in the User Guide for Linux to see how to use the GDB integration. For details about how the pretty-printing works, check the Python script located in $ARBB_ROOT/tools/debugger/gdb.py

Thank you from the script.But the use is not explained.for example in my .gdbinit :"pythonimport syssys.path.insert(0, '/opt/intel/arbb/1.0.0.022/tools/debugger')import gdbend"is not sufficient.Could you tell me what is missing ?Thank you

Ritratto di Zhang Z (Intel)

You do not need to do anything in your .gdbinit. You do not even need a .gdbinit file to use the GDB integration for ArBB on Linux. To debug with GDB, you only need to:

  1. Compile your ArBB code with the -g option.
  2. Link with libarbb_dev.so, instead of libarbb.so
  3. Set env variable ARBB_EMULATE=1 (because debugging is only supported for the emulation mode).
  4. Start gdb as usual.

Let us know if you still have problems. Thanks.

Accedere per lasciare un commento.