From: Ian Edwards (ian_at_concerto.demon.co.uk)
Date: Mon Jul 28 2003 - 15:44:30 BST
On 21-Jul-03 Gaurav Khanna wrote: > > Thanks for the tip .. I just tried it .. but now I'm getting stuck even > earlier .. ?? > > mreg.h:128: field `regs' has incomplete type > mreg.h:129: field `fpregs' has incomplete type > mreg.h:132: field `dbregs' has incomplete type > make[1]: *** [exec.o] Error 1 > make: *** [ups] Error 2 > Look at the manual page for ptrace(2). Check it can get the CPU registers, usually with a PT_GETREGS request. If so what follows applies. Check you have /usr/include/machine/reg.h and HAVE_MACHINE_REG_H is 1 in ifdefs.h. <reg.h> should have 'struct reg {}' and 'struct fpreg {}' defined in it. In ups/mreg.h you will need something like : #ifdef ARCH_PPC #define N_UAREA_GREGS 0 /* number of general registers */ #define UR_SP 0 /* stack pointer register */ #define UR_FP 0 /* frame pointer register */ #define UR_PC 0 /* program counter register */ #define N_UREGS 0 /* number of registers in u-area */ #endif These values should not be being used but are probably required for things to compile. Look in /usr/include/machine/reg.h to find how many registers there are. Use that number for N_UAREA_GREGS and N_UREGS. In ups/ao_pt_regs.c before #elif (defined ARCH_FREEBSD386) add #elif (defined ARCH_PPC) #define PC_REG(pr) ((pr)->regs.eip) #define SP_REG(pr) ((pr)->regs.esp) #define FRAME_REG(pr) ((pr)->regs.ebp) #define INTEGER_REG(pr, regno) ((&(pr)->regs.es)[x86_gcc_register(regno)]) Replace eip/esp/ebp/es with appropriate register names from /usr/include/machine/reg.h : program counter, stack pointer, frame pointer, first register in 'struct regs {}'. The call to x86_gcc_register() may not be required. Ian. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Ian Edwards <ian_at_concerto.demon.co.uk> 28-Jul-03 15:44:30 Early Music Record Labels - http://www.recordlabels.org/ 'ups' debugger for C/C++/f77 - http://ups.sourceforge.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
This archive was generated by hypermail 2.1.4 : Sat Aug 02 2003 - 11:59:28 BST