This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: gdbserver with a core file?
- From: "taylor, david" <David dot Taylor at dell dot com>
- To: "paul at mad-scientist dot net" <paul at mad-scientist dot net>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Thu, 1 Mar 2018 13:53:10 +0000
- Subject: RE: gdbserver with a core file?
- Authentication-results: sourceware.org; auth=none
- References: <1519909479.3684.41.camel@mad-scientist.net>
I don't know if anyone has added such functionality to gdbserver; but, with regards to
the problem you're trying to solve -- I've faced similar ones in the past.
If you use emacs, you might consider gud plus a small shell script or two.
I've used in in the past to solve the problem where I have GDB and the executable
remote but sources local.
In emacs, do
M-x gdb
when prompted for how to run gdb, replace gdb with the path to a shell script that
. sets up the local environment (if needed)
. invokes ssh -- something like:
ssh remote-host /path/to/remote/shell/script
where the remote shell script does a cd if needed, creates a gdb init file if appropriate
and / or needed, and then invokes gdb with appropriate arguments.
GDB communicates with Emacs. When you stop / step / next / whatever,
GDB tells Emacs what it needs to know. Sources stay local.