emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master f5eac7b: (ydump-buffer): Handle case where gap is a


From: Noah Friedman
Subject: [Emacs-diffs] master f5eac7b: (ydump-buffer): Handle case where gap is at the start of buffer.
Date: Tue, 10 Nov 2015 01:34:47 +0000

branch: master
commit f5eac7baefacd8944a1851596a944fd29dec98fa
Author: Noah Friedman <address@hidden>
Commit: Noah Friedman <address@hidden>

    (ydump-buffer): Handle case where gap is at the start of buffer.
    I don't recall if older versions of gdb were less strict but you
    cannot dump a 0-length range in gdb 7.9.1.
---
 etc/emacs-buffer.gdb |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/etc/emacs-buffer.gdb b/etc/emacs-buffer.gdb
index cdcb666..8f6c321 100644
--- a/etc/emacs-buffer.gdb
+++ b/etc/emacs-buffer.gdb
@@ -33,7 +33,7 @@
 # 'ysave-buffer', and 'ybuffer-contents'.  The 'y' prefix avoids any
 # namespace collisions with emacs/src/.gdbinit.
 
-# Since the internal data structures in Emacs occasionally from time to
+# Since the internal data structures in Emacs change from time to
 # time, you should use the version of this file that came with your
 # particular Emacs version; older versions might not work anymore.
 
@@ -213,8 +213,12 @@ define ydump-buffer
       set $endptr = $beg + $buf->gpt_byte - 1
       dump binary memory $arg1 $beg $endptr
     else
-      dump   binary memory $arg1 $beg $gap-1
-      append binary memory $arg1 $gap_end $end
+      if $gap - $beg > 1
+        dump   binary memory $arg1 $beg $gap-1
+        append binary memory $arg1 $gap_end $end
+      else
+        dump   binary memory $arg1 $gap_end $end
+      end
       set $endptr = $end
     end
   end



reply via email to

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