Re: Anyone using alpha-freebsd target in gdb-current?

Jason R Thorpe
2002-01-13T00:41:29Z

> I did the port to alpha-freebsd-5.0 (a.k.a. freebsd-current). I still
> work on it from time to time, and it should work reasonably with a
> recent gcc.

Should it also work with GCC 2.95.3?

> The system compiler for freebsd-current generates unusable debug
> output, both for stabs and dwarf2. Gcc 3.0 and above should do much better.

The lossage I'm seeing seems totally irrelavent to debugging symbols,
unfortunately.

> Isn't NetBSD/alpha using ELF? In that case it shouldn't set any
> implicit breakpoints at __start. If NetBSD/alpha doesn't use ELF,
> then you might need to work on getting the old SunOS/a.out shared
> library support working on NetBSD/alpha.

Yes, it's ELF, and it uses solib-svr4.c. I'm referring to
bkpt_names[] in solib-svr4.c:

#define BKPT_AT_SYMBOL 1

#if defined (BKPT_AT_SYMBOL)
static char *bkpt_names[] =
{
#ifdef SOLIB_BKPT_NAME
SOLIB_BKPT_NAME, /* Prefer configured name if it exists. */
#endif
"_start",
"main",
NULL
};
#endif

_start is the executable entry point on FreeBSD/alpha. It's __start on
NetBSD/alpha, and thus my alpha/tm-nbsd.h defines:

#define SOLIB_BKPT_NAME "__start"

As I understand the use of bkpt_names[], it's used to create a solib
event when all of the default shared libraries are loaded for a program.