xref: /netbsd/usr.sbin/tprof/ksyms.h (revision e232e1f9)
1*e232e1f9Sryo /*	$NetBSD: ksyms.h,v 1.2 2022/12/01 00:43:27 ryo Exp $	*/
22c4fd4eaSryo 
32c4fd4eaSryo /*
42c4fd4eaSryo  * Copyright (c) 2010,2011,2012 YAMAMOTO Takashi,
52c4fd4eaSryo  * All rights reserved.
62c4fd4eaSryo  *
72c4fd4eaSryo  * Redistribution and use in source and binary forms, with or without
82c4fd4eaSryo  * modification, are permitted provided that the following conditions
92c4fd4eaSryo  * are met:
102c4fd4eaSryo  * 1. Redistributions of source code must retain the above copyright
112c4fd4eaSryo  *    notice, this list of conditions and the following disclaimer.
122c4fd4eaSryo  * 2. Redistributions in binary form must reproduce the above copyright
132c4fd4eaSryo  *    notice, this list of conditions and the following disclaimer in the
142c4fd4eaSryo  *    documentation and/or other materials provided with the distribution.
152c4fd4eaSryo  *
162c4fd4eaSryo  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
172c4fd4eaSryo  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
182c4fd4eaSryo  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
192c4fd4eaSryo  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
202c4fd4eaSryo  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
212c4fd4eaSryo  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
222c4fd4eaSryo  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
232c4fd4eaSryo  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
242c4fd4eaSryo  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
252c4fd4eaSryo  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
262c4fd4eaSryo  * SUCH DAMAGE.
272c4fd4eaSryo  */
282c4fd4eaSryo 
292c4fd4eaSryo #ifndef _KSYMS_H_
302c4fd4eaSryo #define _KSYMS_H_
312c4fd4eaSryo 
322c4fd4eaSryo struct sym {
332c4fd4eaSryo 	char *name;
342c4fd4eaSryo 	uint64_t value;
352c4fd4eaSryo 	uint64_t size;
362c4fd4eaSryo };
372c4fd4eaSryo 
38*e232e1f9Sryo struct sym **ksymload(size_t *);
39*e232e1f9Sryo const char *ksymlookup(uint64_t, uint64_t *, size_t *);
402c4fd4eaSryo 
412c4fd4eaSryo #endif /* _KSYMS_H_ */
42