On 02/03/16(Wed) 11:51, Martin Pieuchot wrote:
> Or is it the other way around?
>
> ok?
Anyone?
>
> Index: ddb/db_elf.c
> ===================================================================
> RCS file: /cvs/src/sys/ddb/db_elf.c,v
> retrieving revision 1.19
> diff -u -p -r1.19 db_elf.c
> --- ddb/db_elf.c 1 Mar 2016 21:32:02 -0000 1.19
> +++ ddb/db_elf.c 2 Mar 2016 10:30:10 -0000
> @@ -346,12 +346,16 @@ db_elf_sym_search(db_addr_t off, db_stra
> * 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;
> Index: ddb/db_sym.c
> ===================================================================
> RCS file: /cvs/src/sys/ddb/db_sym.c,v
> retrieving revision 1.49
> diff -u -p -r1.49 db_sym.c
> --- ddb/db_sym.c 1 Mar 2016 21:32:02 -0000 1.49
> +++ ddb/db_sym.c 2 Mar 2016 10:30:10 -0000
> @@ -113,26 +113,6 @@ db_search_symbol(db_addr_t val, db_strat
> }
>
> /*
> - * Return name and value of a symbol
> - */
> -void
> -db_symbol_values(db_sym_t sym, char **namep, db_expr_t *valuep)
> -{
> - db_expr_t value;
> -
> - if (sym == NULL) {
> - *namep = NULL;
> - return;
> - }
> -
> - db_elf_sym_values(sym, namep, &value);
> -
> - if (valuep)
> - *valuep = value;
> -}
> -
> -
> -/*
> * Print a the closest symbol to value
> *
> * After matching the symbol according to the given strategy
> Index: ddb/db_sym.h
> ===================================================================
> RCS file: /cvs/src/sys/ddb/db_sym.h,v
> retrieving revision 1.25
> diff -u -p -r1.25 db_sym.h
> --- ddb/db_sym.h 1 Mar 2016 21:35:13 -0000 1.25
> +++ ddb/db_sym.h 2 Mar 2016 10:30:10 -0000
> @@ -87,7 +87,6 @@ void db_printsym(db_expr_t, db_strategy_
> /* print closest symbol to a value */
>
> boolean_t db_elf_sym_init(int, void *, void *, const char *);
> -void db_elf_sym_values(db_sym_t, char **, db_expr_t *);
> db_sym_t db_elf_sym_search(db_addr_t, db_strategy_t, db_expr_t *);
> boolean_t db_elf_line_at_pc(db_sym_t, char **, int *, db_expr_t);
> void db_elf_sym_forall(db_forall_func_t db_forall_func, void *);