emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 16 Jan 2020 10:04:00 -0500


> I'm back working on gdb. This time I fixed a issue where gdb opens more than one window to display source
> code. By the design of gdb-mi, it should only have one source window.

Thanks, can you show a use case where such a problem happens?

Yes, basically any program with more than one source file and a large screen (display-buffer will reuse window if there aren't enough space).

A minimal setup:

a.c:

int f1(int a) {
    return a + 1;
}

b.c:

#include "a.c"

int main() {
    int b = f1(1);
    int c = 0;
    return b + c;
}

Steps:
- M-x gdb
- b main
- r
- s (many times)

And when you step into f1 which is in a.c, gdb opens another window to display it (again, if your screen is large enough).

BTW, I say "by design gdb uses a single source window" because gdb-display-source-window is written that way.

Yuan

Attachment: b.c
Description: Text Data

Attachment: a.c
Description: Text Data


reply via email to

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