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

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

Re: GUD should disable undo buffer in breakpoins window


From: Nick Roberts
Subject: Re: GUD should disable undo buffer in breakpoins window
Date: Fri, 25 Apr 2008 10:49:22 +1200

willi writes:
 > this is what i got in my messages window:
 > 
 > Warning (undo): Buffer `*breakpoints of o3sis_massSmtp*' undo info was
 > 3000860 bytes long.  The undo info was discarded because it exceeded
 > `undo-outer-limit'.

I'm surprised that the limit is exceeded in the breakpoints buffer first as
the stack buffer normally holds more text in my debug sessions.  In any
case, it doesn't make sense to hold undo information in any of the GDB-UI
buffers so I've committed a change in the CVS repository to disable it.

 > In GNU Emacs 22.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 >  of 2007-10-09 on wxwilli.o3sis.com, modified by Debian

As you're using Emacs 22.1, I attach the diff below.  It's against current
gdb-ui.el so you won't be able to apply it directly but it should show
you where to make changes.  Don't forget to byte compile the file afterwards
otherwise you won't see your changes without loading the .el file explicitly.

It would be helpful if you could use Emacs in CVS as gdb-ui is constantly being
developed and has more features there.  If not, Romain Francoise maintains
a debian package called emacs-snapshot that he updates weekly.

Thanks for the report.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


2008-04-24  Nick Roberts  <nickrob@snap.net.nz>

        (gdb-breakpoints-mode, gdb-frames-mode, gdb-threads-mode)
        (gdb-registers-mode, gdb-memory-mode, gdb-locals-mode)
        (gdb-assembler-mode): Disable undo in these buffers.


*** gdb-ui.el.~1.238.~  2008-04-25 01:38:43.000000000 +1200
--- gdb-ui.el   2008-04-25 10:28:41.000000000 +1200
*************** corresponding to the mode line clicked."
*** 2155,2160 ****
--- 2155,2161 ----
    (setq mode-name "Breakpoints")
    (use-local-map gdb-breakpoints-mode-map)
    (setq buffer-read-only t)
+   (buffer-disable-undo)
    (setq header-line-format gdb-breakpoints-header)
    (run-mode-hooks 'gdb-breakpoints-mode-hook)
    (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
*************** $pc directly from the GUD buffer.  This 
*** 2367,2372 ****
--- 2368,2374 ----
    (add-to-list 'overlay-arrow-variable-list 'gdb-stack-position)
    (setq truncate-lines t)  ;; Make it easier to see overlay arrow.
    (setq buffer-read-only t)
+   (buffer-disable-undo)
    (gdb-thread-identification)
    (use-local-map gdb-frames-mode-map)
    (run-mode-hooks 'gdb-frames-mode-hook)
*************** another GDB command e.g pwd, to see new 
*** 2467,2472 ****
--- 2469,2475 ----
    (setq major-mode 'gdb-threads-mode)
    (setq mode-name "Threads")
    (setq buffer-read-only t)
+   (buffer-disable-undo)
    (setq header-line-format gdb-breakpoints-header)
    (use-local-map gdb-threads-mode-map)
    (set (make-local-variable 'font-lock-defaults)
*************** another GDB command e.g pwd, to see new 
*** 2591,2596 ****
--- 2594,2600 ----
    (setq mode-name "Registers")
    (setq header-line-format gdb-locals-header)
    (setq buffer-read-only t)
+   (buffer-disable-undo)
    (gdb-thread-identification)
    (use-local-map gdb-registers-mode-map)
    (run-mode-hooks 'gdb-registers-mode-hook)
*************** another GDB command e.g pwd, to see new 
*** 2846,2851 ****
--- 2850,2856 ----
    (setq major-mode 'gdb-memory-mode)
    (setq mode-name "Memory")
    (setq buffer-read-only t)
+   (buffer-disable-undo)
    (use-local-map gdb-memory-mode-map)
    (setq header-line-format
        '(:eval
*************** another GDB command e.g pwd, to see new 
*** 3017,3022 ****
--- 3022,3028 ----
    (setq mode-name (concat "Locals:" gdb-selected-frame))
    (use-local-map gdb-locals-mode-map)
    (setq buffer-read-only t)
+   (buffer-disable-undo)
    (setq header-line-format gdb-locals-header)
    (gdb-thread-identification)
    (set (make-local-variable 'font-lock-defaults)
*************** BUFFER nil or omitted means use the curr
*** 3502,3507 ****
--- 3508,3514 ----
    (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position)
    (setq fringes-outside-margins t)
    (setq buffer-read-only t)
+   (buffer-disable-undo)
    (gdb-thread-identification)
    (use-local-map gdb-assembler-mode-map)
    (gdb-invalidate-assembler)




reply via email to

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