diff options
author | Eli Zaretskii <eliz@gnu.org> | 2019-01-26 12:08:56 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2019-01-26 12:08:56 +0200 |
commit | a7974933dd818194de3c9387b95dbd122bcf506c (patch) | |
tree | 313d57e1561420c541114795150193c4c199570b /src/pdumper.h | |
parent | bf4099b23738f0a481fb6020337039d84506fda4 (diff) | |
download | emacs-a7974933dd818194de3c9387b95dbd122bcf506c.tar.gz |
Improve pdump file search and 'pdumper-stats'
* src/pdumper.c (pdumper_record_wd): New function.
(pdumper_load): Use xstrdup instead of strdup, as on
MS-Windows the latter uses the wrong heap. Don't free a
NULL pointer.
* src/emacs.c (load_pdump): Support the use case where the
Emacs binary was renamed: look in exec-directory for the
pdump file whose base name is derived from the Emacs binary,
in addition to just emacs.pdmp.
(main): Call pdumper_record_wd to prepend CWD to the pdump
file name.
* src/fileio.c (file_name_absolute_p): Now extern.
* src/lisp.h (file_name_absolute_p): Add prototype.
* src/pdumper.h (pdumper_record_wd): Add prototype.
* doc/emacs/cmdargs.texi (Initial Options): Update the
documentation of where Emacs looks for the dump file.
Diffstat (limited to 'src/pdumper.h')
-rw-r--r-- | src/pdumper.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pdumper.h b/src/pdumper.h index 7b52c64b974..90c744f0a4e 100644 --- a/src/pdumper.h +++ b/src/pdumper.h @@ -260,6 +260,10 @@ pdumper_clear_marks (void) and execution should resume. */ bool pdumper_handle_page_fault (void *fault_addr_ptr); +/* Record the Emacs startup directory, relative to which the pdump + file was loaded. */ +extern void pdumper_record_wd (const char *); + void syms_of_pdumper (void); INLINE_HEADER_END |