-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add find and debug function #30
base: master
Are you sure you want to change the base?
Conversation
ros.el
Outdated
"Search for, then launch a ROS2 node in GDB mode." | ||
(interactive) | ||
(if (eq (ros-current-version) 1) (error "Debug does not currently support ros1") | ||
(let* ((lib-path (ros-shell-command-to-string "env | grep LD_LIBRARY_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.
maybe rather do echo $LD_LIBRARY_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.
An echo would be more elegant, however the output gets cut by the sed in 'ros-shell-command-to-string (I don't understand why) and I figured the env | grep was less intrusive than modifying the expression, or creating a duplicate shell command function.
Thanks for this proposal, this definitely sounds like a good idea, I will try if I can also find a way for an ROS1 implementation |
Awesome! Since you're interested, I'll extend this for ROS1. Off the top of my head I know you can search nodelets with: |
Will check current ros version, using the corresponding ros-find-debug-executable() function. Works for both nodes and nodelets, presenting both to the user without additional intervention.
Added the ros1 debug function. Works well on my machine with a test ros1 workspace (msckf_vio) with both nodes and nodelets. GDB finding a source file for a Nodelet requires a *.so load at runtime, so you'll need to throw a blind breakpoint on first run ("b onInit()" is a safe bet). I am very new to lisp, so let me know if there is anything that should be cleaned. |
@mbeutelspacher Friendly ping. |
Bring up to date with head repo
Prevent colcon from surgically inserting build/install folders throughout my workspace. Instead, simply cd to workspace for compilation.
I ran into a few issues with certain packages, notably sub-packages not being identified by ros-list-packages. Fix is to use ros2 list executables, trimming the output and using that as the pipe to gdb.
Allow the user to repeat the last gdb command, instead of having to re-select the package, etc. Bound to _l_.
Attempting to justify the fork.
Sometimes, people (me) will create an executable with the same name as its package. Handle appropriately.
stealing latest updates.
G'day,
This PR adds a simple debug head to the hydra, allowing a user to easily run a ros2 node through emacs-gdb. Works for local, and remote work-spaces through Tramp, including through a remote docker instance.
I would like to extend the hydra with more options, but I wanted to gauge your thoughts on this before getting too far into it.