OSDN Git Service

2019/02/24(Sun) 18:41
[drdeamon64/drdeamon64.git] / libgoblin / drd64_libgoblin_dwarf_line.h
1 /*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
2
3                          D r . D e a m o n  6 4
4                         for INTEL64(R), AMD64(R)
5         
6    Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met:
10
11  1. Redistributions of source code must retain the above copyright notice,
12     this list of conditions and the following disclaimer.
13  2. Redistributions in binary form must reproduce the above copyright
14     notice, this list of conditions and the following disclaimer in the
15     documentation and/or other materials provided with the distribution.
16
17 THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
18 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
21 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27 OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64*/
30
31 /* File Info -----------------------------------------------------------
32 File: drd64_.h
33 Function: Header 
34 Comment: 
35 ----------------------------------------------------------------------*/
36
37 #ifndef DRD64_HEADER_LIBGOBLIN_DWARF_LINE
38 #define DRD64_HEADER_LIBGOBLIN_DWARF_LINE
39
40 #include"drd64_libgoblin.h"
41
42 #ifdef DRD64_SRC_LIBGOBLIN_DWARF_LINE
43         #define LIBGOBLIN_DWARF_LINE_EXTERN
44 #else
45         #define LIBGOBLIN_DWARF_LINE_EXTERN     extern
46 #endif
47
48 #define LIBGOBLIN_DWARF_LINE_MAX_STDOPERANDS    16
49 #define LIBGOBLIN_DWARF_LINE_MAX_SRCFILES               512
50
51
52 typedef struct  {
53         QWord   qw_address;
54         QWord   qw_line;
55         DWord   dw_file;
56         Byte    b_is_stmt;
57         Byte    b_basic_block;
58         Byte    b_prologue_end;
59         Byte    b_epilogue_begin;
60         QWord   qw_column;
61         QWord   qw_isa;
62 } LibGoblin_Dwarf_Line_Register;
63
64
65 typedef struct  {
66         char    *pstr_srcfilename;
67         DWord   dw_dirindex;
68         QWord   qw_date;
69         QWord   qw_filesize;
70 } LibGoblin_Dwarf_Line_FileNames;
71
72
73 typedef struct  {
74         Byte    *pb_header;
75         Byte    *pb_data;
76
77         /* Header Items */
78         Word    w_version;
79         Byte    b_bits;
80         QWord   qw_headerlength;
81         Byte    b_minimum_inst_length;
82         Byte    b_default_is_stmt;
83         INT             i_line_base;
84         INT             i_line_range;
85         Byte    b_opcode_base;
86         DWord   dw_stdoperand_length[LIBGOBLIN_DWARF_LINE_MAX_STDOPERANDS];
87         int             i_num_includepath;
88         char    *pstr_includepath;
89         int             i_num_filename;
90         LibGoblin_Dwarf_Line_FileNames
91                         t_filename[LIBGOBLIN_DWARF_LINE_MAX_SRCFILES];
92
93 } LibGoblin_Dwarf_LineSection;
94
95
96 LIBGOBLIN_DWARF_LINE_EXTERN
97         int
98                 LibGoblin_DwarfLine_Analyze(
99                         LibGoblin_BinaryInfo    *p_bin );
100
101
102 #endif  /* DRD64_HEADER_LIBGOBLIN_DWARF_LINE */
103
104 /* EOF of drd64_.h ----------------------------------- */