When GDB Fails

I am trying to configure the gdb debugger in eclipse to join a remote program. Here is the setting I'm using:

For PC development (dev) I use Eclipse Mars on a Windows 7 PC. Eclipse is configured to use the GCC / g ++ cross-compiler and gdb as a remote debugger. I am using Sourcery CodeBench Lite as a development tool on Windows.

  dev> gdb --version
  dev> GNU gdb (Sourcery CodeBench Lite 2014.05-25) 7.7.50.20140217-cvs

The target PC is RHEL 7, where I use gdbserver to remotely debug the application.

  target> gdbserver --version
  target> GNU gdbserver (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
       Copyright (C) 2013 Free Software Foundation, Inc.

I have two debug configurations in eclipse, one for remote debugging and the other for attaching to a remote program running on the target PC. I have no problem debugging my program using a remote debug configuration, however, when I try to connect to a remote program, I get the following error: enter image description here

Here's how I set up my debugger to join a remote application:

enter image description here

enter image description here

I am using the following gdbinit script:

 handle SIG34 nostop noprint pass
 set verbose on
 set sysroot 

I also tried using the same versions of GDB on both sides and got the same result. At the moment I am open to any offer!

+4
source share
1 answer

, , . , , GDB, . , GDB 7.6.1-64.el7. GDB, http://ftp.gnu.org/gnu/gdb/. gdb gdbserver. Gdbserver . , , gdb target/tmp:

target_pc/tmp> gtar -xvf gdb-7.11.tar.gz
target_pc/tmp> cd gdb-7.11 
target_pc/tmp/gdb-7.11> ./configure
target_pc/tmp/gdb-7.11> make 
target_pc/tmpgdb-7.11> cd gdb/gdbserver 
target_pc/tmpgdb-7.11/gdb/gdbserver> ./configure
target_pc/tmpgdb-7.11/gdb/gdbserver> make

make install, gdb gdbserver /usr/bin /bin. gdbserver:

 /usr/bin/gdbserver --remote-debug --multi :8000 

/etc/rc.local, gdbserver linux.

+2

All Articles