HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
symbols.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_BASE_ARCH_SYMBOLS_H
8 #define PXR_BASE_ARCH_SYMBOLS_H
9 
10 /// \file arch/symbols.h
11 /// \ingroup group_arch_Diagnostics
12 /// Architecture-specific symbol lookup routines.
13 
14 #include "pxr/pxr.h"
15 #include "pxr/base/arch/api.h"
16 #include <string>
17 
19 
20 /// Returns information about the address \p address in the running program.
21 ///
22 /// Returns \c false if no information can be found, otherwise returns \c true
23 /// and modifies the other arguments: \p objectPath is set to the absolute path
24 /// to the executable or library the address is found in, \p baseAddress is the
25 /// address where that object is loaded, \p symbolName is the symbolic name of
26 /// the thing containing the address, and \p symbolAddress is the starting
27 /// address of that thing. If no thing is found to contain the address then
28 /// \p symbolName is cleared and \p symbolAddress is set to \c NULL. Any of
29 /// the arguments except \p address can be \c NULL if the result isn't needed.
30 /// This will return \c false if \c NULL is passed to \p address.
31 ///
32 /// \ingroup group_arch_Diagnostics
34 bool ArchGetAddressInfo(void* address,
35  std::string* objectPath, void** baseAddress,
36  std::string* symbolName, void** symbolAddress);
37 
39 
40 #endif // PXR_BASE_ARCH_SYMBOLS_H
PXR_NAMESPACE_OPEN_SCOPE ARCH_API bool ArchGetAddressInfo(void *address, std::string *objectPath, void **baseAddress, std::string *symbolName, void **symbolAddress)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
#define ARCH_API
Definition: api.h:23