From: Stephen Adams Date: Sun, 5 Oct 1997 05:44:37 +0000 (+0000) Subject: Changed compuation of pc_in_C: with dynamically loaded libraries, X-Git-Tag: 20090517-FFI~5005 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d20875b2682fac1e0b75f3ba070d49e14e6c578f;p=mit-scheme.git Changed compuation of pc_in_C: with dynamically loaded libraries, there is no guarantee that valid C addressed are bounded above by _etext. --- diff --git a/v7/src/pcsample/pcsample.c b/v7/src/pcsample/pcsample.c index 13fa90066..11ab7023f 100644 --- a/v7/src/pcsample/pcsample.c +++ b/v7/src/pcsample/pcsample.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: pcsample.c,v 1.4 1995/11/19 19:30:17 adams Exp $ +$Id: pcsample.c,v 1.5 1997/10/05 05:44:37 adams Exp $ Copyright (c) 1990-1995 Massachusetts Institute of Technology @@ -467,8 +467,6 @@ DEFUN (find_sigcontext_ptr_pc, (scp, trinfo), pc_in_builtin = (builtin_index != -1); pc_in_utility = (utility_index != -1); - pc_in_C = ( (the_pc <= ((long) (get_etext ()))) - && (!pc_in_builtin)); pc_in_heap = ( (the_pc < ((long) Heap_Top )) && (the_pc >= ((long) Heap_Bottom))); pc_in_constant_space = ( (the_pc < ((long) Free_Constant )) @@ -476,6 +474,12 @@ DEFUN (find_sigcontext_ptr_pc, (scp, trinfo), pc_in_scheme = ( pc_in_heap || pc_in_constant_space || pc_in_builtin); + /* This doesnt work for dynamically loaded libraries, e.g. libc.sl: + pc_in_C = ( (the_pc <= ((long) (get_etext ()))) + && (!pc_in_builtin)); + */ + pc_in_C = ( (!pc_in_scheme) + && (!pc_in_builtin)); pc_in_hyper_space = ( (! pc_in_C ) && (! pc_in_scheme)); }