diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-04-20 08:03:00 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-04-20 08:03:00 +0000 |
commit | 717912e53e91c53b81e9ca1fba26ffe70045949e (patch) | |
tree | 86d171a967b4f9b278c4840cbf0a33661e267235 /sys/ddb | |
parent | 9ea758c0841df8af33164d5dded4295a9c1a3570 (diff) |
Collapse db_dwarf.h into db_sym.h
ok matthew@
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_dwarf.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_dwarf.h | 24 | ||||
-rw-r--r-- | sys/ddb/db_elf.c | 3 | ||||
-rw-r--r-- | sys/ddb/db_sym.h | 10 |
4 files changed, 14 insertions, 29 deletions
diff --git a/sys/ddb/db_dwarf.c b/sys/ddb/db_dwarf.c index 0151a083442..5956d602664 100644 --- a/sys/ddb/db_dwarf.c +++ b/sys/ddb/db_dwarf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_dwarf.c,v 1.4 2016/03/07 18:43:59 naddy Exp $ */ +/* $OpenBSD: db_dwarf.c,v 1.5 2016/04/20 08:02:59 mpi Exp $ */ /* * Copyright (c) 2014 Matthew Dempsky <matthew@dempsky.org> * @@ -17,10 +17,10 @@ #ifdef _KERNEL #include <sys/param.h> -#include <sys/stdint.h> #include <sys/systm.h> #include <sys/types.h> -#include <ddb/db_dwarf.h> +#include <machine/db_machdep.h> +#include <ddb/db_sym.h> #ifdef DIAGNOSTIC #define DWARN(fmt, ...) printf("ddb: " fmt "\n", __VA_ARGS__) #else diff --git a/sys/ddb/db_dwarf.h b/sys/ddb/db_dwarf.h deleted file mode 100644 index 7191c62bf19..00000000000 --- a/sys/ddb/db_dwarf.h +++ /dev/null @@ -1,24 +0,0 @@ -/* $OpenBSD: db_dwarf.h,v 1.1 2014/07/11 03:17:20 matthew Exp $ */ -/* - * Copyright (c) 2014 Matthew Dempsky <matthew@dempsky.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _DDB_DB_DWARF_H_ -#define _DDB_DB_DWARF_H_ - -bool db_dwarf_line_at_pc(const char *, size_t, uintptr_t, - const char **, const char **, int *); - -#endif /* _DDB_DB_DWARF_H_ */ diff --git a/sys/ddb/db_elf.c b/sys/ddb/db_elf.c index 2280f9e3086..e7ad6afa312 100644 --- a/sys/ddb/db_elf.c +++ b/sys/ddb/db_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_elf.c,v 1.21 2016/03/07 11:26:43 mpi Exp $ */ +/* $OpenBSD: db_elf.c,v 1.22 2016/04/20 08:02:59 mpi Exp $ */ /* $NetBSD: db_elf.c,v 1.13 2000/07/07 21:55:18 jhawk Exp $ */ /*- @@ -39,7 +39,6 @@ #include <machine/db_machdep.h> -#include <ddb/db_dwarf.h> #include <ddb/db_sym.h> #include <ddb/db_output.h> diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h index 725f6fcc89e..f15f742f443 100644 --- a/sys/ddb/db_sym.h +++ b/sys/ddb/db_sym.h @@ -29,6 +29,11 @@ * Date: 8/90 */ +#ifndef _DDB_DB_SYM_H_ +#define _DDB_DB_SYM_H_ + +#include <sys/stdint.h> + /* * Symbol representation is specific to the symtab style: * BSD compilers use dbx' nlist, other compilers might use @@ -90,3 +95,8 @@ int db_elf_sym_init(int, void *, void *, const char *); db_sym_t db_elf_sym_search(db_addr_t, db_strategy_t, db_expr_t *); int 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 *); + +bool db_dwarf_line_at_pc(const char *, size_t, uintptr_t, + const char **, const char **, int *); + +#endif /* _DDB_DB_SYM_H_ */ |