unable to debug with qtcreator a program on BBB running debian

Hi, I’m having problems with linaro-gdb. I’m using debian wheezy on my BBB (build with the script from RobertCNelson)
and have installed Qt on it. QT applications are working on my BBB.

But when I try to debug my local debugger of qtcreator fails with an error message:

“The selected build of GDB does not support Python scripting.It cannot be used in Qt Creator.”

I found out that this is a HOST problem. The gdb of the linaro toolchain (gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux) which I was using to compile everything
seems to be compiled without python support.

~/gdb-linaro-7.6-2013.05/gdb/gdbserver$ /usr/local/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux/bin/arm-linux-gnueabihf-gdb
GNU gdb (crosstool-NG linaro-1.13.1-4.8-2014.03 - Linaro GCC 2014.03) 7.6.1-2013.10
Copyright © 2013 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 “–host=i686-build_pc-linux-gnu --target=arm-linux-gnueabihf”.
For bug reporting instructions, please see:
https://bugs.launchpad.net/gcc-linaro.
(gdb) python printf(“hello world”)
Python scripting is not supported in this copy of GDB.
(gdb)

So I downloaded from https://launchpad.net/gdb-linaro/+download
the latest release of the source files.
I untared the file and cd-ed to ~/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux/gdb/gdbserver.

From this directory I tried to configure using this command:

./configure --host=i686-build_pc-linux-gnu --target=arm-linux-gnueabihf --with-python=/usr/bin/python | tee configurelog.txt

but there is an WARNING message displayed that --with-python is unrecognized

→ configure: WARNING: unrecognized options: --with-python

Can anybody help me with compiling the linaro gdb with python support?

Regards,

Ben

Here is the printout from the configure run:

~/gdb-linaro-7.6-2013.05/gdb/gdbserver$ ./configure --host=i686-build_pc-linux-gnu --target=arm-linux-gnueabihf --with-python=/usrin/python | tee configurelog.txt
configure: WARNING: unrecognized options: --with-python
configure: WARNING: If you wanted to set the --build type, don’t use --host.
If a cross compiler is detected then cross compile mode will be used.
checking whether to enable maintainer-specific portions of Makefiles… no
checking for i686-build_pc-linux-gnu-gcc… no
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking how to run the C preprocessor… gcc -E
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking minix/config.h usability… no
checking minix/config.h presence… no
checking for minix/config.h… no
checking whether it is safe to define EXTENSIONS… yes
checking for special C compiler options needed for large files… no
checking for _FILE_OFFSET_BITS value needed for large files… 64
checking build system type… i686-pc-linux-gnu
checking host system type… i686-build_pc-linux-gnu
checking target system type… arm-unknown-linux-gnueabihf
checking for a BSD-compatible install… /usr/bin/install -c
checking for i686-build_pc-linux-gnu-ranlib… no
checking for ranlib… ranlib
checking for ANSI C header files… (cached) yes
checking for dirent.h that defines DIR… yes
checking for library containing opendir… none required
checking for working alloca.h… yes
checking for alloca… yes
checking dependency style of gcc… gcc3
checking for make… make
checking whether make sets $(MAKE)… yes
=== configuring in build-gnulib-gdbserver (/home/wehnerc/gdb-linaro-7.6-2013.05/gdb/gdbserver/build-gnulib-gdbserver)
configure: running /bin/bash …/./…/gnulib/configure --disable-option-checking ‘–prefix=NONE’ ‘–host=i686-build_pc-linux-gnu’ ‘–target=arm-linux-gnueabihf’ ‘–with-python=/usr/bin/python’ ‘host_alias=i686-build_pc-linux-gnu’ ‘target_alias=arm-linux-gnueabihf’ --cache-file=/dev/null --srcdir=…/./…/gnulib
configure: WARNING: If you wanted to set the --build type, don’t use --host.
If a cross compiler is detected then cross compile mode will be used.
checking whether to enable maintainer-specific portions of Makefiles… no
checking for i686-build_pc-linux-gnu-gcc… no
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking build system type… i686-pc-linux-gnu
checking host system type… i686-build_pc-linux-gnu
checking how to run the C preprocessor… gcc -E
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking minix/config.h usability… no
checking minix/config.h presence… no
checking for minix/config.h… no
checking whether it is safe to define EXTENSIONS… yes
checking for Minix Amsterdam compiler… no
checking for i686-build_pc-linux-gnu-ar… no
checking for ar… ar
checking for i686-build_pc-linux-gnu-ranlib… no
checking for ranlib… ranlib
checking for i686-build_pc-linux-gnu-gcc… gcc
checking whether we are using the GNU C compiler… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for gcc option to accept ISO C89… (cached) none needed
checking target system type… arm-unknown-linux-gnueabihf
checking for working alloca.h… yes
checking for alloca… yes
checking for mbstate_t… yes
checking for btowc… yes
checking for isblank… yes
checking for iswctype… yes
checking for mbsrtowcs… yes
checking for mempcpy… yes
checking for wmemchr… yes
checking for wmemcpy… yes
checking for wmempcpy… yes
checking for symlink… yes
checking for mbsinit… yes
checking for mbrtowc… yes
checking for mprotect… yes
checking for iswcntrl… yes
checking wctype.h usability… yes
checking wctype.h presence… yes
checking for wctype.h… yes
checking wchar.h usability… yes
checking wchar.h presence… yes
checking for wchar.h… yes
checking for stdint.h… (cached) yes
checking for inttypes.h… (cached) yes
checking for unistd.h… (cached) yes
checking sys/mman.h usability… yes
checking sys/mman.h presence… yes
checking for sys/mman.h… yes
checking features.h usability… yes
checking features.h presence… yes
checking for features.h… yes
checking for unsigned long long int… yes
checking for long long int… yes
checking whether the preprocessor supports include_next… yes
checking whether system header files limit the line length… no
checking whether stdint.h conforms to C99… yes
checking whether imaxabs is declared without a macro… yes
checking whether imaxdiv is declared without a macro… yes
checking whether strtoimax is declared without a macro… yes
checking whether strtoumax is declared without a macro… yes
checking for inttypes.h… (cached) yes
checking whether the inttypes.h PRIxNN macros are broken… no
checking for nl_langinfo and CODESET… yes
checking for working fcntl.h… yes
checking whether getc_unlocked is declared… yes
checking whether we are using the GNU C Library >= 2.1 or uClibc… yes
checking for a traditional japanese locale… none
checking for a transitional chinese locale… none
checking for a french Unicode locale… none
checking for a traditional french locale… none
checking for mmap… yes
checking for MAP_ANONYMOUS… yes
checking whether memchr works… yes
checking whether memmem is declared… yes
checking for memmem… yes
checking whether memmem works… yes
checking for stdbool.h that conforms to C99… yes
checking for _Bool… yes
checking for wchar_t… yes
checking for C/C++ restrict keyword… __restrict
checking whether ffsl is declared without a macro… yes
checking whether ffsll is declared without a macro… yes
checking whether memmem is declared without a macro… yes
checking whether mempcpy is declared without a macro… yes
checking whether memrchr is declared without a macro… yes
checking whether rawmemchr is declared without a macro… yes
checking whether stpcpy is declared without a macro… yes
checking whether stpncpy is declared without a macro… yes
checking whether strchrnul is declared without a macro… yes
checking whether strdup is declared without a macro… yes
checking whether strncat is declared without a macro… yes
checking whether strndup is declared without a macro… yes
checking whether strnlen is declared without a macro… yes
checking whether strpbrk is declared without a macro… yes
checking whether strsep is declared without a macro… yes
checking whether strcasestr is declared without a macro… yes
checking whether strtok_r is declared without a macro… yes
checking whether strerror_r is declared without a macro… yes
checking whether strsignal is declared without a macro… yes
checking whether strverscmp is declared without a macro… yes
checking whether <wchar.h> uses ‘inline’ correctly… yes
checking for wint_t… yes
checking for alloca as a compiler built-in… yes
checking for working GNU fnmatch… yes
checking whether INT32_MAX < INTMAX_MAX… yes
checking whether INT64_MAX == LONG_MAX… no
checking whether UINT32_MAX < UINTMAX_MAX… yes
checking whether UINT64_MAX == ULONG_MAX… no
checking whether mbrtowc handles incomplete characters… guessing yes
checking whether mbrtowc works as well as mbtowc… guessing yes
checking whether mbrtowc handles a NULL pwc argument… guessing yes
checking whether mbrtowc handles a NULL string argument… guessing yes
checking whether mbrtowc has a correct return value… guessing yes
checking whether mbrtowc returns 0 when parsing a NUL character… guessing yes
checking whether mbrtowc handles incomplete characters… (cached) guessing yes
checking whether mbrtowc works as well as mbtowc… (cached) guessing yes
checking whether mbrtowc handles incomplete characters… (cached) guessing yes
checking whether mbrtowc works as well as mbtowc… (cached) guessing yes
checking whether mbsrtowcs works… guessing yes
checking whether memmem works in linear time… yes
checking for memmem… (cached) yes
checking whether memmem works… (cached) yes
checking whether NULL can be used in arbitrary expressions… yes
checking whether btowc is declared without a macro… yes
checking whether wctob is declared without a macro… yes
checking whether mbsinit is declared without a macro… yes
checking whether mbrtowc is declared without a macro… yes
checking whether mbrlen is declared without a macro… yes
checking whether mbsrtowcs is declared without a macro… yes
checking whether mbsnrtowcs is declared without a macro… yes
checking whether wcrtomb is declared without a macro… yes
checking whether wcsrtombs is declared without a macro… yes
checking whether wcsnrtombs is declared without a macro… yes
checking whether wcwidth is declared without a macro… yes
checking whether wmemchr is declared without a macro… yes
checking whether wmemcmp is declared without a macro… yes
checking whether wmemcpy is declared without a macro… yes
checking whether wmemmove is declared without a macro… yes
checking whether wmemset is declared without a macro… yes
checking whether wcslen is declared without a macro… yes
checking whether wcsnlen is declared without a macro… yes
checking whether wcscpy is declared without a macro… yes
checking whether wcpcpy is declared without a macro… yes
checking whether wcsncpy is declared without a macro… yes
checking whether wcpncpy is declared without a macro… yes
checking whether wcscat is declared without a macro… yes
checking whether wcsncat is declared without a macro… yes
checking whether wcscmp is declared without a macro… yes
checking whether wcsncmp is declared without a macro… yes
checking whether wcscasecmp is declared without a macro… yes
checking whether wcsncasecmp is declared without a macro… yes
checking whether wcscoll is declared without a macro… yes
checking whether wcsxfrm is declared without a macro… yes
checking whether wcsdup is declared without a macro… yes
checking whether wcschr is declared without a macro… yes
checking whether wcsrchr is declared without a macro… yes
checking whether wcscspn is declared without a macro… yes
checking whether wcsspn is declared without a macro… yes
checking whether wcspbrk is declared without a macro… yes
checking whether wcsstr is declared without a macro… yes
checking whether wcstok is declared without a macro… yes
checking whether wcswidth is declared without a macro… yes
checking whether iswcntrl works… yes
checking for towlower… yes
checking for wctype_t… yes
checking for wctrans_t… yes
checking whether wctype is declared without a macro… yes
checking whether iswctype is declared without a macro… yes
checking whether wctrans is declared without a macro… yes
checking whether towctrans is declared without a macro… yes
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking for style of include used by make… GNU
checking dependency style of gcc… gcc3
checking whether ln -s works… yes
checking for i686-build_pc-linux-gnu-ranlib… ranlib
checking for i686-build_pc-linux-gnu-ar… ar
configure: creating ./config.status
config.status: creating Makefile
config.status: creating import/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default commands
checking sgtty.h usability… yes
checking sgtty.h presence… yes
checking for sgtty.h… yes
checking termio.h usability… yes
checking termio.h presence… yes
checking for termio.h… yes
checking termios.h usability… yes
checking termios.h presence… yes
checking for termios.h… yes
checking sys/reg.h usability… yes
checking sys/reg.h presence… yes
checking for sys/reg.h… yes
checking for string.h… (cached) yes
checking proc_service.h usability… no
checking proc_service.h presence… no
checking for proc_service.h… no
checking sys/procfs.h usability… yes
checking sys/procfs.h presence… yes
checking for sys/procfs.h… yes
checking thread_db.h usability… yes
checking thread_db.h presence… yes
checking for thread_db.h… yes
checking linux/elf.h usability… yes
checking linux/elf.h presence… yes
checking for linux/elf.h… yes
checking for stdlib.h… (cached) yes
checking for unistd.h… (cached) yes
checking errno.h usability… yes
checking errno.h presence… yes
checking for errno.h… yes
checking fcntl.h usability… yes
checking fcntl.h presence… yes
checking for fcntl.h… yes
checking signal.h usability… yes
checking signal.h presence… yes
checking for signal.h… yes
checking sys/file.h usability… yes
checking sys/file.h presence… yes
checking for sys/file.h… yes
checking malloc.h usability… yes
checking malloc.h presence… yes
checking for malloc.h… yes
checking sys/ioctl.h usability… yes
checking sys/ioctl.h presence… yes
checking for sys/ioctl.h… yes
checking netinet/in.h usability… yes
checking netinet/in.h presence… yes
checking for netinet/in.h… yes
checking sys/socket.h usability… yes
checking sys/socket.h presence… yes
checking for sys/socket.h… yes
checking netdb.h usability… yes
checking netdb.h presence… yes
checking for netdb.h… yes
checking netinet/tcp.h usability… yes
checking netinet/tcp.h presence… yes
checking for netinet/tcp.h… yes
checking arpa/inet.h usability… yes
checking arpa/inet.h presence… yes
checking for arpa/inet.h… yes
checking sys/wait.h usability… yes
checking sys/wait.h presence… yes
checking for sys/wait.h… yes
checking wait.h usability… yes
checking wait.h presence… yes
checking for wait.h… yes
checking sys/un.h usability… yes
checking sys/un.h presence… yes
checking for sys/un.h… yes
checking linux/perf_event.h usability… yes
checking linux/perf_event.h presence… yes
checking for linux/perf_event.h… yes
checking for pread… yes
checking for pwrite… yes
checking for pread64… yes
checking for readlink… yes
checking for vasprintf… yes
checking for vsnprintf… yes
checking for ust… no
checking compiler warning flags… -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body -Werror
checking for dladdr… yes
checking for errno… yes - in errno.h
checking whether strerror is declared… yes
checking whether strstr is declared… yes
checking whether perror is declared… yes
checking whether vasprintf is declared… yes
checking whether vsnprintf is declared… yes
checking for socklen_t… yes
checking for Elf32_auxv_t… yes
checking for Elf64_auxv_t… yes
checking for PTRACE_GETREGS… yes
checking for PTRACE_GETFPXREGS… yes
checking for lwpid_t in sys/procfs.h… yes
checking for psaddr_t in sys/procfs.h… yes
checking for prgregset_t in sys/procfs.h… yes
checking for elf_fpregset_t in sys/procfs.h… yes
checking for dlopen in -ldl… yes
checking for the dynamic export flag… -Wl,–dynamic-list
checking for TD_VERSION… yes
checking whether the target supports _sync*_compare_and_swap… yes
checking whether ADDR_NO_RANDOMIZE is declared… yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depdir commands
mkdir -p – .deps
config.status: executing default commands
configure: WARNING: unrecognized options: --with-python

Not sure how applicable this is… I do see that python-dev is installed in this tutorial, not sure what the exact package would be in Ubuntu. Running ./configure --help is typically helpful to me. Getting the “unrecognized options:” error would imply to me that the option has changed or is being pass incorrectly to configure. Mike

Are you sure that you need gdb-server with python? It seems that python support in host gdb itself is enough for remote debugging in Qt Creator. I’ve recently had such a problem and building gdb with python support on host solved it.

I was solve this problem installing gdb-multiarch and setting debug path in /usr/bin/gdb-multiarch.

try to fix It