| 1 |
/* |
| 2 |
Copyright (c) 2019-2023, 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 |
#define DW_BUILDID_SANE_SIZE (8*1024) |
| 39 |
|
| 40 |
int _dwarf_pathjoinl(dwarfstring *target,dwarfstring * input); |
| 41 |
|
| 42 |
int _dwarf_construct_linkedto_path( |
| 43 |
char **global_prefixes_in, |
| 44 |
unsigned length_global_prefixes_in, |
| 45 |
char *pathname_in, |
| 46 |
char *link_string_in, /* from debug link */ |
| 47 |
dwarfstring *link_string_fullpath, |
| 48 |
#if 0 |
| 49 |
unsigned char *crc_in, /* from debug_link, 4 bytes */ |
| 50 |
#endif |
| 51 |
|
| 52 |
unsigned char *buildid, /* from gnu buildid */ |
| 53 |
unsigned buildid_length, /* from gnu buildid */ |
| 54 |
char ***paths_out, |
| 55 |
unsigned *paths_out_length, |
| 56 |
int *errcode); |
| 57 |
#ifdef __cplusplus |
| 58 |
} |
| 59 |
#endif /* __cplusplus */ |
| 60 |
#endif /* DWARF_DEBUGLINK_H */ |