/usr/include/barry18/barry/dp_codinfo.h is in libbarry-dev 0.18.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | ///
/// \file dp_codinfo.h
/// Debug file parsing
///
/*
Copyright (C) 2009, Nicolas VIVIEN
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License in the COPYING file at the
root directory of this project for more details.
*/
#ifndef __BARRYJDG_CODINFO_H__
#define __BARRYJDG_CODINFO_H__
#include "dll.h"
#include <iosfwd>
#include <string>
#include <vector>
#include <stdint.h>
namespace Barry {
namespace JDG {
class BXEXPORT DebugFileEntry
{
private:
protected:
public:
std::string fileName;
std::string appName;
uint32_t uniqueId;
void Dump(std::ostream &os) const;
};
class BXEXPORT DebugFileList : public std::vector<DebugFileEntry>
{
public:
typedef std::vector<DebugFileEntry> base_type;
typedef base_type::iterator iterator;
typedef base_type::const_iterator const_iterator;
public:
void AddElement(uint32_t uniqueid, const std::string &appname, const std::string &filename);
void Dump(std::ostream &os) const;
};
inline std::ostream& operator<<(std::ostream &os, const DebugFileList &list) {
list.Dump(os);
return os;
}
class BXEXPORT ClassEntry
{
private:
protected:
public:
// For JDB
int index;
// Read from the ".debug" file
std::string className;
std::string classPath;
std::string sourceFile;
uint32_t type;
uint32_t unknown02;
uint32_t unknown03;
uint32_t id;
uint32_t unknown05;
uint32_t unknown06;
uint32_t unknown07;
uint32_t unknown08;
std::string GetFullClassName() { return classPath + "." + className; };
};
class BXEXPORT ClassList : public std::vector<ClassEntry>
{
public:
typedef std::vector<ClassEntry> base_type;
typedef base_type::iterator iterator;
typedef base_type::const_iterator const_iterator;
public:
void CreateDefaultEntries();
};
class BXEXPORT CodInfo
{
private:
uint32_t ParseNextHeaderField(std::istream &input);
uint32_t ParseNextTypeField(std::istream &input);
void ParseAppName(std::istream &input);
void ParseUniqueId(std::istream &input);
void ParseBoolean(std::istream &input);
void ParseByte(std::istream &input);
void ParseChar(std::istream &input);
void ParseShort(std::istream &input);
void ParseInt(std::istream &input);
void ParseLong(std::istream &input);
void ParseClass(std::istream &input);
void ParseArray(std::istream &input);
void ParseVoid(std::istream &input);
void ParseDouble(std::istream &input);
protected:
public:
uint32_t uniqueId;
std::string appName;
ClassList classList;
bool LoadDebugFile(const char *filename);
void ParseHeaderSection(std::istream &input);
void ParseTypeSection(std::istream &input);
void ParseResourceSection(std::istream &input);
uint32_t GetUniqueId();
std::string GetAppName();
};
BXEXPORT void SearchDebugFile(DebugFileList &list);
BXEXPORT bool LoadDebugInfo(const DebugFileList &list, const char *filename, CodInfo &info);
BXEXPORT bool LoadDebugInfo(const DebugFileList &list, const uint32_t uniqueId, const std::string module, CodInfo &info);
} // namespace JDG
} // namespace Barry
#endif
|