petri%tubsibr@relay.eu.net (Stefan Petri) (02/13/90)
Machine: Nixdorf Targon/35-M50 with TOS3.3
( a pyramid 98xx with OSx4.4, I *guess*)
Program: gdb-3.5 , the distribution from prep.ai.mit.edu
1) In Makefile-dist:
ALLOCA must be defined - there is an alloca.o in /usr/.attlib/libPW.a,
that one can extract and use.
2) At the end I appended some patches to get the thing configured & built
3) I can't call a function out of gdb (this was also in gdb-3.3,
never tried 3.4)
/u1/petri 3 > cat t.c
int b;
foo()
{
b = 5;
return 3;
}
main()
{
foo();
}
/u1/petri 4 > gcc -g t.c
jupiter:/u1/petri 5 > gdb a.out
GDB 3.5, Copyright (C) 1989 Free Software Foundation, Inc.
There is ABSOLUTELY NO
[..]
Reading symbol data from /u1/petri/a.out...done.
Type "help" for a list of commands.
(gdb) break main
Reading in symbols for t.c...done.
Breakpoint 1 at 0x60: file t.c, line 11.
(gdb) run
Starting program: /u1/petri/a.out
Bpt 1, main () (t.c line 11)
11 foo();
(gdb) p foo()
Bus error (core dumped)
/u1/petri 6 > file core
core: pyr core dump data from 'a.out'
--> this is ``/usr/local/bin/file''
/u1/petri 7 >
I was not able to debug gdb with sdb, dbx or a copy of itself,
no matter if compiled with cc or gcc. The results I get are (seem to be ?)
indeterministic :-(
*** config.gdb Tue Feb 13 15:16:12 1990
--- ../config.gdb Tue Feb 13 15:17:51 1990
***************
*** 134,140
depfile=altos-dep.c
opcodefile=m68k-opcode.h
;;
! pyramid)
echo
echo "Note that GDB on Pyramids only works with GCC."
echo
--- 134,140 -----
depfile=altos-dep.c
opcodefile=m68k-opcode.h
;;
! pyr)
echo
echo "Note that GDB on Pyramids only works with GCC."
echo
*** pyr-dep.c Tue Feb 13 15:16:14 1990
--- ../pyr-dep.c Tue Feb 13 15:17:50 1990
***************
*** 340,346
extern CORE_ADDR reg_stack_end;
/* need this so we can find the global registers: they never get saved. */
! static CORE_ADDR global_reg_offset;
static CORE_ADDR last_frame_address;
static CORE_ADDR last_frame_offset;
--- 340,346 -----
extern CORE_ADDR reg_stack_end;
/* need this so we can find the global registers: they never get saved. */
! CORE_ADDR global_reg_offset; /* S.P. */
static CORE_ADDR last_frame_address;
CORE_ADDR last_frame_offset; /* S.P. */
***************
*** 342,348
/* need this so we can find the global registers: they never get saved. */
static CORE_ADDR global_reg_offset;
static CORE_ADDR last_frame_address;
! static CORE_ADDR last_frame_offset;
/* Address in core file of start of register window stack area.
--- 342,348 -----
/* need this so we can find the global registers: they never get saved. */
CORE_ADDR global_reg_offset; /* S.P. */
static CORE_ADDR last_frame_address;
! CORE_ADDR last_frame_offset; /* S.P. */
/* Address in core file of start of register window stack area.
***************
*** 347,353
/* Address in core file of start of register window stack area.
Don't know if is this any of meaningful, useful or necessary. */
! static CORE_ADDR reg_stack_offset;
#endif /* PYRAMID_CORE */
--- 347,353 -----
/* Address in core file of start of register window stack area.
Don't know if is this any of meaningful, useful or necessary. */
! CORE_ADDR reg_stack_offset; /* S.P. */
#endif /* PYRAMID_CORE */
--
Stefan Petri <petri@tubsibr.UUCP>
Technische Universitaet Braunschweig, Institut fuer Betriebssysteme und
Rechnerverbund, 3300 Braunschweig, W. Germany.