[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extend gdb to filter registers
From: |
Yuan Fu |
Subject: |
Re: Extend gdb to filter registers |
Date: |
Tue, 21 Jan 2020 20:50:46 -0500 |
>> So it seems the intension is to display source in new window, not using only
>> one window as I originally
>> thought. I’d like to simplify it, put the decision logic into one place. And
>> then we can add customizability to it.
>
> Thanks, sounds like a good plan to me.
Here is my first attempt. I make every function that needs to display a source
buffer (only 2: gdb-goto-breakpoint, gud-display-line) use
gdb-display-source-buffer. Previously they either use (or
gdb-display-source-buffer display-buffer) or use (display-buffer).
Gdb-mi.el used to have a variable gdb-source-window, I changed it to
gdb-source-window-list. And now reusing a window is as simple as looking at
this list of windows. (No need to check for last-last-frame, etc).
I added a variable for maximum number of windows used for source buffer. Right
now the simple logic is to open as much windows as possible until the max is
reached, then we start to reuse windows. Creating new window uses
display-buffer-pop-up-window (I use this function just for completeness, I
would modify this part when adding customization, maybe let user customize
action for display-buffer?)
Overall this patch doesn’t change the behavior except 1) new window/not is now
determined by gdb-maximum-source-window-count instead of display-buffer 2) now
gud also uses gdb’s display function, so there is no check for gdb-mi vs gud
anymore
You’ll also notice that, when you quit, all the source windows are left
undeleted. That’s the original behavior and I have another patch that restores
the old window configuration the user have before starting gdb. So I didn’t do
anything about that.
If you think this patch is fine, I’ll do these next: 1) add a straightforward
customization, preferably only one variable. 2) currently gdb opens windows
everywhere, I want to make it open in only one continues area and maybe balance
windows. Do you think this is worth doing? Or it is suffice to let user
customize the display-buffer action?
Yuan
simplify.patch
Description: Binary data
- Re: Extend gdb to filter registers, (continued)
- Re: Extend gdb to filter registers, martin rudalics, 2020/01/18
- Re: Extend gdb to filter registers, Eli Zaretskii, 2020/01/19
- Re: Extend gdb to filter registers, Yuan Fu, 2020/01/19
- Re: Extend gdb to filter registers, Eli Zaretskii, 2020/01/19
- Re: Extend gdb to filter registers, Yuan Fu, 2020/01/19
- Re: Extend gdb to filter registers, Eli Zaretskii, 2020/01/19
- Re: Extend gdb to filter registers, Yuan Fu, 2020/01/19
- Re: Extend gdb to filter registers, Eli Zaretskii, 2020/01/19
- Re: Extend gdb to filter registers, Yuan Fu, 2020/01/19
- Re: Extend gdb to filter registers, Eli Zaretskii, 2020/01/20
- Re: Extend gdb to filter registers,
Yuan Fu <=
- Re: Extend gdb to filter registers, Eli Zaretskii, 2020/01/24
- Re: Extend gdb to filter registers, Yuan Fu, 2020/01/24
- Re: Extend gdb to filter registers, John Yates, 2020/01/24
- Re: Extend gdb to filter registers, Eli Zaretskii, 2020/01/25
- Re: Extend gdb to filter registers, John Yates, 2020/01/25
- Re: Extend gdb to filter registers, Eli Zaretskii, 2020/01/25
- Re: Extend gdb to filter registers, martin rudalics, 2020/01/25
- Re: Extend gdb to filter registers, John Yates, 2020/01/25
- Re: Extend gdb to filter registers, martin rudalics, 2020/01/25
- Re: Extend gdb to filter registers, John Yates, 2020/01/25