-
Notifications
You must be signed in to change notification settings - Fork 48
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
Implement debug command #94
base: master
Are you sure you want to change the base?
Implement debug command #94
Conversation
tockloader/openocd.py
Outdated
return ocd_p | ||
|
||
def _run_gdb_client(self, binary): | ||
gdb_command = f'arm-none-eabi-gdb --exec {binary} --symbols {binary} -eval-command="target remote localhost:3333"' |
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 gdb-multiarch
work just as well here? Otherwise this command only works on arm boards
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.
You're right.
I think gdb-multiarch is not present on a lot of system. People tends to use gdb or arm-none-eabi-gdb.
So, to use the correct gdb, I suggest this:
- Check for "gdb-multiarch" in PATH
- If not in PATH, use gdb or arm-none-eabi-gdb depending on self.arch variable.
Would it be better ?
Thanks
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.
Choosing based on the board arch is fine. Maybe that won't work in all cases, but that is OK for now.
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.
Can you include example usage in the readme?
tockloader/openocd.py
Outdated
return ocd_p | ||
|
||
def _run_gdb_client(self, binary): | ||
gdb_command = f'arm-none-eabi-gdb --exec {binary} --symbols {binary} -eval-command="target remote localhost:3333"' |
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.
Choosing based on the board arch is fine. Maybe that won't work in all cases, but that is OK for now.
Can you include example usage in the readme? |
Hi,
This a command to support the "debug-binary" command in tockloader. This command allows to debug a binary on the board. It does not flash the binary on the board, only runs gdb and load a symbol file.
Since "--debug" would conflict with "debug", it is called "debug-binary". If it's a problem, we could rename "--debug" with "--verbose" to fix this issue.