glenne%hplsla@HPLABS.HP.COM (Glenn Engel) (01/01/89)
The following changes were needed for gdb3.0 on hp-ux 6.2.
xgdb compiles and links but does not run.
The changes for gdb are as follows:
1) Makefile. gcc/g++ use -I../hp-include for overriding headers.
addition of compiler flags for cc tables sizes.
addition of -lGNU to CLIBS to provide bcopy...alloca.
2) munch. hp-ux nm has two spaces between the T and the symbol name.
I changed the expression to have any number of spaces.
3) m-hp9k320.h Added L_SET and L_INCR definition for lseek parameters.
4) hp9k320-dep.c delete #include of a.out.h because it gets included by
one of the other include files and duplicate errors occur
if it is included twice.
Glenn Engel
glenne%hplsla@hplabs.hp.com
*** ../dist-gdb/Makefile Thu Dec 22 08:54:00 1988
--- Makefile Tue Dec 27 12:35:50 1988
***************
*** 1,5
! # On HPUX, you need to add -Ihpux to CFLAGS.
! # The headers in the subdir hpux override system headers
# and tell GDB to use BSD executable file format.
# You also need to add -lGNU to CLIBS, and perhaps CC = gcc.
--- 1,5 -----
! # On HPUX, you need to uncomment CFLAGS and CLIBS
! # The headers in the dir ../hp-include override system headers
# and tell GDB to use BSD executable file format.
# You also need to add -lGNU to CLIBS, and perhaps CC = gcc.
***************
*** 24,29
# -I. for "#include <obstack.h>". Possibly regex.h also.
#CFLAGS = -g -pg -I. -O
CFLAGS = -I. -g
#LDFLAGS = -pg
# define this to be "obstack.o" if you don't have the obstack library installed
--- 24,32 -----
# -I. for "#include <obstack.h>". Possibly regex.h also.
#CFLAGS = -g -pg -I. -O
CFLAGS = -I. -g
+ # for HP-UX
+ #CFLAGS = -I../hp-include -I. -g -Wc,-Nd4000 -Wc,-Ns4000
+
#LDFLAGS = -pg
# define this to be "obstack.o" if you don't have the obstack library installed
***************
*** 51,56
CLIBS = $(OBSTACK) $(REGEX) $(GNU_MALLOC)
# for USG
#CLIBS= $(OBSTACK) $(REGEX) $(GNU_MALLOC) -lPW
SFILES = blockframe.c breakpoint.c coffread.c command.c core.c dbxread.c \
environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
--- 54,61 -----
CLIBS = $(OBSTACK) $(REGEX) $(GNU_MALLOC)
# for USG
#CLIBS= $(OBSTACK) $(REGEX) $(GNU_MALLOC) -lPW
+ # for HP-UX
+ #CLIBS = $(OBSTACK) $(REGEX) $(GNU_MALLOC) -lGNU
SFILES = blockframe.c breakpoint.c coffread.c command.c core.c dbxread.c \
environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
*** ../dist-gdb/munch Tue Dec 6 14:22:50 1988
--- munch Tue Dec 27 12:45:09 1988
***************
*** 26,33
case $TYPE in
BSD)
nm $* | \
! grep 'T __initialize_' | \
! sed -e 's/^.*T _\(.*\)/ \1 ();/'
;;
USG)
# for usg use nm -p, grep for _initialize,
--- 26,33 -----
case $TYPE in
BSD)
nm $* | \
! grep 'T *__initialize_' | \
! sed -e 's/^.*T *_\(.*\)/ \1 ();/'
;;
USG)
# for usg use nm -p, grep for _initialize,
***************
*** 33,39
# for usg use nm -p, grep for _initialize,
# don't delete leading '_'
nm -p $* | \
! grep 'T _initialize_' | \
sed -e 's/^.*T \(.*\)/ \1 ();/'
;;
*)
--- 33,39 -----
# for usg use nm -p, grep for _initialize,
# don't delete leading '_'
nm -p $* | \
! grep 'T *_initialize_' | \
sed -e 's/^.*T \(.*\)/ \1 ();/'
;;
*)
*** m-hp9k320.h Fri Dec 9 12:44:34 1988
--- ../gdb3.0/m-hp9k320.h Thu Dec 22 19:30:11 1988
***************
*** 22,27
#define HP9K320
#endif
/* Set flag to indicate whether HP's assembler is in use. */
#ifdef __GNU__
#ifdef __HPUX_ASM__
--- 22,31 -----
#define HP9K320
#endif
+ /* parameter to lseek - set pointer to value, increment pointer */
+ #define L_SET 0
+ #define L_INCR 1
+
/* Set flag to indicate whether HP's assembler is in use. */
#ifdef __GNU__
#ifdef __HPUX_ASM__
*** ../dist-gdb/hp9k320-dep.c Tue Nov 15 07:30:28 1988
--- hp9k320-dep.c Thu Dec 22 21:02:17 1988
***************
*** 35,41
#include <sys/reg.h>
#include <sys/trap.h>
- #include <a.out.h>
#include <sys/file.h>
#include <sys/stat.h>
--- 35,40 -----
#include <sys/reg.h>
#include <sys/trap.h>
#include <sys/file.h>
#include <sys/stat.h>