masayuki2009 commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-685175558


   > > Great, thanks! I will try it next time I need to debug NuttX.
   > > By the way, wouldn't it be better to not use '.' in the name? Otherwise 
no one will know of its existence unless they go looking for hidden files.
   > 
   > +1 @masayuki2009 it is better to keep it as "nuttx-gdbinit" and include 
comments instructions at the header to copy it to ~/.gdbinit to get it loaded 
automatically to debug the NuttX.
   
   Hi, @v01d @acassis,
   
   Thanks for your feedback.
   
   The reason why I choose the name '.nuttx-gdbinit' instead of 
'nuttex-gdbinit' is that the Emacs understand gdb scripts by the following 
rules. 
   
   ```
   ;;; gud.el --- Grand Unified Debugger mode for running GDB and other 
debuggers
   ...
   ...
   ;; Besides .gdbinit, gdb documents other names to be usable for init
   ;; files, cross-debuggers can use something like
   ;; .PROCESSORNAME-gdbinit so that the host and target gdbinit files
   ;; don't interfere with each other.
   ;;;###autoload
   (add-to-list 'auto-mode-alist '("/\\.[a-z0-9-]*gdbinit" . gdb-script-mode))
   ```
   
   Of course, we can add a new rule to our .emacs to let the Emacs know that 
'nuttx-gdbinit' is a gdb script.
   But I thought we should conform to the default rules.
   
   Another reason why I do not want to copy '.nuttx-gdbinit' to .gdbinit is 
that I do not modify existing .gdbinit.
   Actually, they can coexist. So, please try the script with your own .gdbinit.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to