Software Archive
Read-only legacy content
17061 Discussions

GDB fast tracepoint on the Xeon Phi

Didier_N_
Beginner
399 Views

Hello,

I am currently trying to use GDB fast tracepoint on the Xeon Phi, and I am running into some difficulties. I am using MPSS 3.4.5, and Intel parallel studio 2015. I have tried to use the libinproctrace.so library available with Parallel Studio 2015 and I have used gdbserver and libinproctrace.so that I have compiled from the MPSS 3.4.5 source.

I start the debugging server on the xeon phi using LD_PRELOAD=/tmp/libinproctrace.so ./gdserver localhost:3000 ./test_program, and I connect to it using gdb-mic from parallel studio (or gdb that I have compiled from the MPSS source). However, when I try to enable the fast tracepoint using tstart, I get a message telling me that the in-process agent library (which should be libinproctrace.so) is not loaded.

When I configured the gdbserver makefile from the MPSS source, I have used the --enable-inprocess-agent.

Thank you,

Didier Nadeau

0 Kudos
1 Reply
Georg_Z_Intel
Employee
399 Views

Hello,

the "GDB fast tracepoint " feature is part of GDB itself. Our engineers decided to not build it for the GDB versions that are shipped with our packages (there's an older version where it was available but has been removed to simplify packaging).

If you want to use it you need to build GDB yourself. I'd suggest you use the GDB sources we ship with Intel(R) Parallel Studio XE 2016 and not the ones from MPSS. GDB from the MPSS version is too old meanwhile and you might want to use 7.8 instead of the older 7.6 version.

Just start the installer from Intel(R) Parallel Studio XE 2016 and select the sources for GDB:
Source of GNU* GDB 7.8 (Provided under GNU General Public License v3)

In the following you'll find the build configuration/commands used to build gdb-mic and the corresponding gdbserver:

For GDB:

$ export CFLAGS='-fPIE -fstack-protector -O2 -D_FORTIFY_SOURCE=2'
$ export LDFLAGS='-z relro -z now -z noexecstack -pie -fstack-protector'
$ ./configure --disable-binutils --disable-gas --disable-gprof --disable-ld --disable-gdbserver --with-python --with-sysroot=/usr/linux-k1om-4.7/linux-k1om/ --enable-targets=x86_64-k1om-linux --enable-mic_opcodes --with-expat --program-suffix=-mic

For GDBSERVER:

$ export CFLAGS='-fstack-protector -O2 -D_FORTIFY_SOURCE=2'
$ export LDFLAGS='-z relro -z now -z noexecstack -fstack-protector'
$ ./configure --disable-inprocess-agent --disable-libmcheck --host=x86_64-k1om-linux CC=/usr/linux-k1om-4.7/bin/x86_64-k1om-linux-gcc

Best regards,

Georg Zitzlsberger

0 Kudos
Reply