Path: blob/main/cddl/lib/libdtrace/libproc_compat.h
39536 views
/*1* Copyright (c) 2010 The FreeBSD Foundation2* All rights reserved.3*4* This software was developed by Rui Paulo under sponsorship from the5* FreeBSD Foundation.6*7* Redistribution and use in source and binary forms, with or without8* modification, are permitted provided that the following conditions9* are met:10* 1. Redistributions of source code must retain the above copyright11* notice, this list of conditions and the following disclaimer.12* 2. Redistributions in binary form must reproduce the above copyright13* notice, this list of conditions and the following disclaimer in the14* documentation and/or other materials provided with the distribution.15*16* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND17* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE18* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE19* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE20* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL21* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS22* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)23* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT24* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY25* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF26* SUCH DAMAGE.27*/2829/*30* Compatibility functions between Solaris libproc and FreeBSD libproc.31* Functions sorted alphabetically.32*/33#define PR_LMID_EVERY 034#define PGRAB_RDONLY PATTACH_RDONLY35#define PGRAB_FORCE PATTACH_FORCE3637#define Psetrun(p, a1, a2) proc_continue((p))38#define Pxlookup_by_addr(p, a, n, s, sym, i) \39proc_addr2sym(p, a, n, s, sym)40#define Pxlookup_by_name(p, l, s1, s2, sym, a) \41proc_name2sym(p, s1, s2, sym, a)42#define Paddr_to_map proc_addr2map43#define Pcreate_error strerror44#define Pdelbkpt proc_bkptdel45#define Pgrab_error strerror46#define Plmid(p, a, l) (-1)47#define Plmid_to_map(p, l, o) proc_name2map(p, o)48#define Plookup_by_addr proc_addr2sym49#define Pname_to_ctf(p, obj) (ctf_file_t *)proc_name2ctf(p, obj)50#define Pname_to_map proc_name2map51#define Pobject_iter proc_iter_objs52#define Pobject_iter_resolved(p, f, arg) proc_iter_objs(p, f, arg)53#define Pobjname proc_objname54#define Pread proc_read55#define Prd_agent proc_rdagent56#define Prelease proc_detach57#define Psetbkpt proc_bkptset58#define Pstate proc_state59#define Psymbol_iter_by_addr proc_iter_symbyaddr60#define Pupdate_maps proc_rdagent61#define Pupdate_syms proc_updatesyms62#define Pxecbkpt proc_bkptexec636465