xref: /illumos-gate/usr/src/lib/libdwarf/common/dwarf_debuglink.h (revision 51396a8ee7fb52fe0ab33bfe7b4f495ad431904a)
1 /*
2 Copyright (c) 2019, David Anderson
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with
6 or without modification, are permitted provided that the
7 following conditions are met:
8 
9     Redistributions of source code must retain the above
10     copyright notice, this list of conditions and the following
11     disclaimer.
12 
13     Redistributions in binary form must reproduce the above
14     copyright notice, this list of conditions and the following
15     disclaimer in the documentation and/or other materials
16     provided with the distribution.
17 
18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  */
31 
32 #ifndef DWARF_DEBUGLINK_H
33 #define DWARF_DEBUGLINK_H
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* __cplusplus */
37 
38 int _dwarf_pathjoinl(dwarfstring *target,dwarfstring * input);
39 
40 int _dwarf_construct_linkedto_path(
41    char         **global_prefixes_in,
42    unsigned       length_global_prefixes_in,
43    char          *pathname_in,
44    char          *link_string_in, /* from debug link */
45    dwarfstring   *link_string_fullpath,
46    unsigned char *crc_in, /* from debug_link, 4 bytes */
47    unsigned char *buildid, /* from gnu buildid */
48    unsigned       buildid_length, /* from gnu buildid */
49    char        ***paths_out,
50    unsigned      *paths_out_length,
51    int *errcode);
52 #ifdef __cplusplus
53 }
54 #endif /* __cplusplus */
55 #endif /* DWARF_DEBUGLINK_H */
56