Subject: bug#22772: 25.0.91; Can't run gud-gdb on two instances of the same program

From: Eli Zaretskii <[email-masked]>
Date: Mon, 22 Feb 2016 19:55:40 +0200

> From: Michael Welsh Duggan <[email-masked]>
> Date: Mon, 22 Feb 2016 12:37:20 -0500
> 
> I use M-x gud-gdb, since the MI client doesn't support multipl
> debugger instances (which is sad).

What happens if you try debugging several programs at the same time
using the MI client?  I just tried that in Emacs 25.0.91, and it seems
to work for me; in particular, I see 2 instances of GDB running under
Emacs.  So I wonder what doesn't work for you.

Also, latest versions of GDB support debugging multiple programs
inside the same GDB session; not sure if this helps you.

> This fails, though, since I get the error:
> 
>   gud-common-init: This program is already being debugged
> 
> These programs are installed in different directories, but have the same
> filename.  I can work around this problem by renaming one of the
> executables, but I think this is a bug, since the path to the executable
> could be used to determine uniqueness instead of the filename itself.

I think we should avoid developing gud-gdb if gdb-mi.el provides a
reasonable solution for the same use case.  So let's first try to
figure out of "M-x gdb" could work for you, and try fixing it if it
doesn't.

Thanks.