diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-06 19:05:31 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-06 19:05:31 +0000 |
commit | d78740811eb1e423b374d1a1a2f69863373958d7 (patch) | |
tree | 04ce75b959272b88ced4b5cc85ae2b51f7b1d6b3 /sys/ddb/db_elf.c | |
parent | 2e26b7ce316a074fb5c90e9a3ee5650e8ae97d3c (diff) |
Merge db_elf_sym_values() into db_symbol_values().
ok stefan@
Diffstat (limited to 'sys/ddb/db_elf.c')
-rw-r--r-- | sys/ddb/db_elf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/ddb/db_elf.c b/sys/ddb/db_elf.c index 5354e2e1635..4c1507b3a50 100644 --- a/sys/ddb/db_elf.c +++ b/sys/ddb/db_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_elf.c,v 1.19 2016/03/01 21:32:02 mpi Exp $ */ +/* $OpenBSD: db_elf.c,v 1.20 2016/03/06 19:05:30 mpi Exp $ */ /* $NetBSD: db_elf.c,v 1.13 2000/07/07 21:55:18 jhawk Exp $ */ /*- @@ -346,13 +346,17 @@ db_elf_sym_search(db_addr_t off, db_strategy_t strategy, * Return the name and value for a symbol. */ void -db_elf_sym_values(db_sym_t sym, char **namep, - db_expr_t *valuep) +db_symbol_values(db_sym_t sym, char **namep, db_expr_t *valuep) { db_symtab_t *stab = &db_symtab; Elf_Sym *symp = (Elf_Sym *)sym; char *strtab; + if (sym == NULL) { + *namep = NULL; + return; + } + if (stab->private == NULL) return; |