help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to debug/gdb emacs/runemacs in windows?


From: Shuguang Sun
Subject: Re: How to debug/gdb emacs/runemacs in windows?
Date: Fri, 24 May 2019 09:26:35 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Shuguang Sun <shuguang79@qq.com>
>> Date: Thu, 23 May 2019 16:15:56 +0800
>> 
>> (gdb) run --dump-file 
>> "c:/Users/username/HOME/.emacs.d/var/dumps/semacs.pdmp" --force-dump
>> Starting program: C:\Users\username\emacs\bin\emacs.exe --dump-file
>> "c:/Users/username/HOME/.emacs.d/var/dumps/semacs.pdmp" --force-dump
>
> What is the --force-dump option?  I don't think we have it in Emacs.
>

The --force-dump option is speficed in my dot emacs. It helps to skip
requiring some libraries or evaluating some piece of code in case of
dumpted emacs which has been evaluted during dumping, but not in normal
emacs.

--8<---------------cut here---------------start------------->8---
(defun --my-parse-command-line (args)
  "Handle specific command line arguments."
  (let ((i 0) new-args)
    (while (< i (length args))
      (let ((arg (nth i args))
            (next-arg-digit
             (when (< (1+ i) (length args))
               (string-to-number (nth (1+ i) args)))))
        (when (or (null next-arg-digit) (= 0 next-arg-digit))
          (setq next-arg-digit nil))
        (pcase arg
          ("--force-dump"
           (setq --is-not-dumped nil))
          (_ (push arg new-args))))
      (setq i (1+ i)))
    (nreverse new-args)))

(setq command-line-args (--my-parse-command-line command-line-args))
--8<---------------cut here---------------end--------------->8---


>> 
>> How could I find more information?
>
>
> One thing to try is to load the src/.gdbinit file from the Emacs
> distribution before you issue the "run" command, it might help you by
> stopping Emacs earlier, before it does something that destroys the
> stack.  If that doesn't work, put a breakpoint inside some function
> that recentf-edit-list calls, like Fformat perhaps, invoke
> recentf-edit-list, then step through the code until you see where it
> crashes.
>
> (The above is based on incomplete information, because you didn't
> explain how recentf-edit-list is called, and what exactly is in your
> private pdumper file.)
>
>

Thanks for your patient and helpful reply. I'll try it later.



-- 
Best Regards
Shuguang Sun





reply via email to

[Prev in Thread] Current Thread [Next in Thread]