Hi Mark, do you use my patch for mips to handle stack? Without it, the backtrace doesn't work...
The bad thing is that I submitted it to gdb-patches, but it was refused, I was told that $fp should be equal to $sp according to ABI... If you use a stock GDB, try to unpack a recent GDB source tree, apply the one line patch below, and recompile GDB. Can you tell us if the backtrace looks better after this? Pierre Muller 2012-06-11 Pierre Muller <[email protected]> * mips-tdep.c (mpis32_scan_prologue): Fix value of frame_offset for ADDIU $s8,$sp,FrameSize. Index: src/gdb/mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.556 diff -u -p -r1.556 mips-tdep.c --- src/gdb/mips-tdep.c 6 Jun 2012 21:34:12 -0000 1.556 +++ src/gdb/mips-tdep.c 10 Jun 2012 23:43:44 -0000 @@ -3226,6 +3226,7 @@ restart: (this_frame, gdbarch_num_regs (gdbarch) + 30); alloca_adjust = (unsigned) (frame_addr - (sp + low_word)); + frame_offset -= low_word; if (alloca_adjust > 0) { /* FP > SP + frame_size. This may be because of > -----Message d'origine----- > De : [email protected] [mailto:fpc-devel- > [email protected]] De la part de Mark Morgan Lloyd > Envoyé : samedi 24 novembre 2012 13:45 > À : [email protected] > Objet : Re: [fpc-devel] mips-linux and mipsel-linux snapshots available > > Mark Morgan Lloyd wrote: > > > The previous version that I compiled is around r22655 and builds OK on > > mipsel implemented by Qemu. I'm trying it for mips (big-endian)... I > > might be some time. > > Definite problem on a big-endian target: fpc -i is OK but fpc -h > fails with > > Reading symbols from /usr/local/bin/ppcmips...done. > (gdb) set arg -h > (gdb) run > Starting program: /usr/local/bin/ppcmips -h > > Program received signal SIGBUS, Bus error. > 0x0043eb88 in SYSUTILS_$$_UNIXTOWINAGE$LONGINT$$LONGINT () > (gdb) bt > #0 0x0043eb88 in SYSUTILS_$$_UNIXTOWINAGE$LONGINT$$LONGINT () > #1 0x0043fa6c in > SYSUTILS_$$_FINDGETFILEINFO$ANSISTRING$TSEARCHREC$$BOOLEAN () > #2 0x0043fdc4 in SYSUTILS_$$_FINDNEXT$TSEARCHREC$$LONGINT () > Backtrace stopped: previous frame inner to this frame (corrupt stack?) > (gdb) > > Same failure running fpc -l or trying to compile a trivial program. > Ditto fpc -l- test.pas, or running with no options/parameters other > than what are in the standard fpc.cfg. > > -- > Mark Morgan Lloyd > markMLl .AT. telemetry.co .DOT. uk > > [Opinions above are the author's, not those of his employers or colleagues] > _______________________________________________ > fpc-devel maillist - [email protected] > http://lists.freepascal.org/mailman/listinfo/fpc-devel _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
