迁移至Ubuntu18.04后Eclipse Photon无法自动启动GDBServer求助
Hey there, let's break down why your GDB Server isn't auto-starting in Eclipse Photon on Ubuntu 18.04, and address that question about a possible "immediate exit" new feature first—no, Eclipse Photon doesn't have a default feature that makes GDB Server quit right after starting. This is almost certainly an environment or configuration mismatch from your old Linux Mint/Eclipse 3.8 setup.
1. Verify Your Remote Debug Configuration in Eclipse Photon
First, double-check that your debug setup matches what worked in Eclipse 3.8, since Photon has some UI/configuration tweaks:
- Open Debug Configurations → go to your
C/C++ Remote Applicationprofile. - In the Remote Connection tab: Confirm your SSH connection to the Cortex-A8 target is working (test it manually via terminal first if you haven’t:
ssh your-target-user@target-ip). - In the Main tab: Ensure the
Remote Absolute File Path for C/C++ Applicationpoints to the correct executable on your target, and any launch arguments are valid for your app. - In the Debugger tab → GDB Server Settings:
- Make sure the
GDB Server Commandis the full path to the cross-compiled gdbserver on your target (e.g.,/usr/local/bin/gdbserverfrom your Oselas Toolchain). - Confirm the port number matches what’s set in your host GDB configuration, and that the port isn’t blocked by firewalls on either the host or target.
- Make sure the
2. Test Manual GDB Server Launch via SSH
To rule out Eclipse-specific issues, try launching gdbserver directly from your Ubuntu 18.04 terminal:
ssh your-target-user@target-ip "gdbserver :1234 /path/to/your/remote-app"
- If this fails, you’ll get a direct error message: maybe missing dependencies on the target, incorrect file permissions, a blocked port, or SSH authentication issues (Ubuntu 18.04 uses a newer OpenSSH version than older Mint releases, which might have stricter default settings like disabled password auth).
- If this works, the problem is definitely in your Eclipse configuration, not the target or SSH setup.
3. Check Eclipse’s Error Log for Clues
Eclipse logs almost every debug-related issue—let’s look:
- Go to Window → Show View → Other → search for Error Log under the Debug category.
- Look for entries around the time you tried to launch the debug session: you might see errors like "SSH connection failed", "gdbserver command not found", or "permission denied" that point directly to the problem.
4. Investigate Immediate Exit Scenarios on the Target
If gdbserver is launching but quitting right away (even when you start it manually), check these on your Cortex-A8 target:
- Run
ps aux | grep gdbserverright after launching it to see if it’s actually running. - Check system logs (like
/var/log/syslogordmesg) for any gdbserver-related crash messages—common culprits are missing shared libraries (your Oselas Toolchain’s gdbserver might depend on libraries not present on the target) or architecture mismatches (make sure gdbserver is compiled for Cortex-A8, not x86).
5. Match Old Eclipse 3.8 Configuration Details
Since you’re migrating from Eclipse 3.8, it’s easy to miss a small configuration difference:
- Compare screenshots of your old 3.8 debug setup with Photon’s—pay attention to things like remote connection type (Photon might default to a different SSH provider), GDB executable path (ensure you’re using the Oselas Toolchain’s cross-gdb, not Ubuntu’s default x86 gdb), and any custom launch scripts you might have used in 3.8.
内容的提问来源于stack exchange,提问作者Pierre Begon

