• R/O
  • HTTP
  • SSH
  • HTTPS

drdeamon64: コミット

Dr.Deamon64 Git-Repository
(2014/03/01- Main-Repository: migrate from cvs)


コミットメタ情報

リビジョンecc765292a0f7d6275bb3ccca5b16e85b5c6069c (tree)
日時2019-11-02 17:35:18
作者Koine Yuusuke(koinec) <koinec@user...>
コミッターKoine Yuusuke(koinec)

ログメッセージ

(LibGoblin)
  • CreateFile: drd64_libgoblin_debug_srcfile.[ch]

変更サマリ

差分

--- a/libgoblin/Makefile
+++ b/libgoblin/Makefile
@@ -91,6 +91,7 @@ OBJS = drd64_libgoblin_api.o \
9191 drd64_libgoblin_dwarf_common.o \
9292 drd64_libgoblin_index_dwarfinfo.o \
9393 drd64_libgoblin_debug_elf.o \
94+ drd64_libgoblin_debug_srcfile.o \
9495 drd64_libgoblin_debug_dwarf_str.o \
9596 drd64_libgoblin_debug_dwarf.o \
9697 drd64_libgoblin_debug_objinfo.o
@@ -140,6 +141,7 @@ HEADER = drd64_libgoblin.h \
140141 drd64_libgoblin_dwarf_common.h \
141142 drd64_libgoblin_index_dwarfinfo.h \
142143 drd64_libgoblin_debug_elf.h \
144+ drd64_libgoblin_debug_srcfile.h \
143145 drd64_libgoblin_debug_dwarf_str.h \
144146 drd64_libgoblin_debug_dwarf.h \
145147 drd64_libgoblin_debug_objinfo.h \
@@ -330,6 +332,9 @@ drd64_libgoblin_index_dwarfinfo.o: \
330332 drd64_libgoblin_debug_elf.o: drd64_libgoblin_debug_elf.c $(HEADER)
331333 $(CC) -c -o drd64_libgoblin_debug_elf.o $(FLAGS_DEBUG) \
332334 drd64_libgoblin_debug_elf.c
335+drd64_libgoblin_debug_srcfile.o: drd64_libgoblin_debug_srcfile.c $(HEADER)
336+ $(CC) -c -o drd64_libgoblin_debug_srcfile.o $(FLAGS_DEBUG) \
337+ drd64_libgoblin_debug_srcfile.c
333338 drd64_libgoblin_debug_dwarf_str.o: drd64_libgoblin_debug_dwarf_str.c $(HEADER)
334339 $(CC) -c -o drd64_libgoblin_debug_dwarf_str.o $(FLAGS_DEBUG) \
335340 drd64_libgoblin_debug_dwarf_str.c
--- a/libgoblin/drd64_libgoblin.h
+++ b/libgoblin/drd64_libgoblin.h
@@ -118,6 +118,7 @@ Comment:
118118 #include"drd64_libgoblin_debug_dwarf_str.h"
119119 #include"drd64_libgoblin_debug_dwarf.h"
120120 #include"drd64_libgoblin_debug_elf.h"
121+#include"drd64_libgoblin_debug_srcfile.h"
121122 #include"drd64_libgoblin_debug_objinfo.h"
122123
123124 // Defines LibGoblin SourceFileID for ErrorSystem ---
--- a/libgoblin/drd64_libgoblin_api.c
+++ b/libgoblin/drd64_libgoblin_api.c
@@ -103,6 +103,7 @@ int
103103
104104 // XXX: for DEBUG!
105105 Debug_ObjectInfo_Print_AllGroupLink( p_pginfo, 0xff );
106+ Debug_SrcFile_PrintSrcFileTable( p_binfo, 0xff );
106107
107108 return i_result;
108109 }
--- /dev/null
+++ b/libgoblin/drd64_libgoblin_debug_srcfile.c
@@ -0,0 +1,76 @@
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_.c
33+Function:
34+Comment:
35+----------------------------------------------------------------------*/
36+
37+#define DRD64_SRC_LIBGOBLIN_DEBUG_SRCFILE
38+#include"drd64_libgoblin.h"
39+
40+
41+/*----------------------------------------------------------------------
42+----------------------------------------------------------------------*/
43+LIBGOBLIN_DEBUG_SRCFILE_EXTERN
44+int
45+ Debug_SrcFile_PrintSrcFileTable(
46+ LibGoblin_BinaryInfo *p_binfo,
47+ Byte b_level )
48+{
49+ int i_srcid;
50+ LibGoblin_BinaryFile *p_bfile;
51+ LibGoblin_SrcFile *p_srcfile;
52+
53+ p_bfile = BinaryFile_GetBinaryFile( p_binfo->i_binfile );
54+ assert( NULL != p_bfile );
55+
56+ if( 0x00 < b_level )
57+ { puts("[DEBUG] SrcFile Table --------------------------------------------------"); }
58+
59+ for( i_srcid = 0; i_srcid < p_bfile->srcfile.i_max; i_srcid++ ) {
60+ p_srcfile = SrcFile_GetSrcFile( p_bfile, i_srcid );
61+ if( NULL == p_srcfile ) { continue; }
62+
63+ printf( " [%3d] %s/%s\n", p_srcfile->i_id, p_srcfile->str_srcpath, p_srcfile->str_filename );
64+ }
65+
66+ if( 0x00 < b_level ) {
67+ puts("-----------------------------------------------------------------------");
68+ puts("");
69+ }
70+
71+ return 0x00;
72+}
73+
74+
75+
76+/* EOF of drd64_.c ----------------------------------- */
--- /dev/null
+++ b/libgoblin/drd64_libgoblin_debug_srcfile.h
@@ -0,0 +1,55 @@
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_DEBUG_SRCFILE
38+#define DRD64_HEADER_LIBGOBLIN_DEBUG_SRCFILE
39+
40+#include"drd64_libgoblin.h"
41+
42+#ifdef DRD64_SRC_LIBGOBLIN_DEBUG_SRCFILE
43+ #define LIBGOBLIN_DEBUG_SRCFILE_EXTERN
44+#else
45+ #define LIBGOBLIN_DEBUG_SRCFILE_EXTERN extern
46+#endif
47+
48+LIBGOBLIN_DEBUG_SRCFILE_EXTERN
49+ int Debug_SrcFile_PrintSrcFileTable(
50+ LibGoblin_BinaryInfo *p_binfo, Byte b_level );
51+
52+
53+#endif /* DRD64_HEADER_XXX */
54+
55+/* EOF of drd64_.h ----------------------------------- */
旧リポジトリブラウザで表示