You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/09/01 02:11:43 UTC

[GitHub] [incubator-nuttx] masayuki2009 opened a new pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

masayuki2009 opened a new pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684


   ## Summary
   
   - This commit enables nuttx thread debugging without openocd-nuttx
   - To use this script, gdb must support python
   - To show all thread, use 'info_nxthreads'
   - To switch thread, use 'nxthread pid'
   - To continue, use 'nxcontinue'
   
   ## Impact
   
   - No impact
   
   ## Testing
   
   - Tested with spresense (Cortex-M4F), sim (x86_64), lm3s6965-ek (Cortex-M3)
   - Tested with GNU Tools for Arm Embedded Processors 9-2019-q4-major
   - Tested with GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-685043959


   > 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.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-690235131


   > Hi @acassis,
   > 
   > Should I rename .nuttx-gdbinit to nuttx-gdbinit so that it can be merged?
   
   Thank you @masayuki2009 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-689966092


   > Yes, I think it is preferable.
   
   @v01d 
   
   OK. I will rename the file name and push it later.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] v01d commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-685176953


   I'd prefer to create a local symbolic link from .nuttx-gdbinit to tools/nuttx-gdbinit if needed, so that is easier to discover.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-689962270


   Hi @acassis,
   
   Should I rename .nuttx-gdbinit to nuttx-gdbinit so that it can be merged?
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-689978201


   I pushed the file with -f.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] v01d commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-689962507


   Yes, I think it is preferable.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] adamfeuer commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
adamfeuer commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-684956864


   @masayuki2009 Thanks for this. I will test on SAMA5 today.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
jerpelea commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-684502331


   LGTM


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea merged pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
jerpelea merged pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] v01d commented on pull request #1684: tools: Add .nuttx-gdbinit for nuttx thread debugging

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #1684:
URL: https://github.com/apache/incubator-nuttx/pull/1684#issuecomment-684877328


   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.


----------------------------------------------------------------
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:
users@infra.apache.org