Subject: ELF symbols for DDB
To: None <port-mips@netbsd.org>
From: Simon Burge <simonb@telstra.com.au>
List: tech-kern
Date: 03/16/1999 14:43:18
[ CC'd to tech-kern for general DDB issues, Reply-To set to port-mips ]

I'm having problems loading symbols from an ELF kernel on the pmax, and
came across the following snippet from arch/mips/include/db_machdep.h:

	/*
	 * We use ELF symbols in DDB.
	 *
	 */
	/* #define	DB_ELF_SYMBOLS */
	#define	DB_AOUT_SYMBOLS

Without knowing much about the way ddb actually loads the symbols, could
this be (part of) my problem?  The comment seems reversed as well...

Also, it seems you can define both symbol types, but ELF symbols
also require a DB_ELFSIZE define as well, which will probably need
to go in a machine header and not the generic mips header.  If this
is the case, I propose adding something like this to each mips-based
machine/db_machdep.h:

	/*      $NetBSD: db_machdep.h,v 1.1 1997/07/07 03:54:24 jonathan Exp $  */

	/* #define DB_ELF_SYMBOLS */
	/* #define DB_ELFSIZE XXX */
	/* #define DB_AOUT_SYMBOLS */
	#include <mips/db_machdep.h>

and testing for at least one of DB_*_SYMBOLS in mips/db_machdep.h and
#error'ing if that isn't the case.

Simon.