diff options
author | Gary Benson <gbenson@redhat.com> | 2015-04-17 09:47:30 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2015-04-17 09:47:30 +0100 |
commit | a10de6046fbd50e99742af428a815dcd94e2fba8 (patch) | |
tree | 86cf6669c963b4a71d35b3f92591698e7ade8ee0 /gdb/gdbcore.h | |
parent | 92209ddfdc725c51d0368716ee316193deb24e8a (diff) | |
download | fsf-binutils-gdb-a10de6046fbd50e99742af428a815dcd94e2fba8.zip fsf-binutils-gdb-a10de6046fbd50e99742af428a815dcd94e2fba8.tar.gz fsf-binutils-gdb-a10de6046fbd50e99742af428a815dcd94e2fba8.tar.bz2 |
Introduce exec_file_locate_attach
This commit adds a new function, exec_file_locate_attach, which works
like exec_file_attach except that, instead of a filename argument, it
takes an integer process ID and attempts to determine the executable
filename from that.
gdb/ChangeLog:
* gdbcore.h (exec_file_locate_attach): New declaration.
* exec.c (exec_file_locate_attach): New function, factored
out from...
* infcmd.c (attach_command_post_wait): ...here.
Diffstat (limited to 'gdb/gdbcore.h')
-rw-r--r-- | gdb/gdbcore.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h index 63a75f0..a437c8a 100644 --- a/gdb/gdbcore.h +++ b/gdb/gdbcore.h @@ -150,6 +150,13 @@ extern void core_file_command (char *filename, int from_tty); extern void exec_file_attach (const char *filename, int from_tty); +/* If the filename of the main executable is unknown, attempt to + determine it. If a filename is determined, proceed as though + it was just specified with the "file" command. Do nothing if + the filename of the main executable is already known. */ + +extern void exec_file_locate_attach (int pid, int from_tty); + extern void exec_file_clear (int from_tty); extern void validate_files (void); |