diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1991-04-24 19:18:42 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1991-04-24 19:18:42 +0000 |
commit | be11d1119afd609de48d162c8dd79e56fa98fe90 (patch) | |
tree | 2bb9774b5c566787d247902e2a15c4f42a122f36 | |
parent | a71d17b1acb54dc98ab80cfdba36e84d56001b1e (diff) | |
download | gdb-be11d1119afd609de48d162c8dd79e56fa98fe90.zip gdb-be11d1119afd609de48d162c8dd79e56fa98fe90.tar.gz gdb-be11d1119afd609de48d162c8dd79e56fa98fe90.tar.bz2 |
* gmalloc.c [!HAVE_GETPAGESIZE]: Try to figure out the pagesize.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rwxr-xr-x | gdb/gmalloc.c | 33 |
2 files changed, 39 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e2a88f1..b2b8d64 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ Wed Apr 24 09:45:17 1991 Jim Kingdon (kingdon at cygint.cygnus.com) + * gmalloc.c [!HAVE_GETPAGESIZE]: Try to figure out the pagesize. + + * infun.c (resume, resume_cleanups): New functions. + (wait_for_inferior, proceed, child_create_inferior): Use resume + not target_resume. + * remote.c (getpkt): Don't set immediate_quit. * blockframe.c, frame.h (reinit_frame_cache): New function. diff --git a/gdb/gmalloc.c b/gdb/gmalloc.c index 0468551..a201e9a 100755 --- a/gdb/gmalloc.c +++ b/gdb/gmalloc.c @@ -1093,6 +1093,39 @@ DEFUN(__default_morecore, (size), ptrdiff_t size) #include <stdlib.h> #endif /* __ONEFILE */ +/* Deal with page size. */ +#ifdef BSD +#ifndef BSD4_1 +#define HAVE_GETPAGESIZE +#endif +#endif + +#ifndef HAVE_GETPAGESIZE + +#include <sys/param.h> + +#if !defined (PAGESIZE) +#ifdef EXEC_PAGESIZE +#define PAGESIZE EXEC_PAGESIZE +#else +#ifdef NBPG +#define PAGESIZE NBPG * CLSIZE +#ifndef CLSIZE +#define CLSIZE 1 +#endif /* no CLSIZE */ +#else /* no NBPG */ +#define PAGESIZE NBPC +#endif /* no NBPG */ +#endif /* no EXEC_PAGESIZE */ +#endif /* no PAGESIZE */ + +size_t +DEFUN_VOID(__getpagesize) +{ + return PAGESIZE; +} +#endif /* not HAVE_GETPAGESIZE */ + extern size_t EXFUN(__getpagesize, (NOARGS)); static size_t pagesize; |