From 9db29b17474d68f6e1cdf4d384a993a106afaa33 Mon Sep 17 00:00:00 2001 From: "J.T. Conklin" Date: Wed, 16 Nov 1994 19:11:53 +0000 Subject: [PATCH] * config/powerpc/gdbserve.mt (TDEPFILES): Removed fake_aio.o * nlm/gdbserve.c: Include before other NetWare headers. * nlm/alpha.c: Likewise. * nlm/ppc.c: Likewise. * nlm/ppc.c (strtol): Removed, it is provided by NetWare C Library. (StopBell): New function (stubbed out). --- gdb/ChangeLog | 10 ++ gdb/config/powerpc/gdbserve.mt | 2 +- gdb/nlm/alpha.c | 2 + gdb/nlm/gdbserve.c | 5 +- gdb/nlm/gdbserve.def | 2 +- gdb/nlm/ppc.c | 163 +-------------------------------- 6 files changed, 22 insertions(+), 162 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e9e7f1fe50e..47a640badcf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +Wed Nov 16 10:31:27 1994 J.T. Conklin (jtc@cygnus.com) + + * config/powerpc/gdbserve.mt (TDEPFILES): Removed fake_aio.o + + * nlm/gdbserve.c: Include before other NetWare headers. + * nlm/ppc.c: Likewise. + + * nlm/ppc.c (strtol): Removed, it is provided by NetWare C Library. + (StopBell): New function (stubbed out). + Wed Nov 16 00:12:21 1994 Jeff Law (law@snake.cs.utah.edu) * hppa-tdep.c (skip_trampoline_code): Handle shared library import diff --git a/gdb/config/powerpc/gdbserve.mt b/gdb/config/powerpc/gdbserve.mt index 1a9c0f44cf3..77284077db6 100644 --- a/gdb/config/powerpc/gdbserve.mt +++ b/gdb/config/powerpc/gdbserve.mt @@ -1,3 +1,3 @@ # Target: GDBSERVE.NLM running on a Power-PC -TDEPFILES= ppc.o fake_aio.o +TDEPFILES= ppc.o CPU_FILE= ppc diff --git a/gdb/nlm/alpha.c b/gdb/nlm/alpha.c index ab6bd901496..3c027afc7b2 100644 --- a/gdb/nlm/alpha.c +++ b/gdb/nlm/alpha.c @@ -3,6 +3,8 @@ #include #include #include + +#include #include #include #include diff --git a/gdb/nlm/gdbserve.c b/gdb/nlm/gdbserve.c index 481bee0e0ad..483885a3c71 100644 --- a/gdb/nlm/gdbserve.c +++ b/gdb/nlm/gdbserve.c @@ -72,21 +72,22 @@ #include #include -#if defined(__netware__) && defined(__i386__) +#ifdef __i386__ #include #include #include #include #include #else +#include #include #include #include #include #include #endif -#include +#include #include "cpu.h" diff --git a/gdb/nlm/gdbserve.def b/gdb/nlm/gdbserve.def index cbf8ab642ca..e6d72d467d9 100644 --- a/gdb/nlm/gdbserve.def +++ b/gdb/nlm/gdbserve.def @@ -1,5 +1,5 @@ description "GDB debugger stub" -version 1,2,0 +version 1,2 debug module clib screenname "System Console" diff --git a/gdb/nlm/ppc.c b/gdb/nlm/ppc.c index d869e01b8d7..80185c138ec 100644 --- a/gdb/nlm/ppc.c +++ b/gdb/nlm/ppc.c @@ -1,12 +1,14 @@ -#include #include #include #include #include +#include + +#include +#include #include #include #include -#include #include #include "ppc.h" @@ -253,162 +255,7 @@ do_status (ptr, frame) *ptr = '\000'; } -#if 0 -/* - * strtol : convert a string to long. - * - * Andy Wilson, 2-Oct-89. - */ - -/* FIXME: It'd be nice to configure around these, but the include files are too - painful. These macros should at least be more portable than hardwired hex - constants. */ - -#define ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF */ -#define LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF */ -#define LONG_MIN ((long)(~LONG_MAX)) /* 0x80000000 */ - -extern int errno; - -unsigned long strtoul(const char *s, char **ptr, int base); - -long -strtol(s, ptr, base) - const char *s; char **ptr; int base; -{ - int minus=0; - unsigned long tmp; - const char *start=s; - char *eptr; - - if (s==NULL) - { - errno = ERANGE; - if (!ptr) - *ptr = (char *)start; - return 0L; - } - while (isspace(*s)) - s++; - if (*s == '-') { - s++; - minus = 1; - } - else if (*s == '+') - s++; - - /* - * let strtoul do the hard work. - */ - tmp = strtoul(s, &eptr, base); - if (ptr != NULL) - *ptr = (char *)((eptr==s) ? (char *)start : eptr); - if (tmp > (minus ? - (unsigned long) LONG_MIN : (unsigned long) LONG_MAX)) - { - errno = ERANGE; - return (minus ? LONG_MIN : LONG_MAX); - } - return (minus ? (long) -tmp : (long) tmp); -} - -/* - * strtol : convert a string to long. - * - * Andy Wilson, 2-Oct-89. - */ - -#ifndef ULONG_MAX -#define ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF */ -#endif - -extern int errno; - -unsigned long -strtoul(s, ptr, base) - const char *s; char **ptr; int base; -{ - unsigned long total = 0; - unsigned digit; - const char *start=s; - int did_conversion=0; - int overflow = 0; - int negate = 0; - unsigned long maxdiv, maxrem; - - if (s==NULL) - { - errno = ERANGE; - if (!ptr) - *ptr = (char *)start; - return 0L; - } - - while (isspace(*s)) - s++; - if (*s == '+') - s++; - else if (*s == '-') - s++, negate = 1; - if (base==0 || base==16) /* the 'base==16' is for handling 0x */ - { - int tmp; - - /* - * try to infer base from the string - */ - if (*s != '0') - tmp = 10; /* doesn't start with 0 - assume decimal */ - else if (s[1] == 'X' || s[1] == 'x') - tmp = 16, s += 2; /* starts with 0x or 0X - hence hex */ - else - tmp = 8; /* starts with 0 - hence octal */ - if (base==0) - base = (int)tmp; - } - - maxdiv = ULONG_MAX / base; - maxrem = ULONG_MAX % base; - - while ((digit = *s) != '\0') - { - if (digit >= '0' && digit < ('0'+base)) - digit -= '0'; - else - if (base > 10) - { - if (digit >= 'a' && digit < ('a'+(base-10))) - digit = digit - 'a' + 10; - else if (digit >= 'A' && digit < ('A'+(base-10))) - digit = digit - 'A' + 10; - else - break; - } - else - break; - did_conversion = 1; - if (total > maxdiv - || (total == maxdiv && digit > maxrem)) - overflow = 1; - total = (total * base) + digit; - s++; - } - if (overflow) - { - errno = ERANGE; - if (ptr != NULL) - *ptr = (char *)s; - return (ULONG_MAX); - } - if (ptr != NULL) - *ptr = (char *) ((did_conversion) ? (char *)s : (char *)start); - return negate ? -total : total; -} -#endif - -void _exit (int foo) __attribute__ ((noreturn)); - void -exit (int foo) +StopBell() { - _exit (foo); } -- 2.30.2