diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-08-19 16:41:08 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-08-19 16:41:08 +0000 |
commit | e057e38af23f97de22e565bfe60365f505a8f103 (patch) | |
tree | c4740144bbb07c661ba6ca558ce6a5f6966676d3 /sys/ddb/db_sym.c | |
parent | da7dfcfc2057792645bffc631fc605bfd580d8fc (diff) |
Ugly hack to make symbols work on sparc64.
We really need to change ddb_init to take args from MD code.
Diffstat (limited to 'sys/ddb/db_sym.c')
-rw-r--r-- | sys/ddb/db_sym.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 0b4840c5304..b0f1a4d1cae 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_sym.c,v 1.22 2001/02/10 10:42:35 niklas Exp $ */ +/* $OpenBSD: db_sym.c,v 1.23 2001/08/19 16:41:07 art Exp $ */ /* $NetBSD: db_sym.c,v 1.24 2000/08/11 22:50:47 tv Exp $ */ /* @@ -127,21 +127,32 @@ ddb_init() const db_symformat_t **symf; const char *name = "bsd"; extern char *esym; +#ifdef __sparc64__ + extern char *ssym; +#else extern long end; +#endif + char *xssym, *xesym; + xesym = esym; +#ifdef __sparc64__ + xssym = ssym; +#else + xssym = &end; +#endif /* * Do this check now for the master symbol table to avoid printing * the message N times. */ - if ((((vaddr_t)&end) & (sizeof(long) - 1)) != 0) { + if ((((vaddr_t)xssym) & (sizeof(long) - 1)) != 0) { printf("[ %s symbol table has bad start address %p ]\n", - name, &end); + name, xssym); return; } for (symf = db_symformats; *symf != NULL; symf++) { db_symformat = *symf; - if (X_db_sym_init((long)esym - (long)&end, &end, esym, name) == TRUE) + if (X_db_sym_init((long)xesym - (long)xssym, xssym, xesym, name) == TRUE) return; } |