This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GDB on FreeBSD/Alpha


   Date: Wed, 31 May 2000 09:00:02 -0700
   From: "David O'Brien" <obrien@FreeBSD.org>

   On Wed, May 31, 2000 at 02:23:00PM +0200, Mark Kettenis wrote:
   > Considering the limitations in gcc 2.95.x for the Alpha, it would be
   > best if FreeBSD 5.x would use gcc 3.0 as its system compiler.

   That will happen.  But 5.0 is a year off.  We just got out 4.0, and 4.1
   should be out July 15th.

OK.  Fixing gcc 2.95.x before the 4.1 release should be doable.  It's
a configuration issue.  Here's the configuration fragment for
FreeBSD/Alpha:

        alpha*-*-freebsd*)
                tm_file="${tm_file} freebsd.h alpha/freebsd.h"
                xm_file="${xm_file} xm-freebsd.h"
                target_cpu_default="MASK_GAS"
                tmake_file="t-freebsd alpha/t-crtbe"
                xmake_file=none
                fixincludes=fixinc.wrap
                gas=yes gnu_ld=yes
                ;;

The problem is that gcc/config/freebsd.h includes gcc/config/dbxelf.h,
which defines a lot of things that are not right for stabs-in-ecoff:

DBX_FUNCTION_FIRST:

  This is what causes the function argument stabs to be emitted at the
  beginning of the function, which means the right values for these
  stabs have not yet been calculated, which in turn makes it
  impossible for GDB to find the arguments.

DBX_USE_BINCL:

  This causes N_BINCL entries to be used, which GDB cannot handle in
  .mdebug sections.

DBX_OUTPUT_MAIN_SOURCE_FILE_END:

  This causes an blank trailing N_SO stab to be emitted, which GDB
  doesn't expect, and causes GDB to crash (I had hacked around this,
  but I now realise that it's GCC's fault).

AFAICT none of the other defines in dbxelf.h are applicable to
stabs-in-ecoff.  So I think you should remove the dbxelf.h include
from gcc/config/freebsd.h (and re-add it for the FreeBSD ELF targets
that don't use stabs-in-ecoff).

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]