Discussion:
[Bug cli/21681] New: Provide a way for GDB to conveniently attach to processes by name
simon.marchi at ericsson dot com
2017-06-27 19:50:17 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21681

Bug ID: 21681
Summary: Provide a way for GDB to conveniently attach to
processes by name
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: simon.marchi at ericsson dot com
Target Milestone: ---

lldb allows you to attach to processes by name if there's no ambiguity, I think
that's quite convenient. If there is some ambiguity, it shows you something
like this:

(lldb) attach gdb
error: attach failed: more than one process named gdb:
PID PARENT USER TRIPLE ARGUMENTS
====== ====== ========== ======================== ============================
43851 43820 simark x86_64-apple-macosx ./gdb
43784 43572 simark x86_64-apple-macosx ./gdb
--data-directory=data-directory /Users/simark/test

You can do "attach <name>" on the command line, or you can do "lldb -n <name>"
from the shell.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-15 19:10:33 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21681

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
I like this idea.
The DWIM approach seems good to me but "attach -n" would also be ok.

What I do now is "shell ps ... | grep mumble".
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...