-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Post: GDB Tips and Tricks #9
Conversation
- Added author metadata
Remove extra char
Fixed broken link
Add GDB Tips and Tricks article
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good! I left a few comments.
_drafts/GDB Tips and Tricks.md
Outdated
|
||
This is due to a few factors, some of which are: | ||
|
||
- Limited availability of resources for debugging. For example, some bugs such as memory corruption are very difficult to diagnose using software breakpoints. In those scenarios, you would rely on hardware breakpoints and usually there is a limited number of hardware breakpoints for a specific architecture. This makes debugging complex bugs a challenging task. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't you use watchpoints rather than breakpoints for memory corruption?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I'll update to reflect this.
_drafts/GDB Tips and Tricks.md
Outdated
To do that, open up a Terminal session and type the following: | ||
|
||
```terminal | ||
$ sudo vi /etc/paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an odd choice to me. Why not update the path in .bash_profile
instead?
$ vi ~/.bash_profile
...
export PATH = <Your Folder>/nRF-Command-Line-Tools_9_8_1_OSX/nrfjprog:$PATH
export PATH = <Your Folder>/gcc-arm-none-eabi-7-2017-q4-major/bin:$PATH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update to reflect this.
_drafts/GDB Tips and Tricks.md
Outdated
|
||
```bash | ||
# C flags common to all targets | ||
#CFLAGS += $(OPT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't completely disable optimizations, instead it's easiest to use -Og
or even just -O1
when you're debugging.
Worth adding a line to say all optimization levels will work, but some variables will disappear in higher optimization levels as they get optimized out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I'll make that change.
To start the J-Link GDB Server, run the following command: | ||
|
||
```terminal | ||
$ JLinkGDBServerCL -device nrf52840_xxaa -if swd -port 2331 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to explain that -if swd
selects a SWD interface rather than JTAG. Modern chips all use SWD but older chips may require JTAG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
* mafaneh-gdb-tips-tricks-post: Updates to address comments by @francois
All changes should now be addressed by the latest commits |
This is great! Go ahead and merge it. I'll fix up the image links once its in master. |
I don't think I have necessary permissions to merge it. Or am I missing something? |
Woops, you're right. Done! |
No description provided.