help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using gdb (windows popping up)


From: Eli Zaretskii
Subject: Re: Using gdb (windows popping up)
Date: Sun, 09 Jun 2019 21:31:47 +0300

> Date: Sun, 9 Jun 2019 11:52:46 -0400
> From: jonetsu <jonetsu@teksavvy.com>
> 
> The gdb session starts (M-x gdb) with on the left gdb and on the right
> the source.  In the source a breakpoint can be placed in the margin.
> All fine, looks very good...
> 
> ... until the debugging session starts.  At which point emacs decides
> to create a new whole emacs app/window with the source code in it.  It
> boldly replaces the source window with the debugged app's output window
> and throws the source into a new emacs instance.
> 
> But the source code was already displayed and a breakpoint was set in
> it showing that it is active and linked to gdb.  Why do that ?  If you
> really want to show the output window, why not split the gdb window ?
> Or maybe totally forget about the output window until the user wants
> it ?  

"M-x gdb" works with dedicated windows, my suggestion is not to fight
it wrt windows.  If you want to display your own windows, do so in
another frame.

Alternatively, after "M-x gdb" type "start ARGUMENTS" to start the
program and stop it at the entry to the main function.  Then set your
breakpoints after switching to the source file you want in the window
where Emacs shows the file with the main function.

As yet another alternative, customize gdb-show-main to a non-nil
value, and then "M-x gdb" will automatically show the source file with
the main function in a window; switch in that window to your other
source file where you want to set a breakpoint, then start the
program.

HTH



reply via email to

[Prev in Thread] Current Thread [Next in Thread]