I am trying to setup the gdb debugger in eclipse to attach to a remote program. Here is the setup that I am using:
For the development PC (dev), I am using Eclipse Mars on a Windows 7 PC. Eclipse is set to use the GCC/G++ cross compiler and gdb as the remote debugger. I am using Sourcery CodeBench Lite as the development tool in windows.
dev> gdb --version
dev> GNU gdb (Sourcery CodeBench Lite 2014.05-25) 7.7.50.20140217-cvs
The target PC is a RHEL 7, where I use gdbserver so that I can debug my application remotely.
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 configuration in eclipse, one for remote debug and another for attaching to a remote program that is running in target PC. I have no problem debugging my program using the remote debug configuration, however, when I try to attach to the remote program, I get the following error:
Here is how I set up my debugger to attach to a remote application:
I use the following gdbinit script:
handle SIG34 nostop noprint pass
set verbose on
set sysroot
I have also tried using the same GDB versions on both sides and got the same result. At this point, I am open to any suggestion!