[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 09/47: Work around requirement that size be non-zero in
From: |
Andy Wingo |
Subject: |
[Guile-commits] 09/47: Work around requirement that size be non-zero in GDB 'open-memory'. |
Date: |
Sun, 22 May 2016 18:23:03 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit 8dcf3c6163bba444cd459d9ffd22cc5f627fe6c8
Author: Mark H Weaver <address@hidden>
Date: Thu Mar 26 22:51:16 2015 -0400
Work around requirement that size be non-zero in GDB 'open-memory'.
* module/system/base/types.scm (memory-port): Handle zero size case
specially.
---
module/system/base/types.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/module/system/base/types.scm b/module/system/base/types.scm
index ea2f3bc..7368171 100644
--- a/module/system/base/types.scm
+++ b/module/system/base/types.scm
@@ -117,8 +117,12 @@ SIZE is omitted, return an unbounded port to the memory at
ADDRESS."
(let ((open (memory-backend-open backend)))
(open address #f)))
((_ backend address size)
- (let ((open (memory-backend-open backend)))
- (open address size)))))
+ (if (zero? size)
+ ;; GDB's 'open-memory' raises an error when size
+ ;; is zero, so we must handle that case specially.
+ (open-bytevector-input-port '#vu8())
+ (let ((open (memory-backend-open backend)))
+ (open address size))))))
(define (get-word port)
"Read a word from PORT and return it as an integer."
- [Guile-commits] 36/47: build: Add SCM_T_OFF_MAX and SCM_T_OFF_MIN to scmconfig.h., (continued)
- [Guile-commits] 36/47: build: Add SCM_T_OFF_MAX and SCM_T_OFF_MIN to scmconfig.h., Andy Wingo, 2016/05/22
- [Guile-commits] 22/47: doc: Add SXPath documentation from sources, Andy Wingo, 2016/05/22
- [Guile-commits] 26/47: docs: Fix external representation of <toplevel-define> in tree-il., Andy Wingo, 2016/05/22
- [Guile-commits] 25/47: web: Fix 'close' method of delimited input ports., Andy Wingo, 2016/05/22
- [Guile-commits] 40/47: http: Test that responses lacking CR/LF are rejected., Andy Wingo, 2016/05/22
- [Guile-commits] 45/47: http: Accept date strings with a leading space for hours., Andy Wingo, 2016/05/22
- [Guile-commits] 46/47: doc: Fix typo in Web documentation., Andy Wingo, 2016/05/22
- [Guile-commits] 44/47: Bump user-visible copyright years to 2016., Andy Wingo, 2016/05/22
- [Guile-commits] 03/47: Implement 'string-utf8-length' and 'scm_c_string_utf8_length'., Andy Wingo, 2016/05/22
- [Guile-commits] 12/47: doc: Update libgc URL., Andy Wingo, 2016/05/22
- [Guile-commits] 09/47: Work around requirement that size be non-zero in GDB 'open-memory'.,
Andy Wingo <=
- [Guile-commits] 07/47: Correct docstring of 'symlink'., Andy Wingo, 2016/05/22
- [Guile-commits] 11/47: Add more R6RS port encoding tests, Andy Wingo, 2016/05/22
- [Guile-commits] 01/47: tests: Use 'pass-if-equal' in web-http chunked encoding tests., Andy Wingo, 2016/05/22
- [Guile-commits] 13/47: Fix typo in manual., Andy Wingo, 2016/05/22
- [Guile-commits] 19/47: Fix uses of 'scm_gc_protect', which does not exist, in the manual., Andy Wingo, 2016/05/22
- [Guile-commits] 21/47: psyntax: Fix bug in match-each+., Andy Wingo, 2016/05/22
- [Guile-commits] 15/47: i18n: Check for non-POSIX strtol_l., Andy Wingo, 2016/05/22
- [Guile-commits] 28/47: i18n: Add new collation test for posterity., Andy Wingo, 2016/05/22
- [Guile-commits] 05/47: tests: Make 'test-guild-compile' more reliable., Andy Wingo, 2016/05/22
- [Guile-commits] 32/47: Remove SIGEV constant definitions., Andy Wingo, 2016/05/22