1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 01:00:20 +02:00

Merge until 81d2e35266 from stable-2.2

This commit is contained in:
Andy Wingo 2017-11-29 21:10:25 +01:00
commit 82b57d113c
3 changed files with 47 additions and 14 deletions

View file

@ -1,7 +1,7 @@
## Process this file with Automake to create Makefile.in
##
## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007,
## 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation, Inc.
## 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017 Free Software Foundation, Inc.
##
## This file is part of GUILE.
##
@ -468,6 +468,13 @@ EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \
install-exec-hook:
rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
## Instantiate a template.
INSTANTIATE = \
$(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
-e 's,[@]pkglibdir[@],$(pkglibdir),g' \
-e 's,[@]GUILE_EFFECTIVE_VERSION[@],$(GUILE_EFFECTIVE_VERSION),g' \
-i
install-data-hook: libguile-2.2-gdb.scm
@$(MKDIR_P) $(DESTDIR)$(libdir)
## We want to install libguile-2.2-gdb.scm as SOMETHING-gdb.scm.
@ -491,7 +498,8 @@ install-data-hook: libguile-2.2-gdb.scm
echo " $(INSTALL_DATA) $< \
$(DESTDIR)$(libdir)/$$libname-gdb.scm"; \
$(INSTALL_DATA) "$<" \
"$(DESTDIR)$(libdir)/$$libname-gdb.scm"
"$(DESTDIR)$(libdir)/$$libname-gdb.scm"; \
$(INSTANTIATE) "$(DESTDIR)$(libdir)/$$libname-gdb.scm"
# Remove the GDB support file and the Info 'dir' file that
# 'install-info' 5.x installs.

View file

@ -1,6 +1,6 @@
;;; GDB debugging support for Guile.
;;;
;;; Copyright 2014, 2015 Free Software Foundation, Inc.
;;; Copyright 2014, 2015, 2017 Free Software Foundation, Inc.
;;;
;;; This program is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
@ -17,7 +17,13 @@
(define-module (guile-gdb)
#:use-module (system base types)
#:use-module (system vm debug)
;; Note: (system vm debug) is 2.2-specific, but GDB might be built
;; with Guile 2.0.
#:autoload (system vm debug) (debug-context-from-image
debug-context-base
find-program-debug-info)
#:use-module ((gdb) #:hide (symbol? frame?))
#:use-module ((gdb) #:select ((symbol? . gdb:symbol?) (frame? . gdb:frame?)))
#:use-module (gdb printing)
@ -40,6 +46,15 @@
;;;
;;; Code:
;; At run time, make sure we load (system base types) from the Guile
;; being debugged rather than from the Guile GDB is linked against.
(set! %load-path
(cons "@pkgdatadir@/@GUILE_EFFECTIVE_VERSION@" %load-path))
(set! %load-compiled-path
(cons "@pkglibdir@/@GUILE_EFFECTIVE_VERSION@/site-ccache" %load-compiled-path))
(reload-module (resolve-module '(system base types)))
(define (type-name-from-descriptor descriptor-array type-number)
"Return the name of the type TYPE-NUMBER as seen in DESCRIPTOR-ARRAY, or #f
if the information is not available."