OSDN Git Service

2019/05/22(Wed) 05:55
authorKoine Yuusuke(koinec) <koinec@users.osdn.me>
Tue, 21 May 2019 20:55:38 +0000 (05:55 +0900)
committerKoine Yuusuke(koinec) <koinec@users.osdn.me>
Tue, 21 May 2019 20:55:38 +0000 (05:55 +0900)
 (LibGoblin)
  * WorkBackup

libgoblin/Makefile
libgoblin/drd64_libgoblin.h
libgoblin/drd64_libgoblin_debug_dwarf_str.c [new file with mode: 0644]
libgoblin/drd64_libgoblin_debug_dwarf_str.h [moved from libgoblin/drd64_libgoblin_dwarf_str.h with 92% similarity]

index f12b6df..cc83b8e 100644 (file)
@@ -75,6 +75,7 @@ OBJS = drd64_libgoblin_api.o \
                drd64_libgoblin_dwarf_tag.o \
                drd64_libgoblin_dwarf_common.o \
                drd64_libgoblin_debug_elf.o \
+               drd64_libgoblin_debug_dwarf_str.o \
                drd64_libgoblin_debug_objinfo.o
 HEADER = drd64_libgoblin.h \
                drd64_libgoblin_section_defs.h \
@@ -105,8 +106,8 @@ HEADER = drd64_libgoblin.h \
                drd64_libgoblin_dwarf_line.h \
                drd64_libgoblin_dwarf_tag.h \
                drd64_libgoblin_dwarf_common.h \
-               drd64_libgoblin_dwarf_str.h \
                drd64_libgoblin_debug_elf.h \
+               drd64_libgoblin_debug_dwarf_str.h \
                drd64_libgoblin_debug_objinfo.h \
                drd64_libgoblin_addrinfo.h \
                $(USER_HEADER) $(SUPER_HEADER) $(LIB_HEADER) 
@@ -233,6 +234,9 @@ drd64_libgoblin_dwarf_common.o: drd64_libgoblin_dwarf_common.c $(HEADER)
 drd64_libgoblin_debug_elf.o: drd64_libgoblin_debug_elf.c $(HEADER)
        $(CC) -c -o drd64_libgoblin_debug_elf.o $(FLAGS_DEBUG) \
                                drd64_libgoblin_debug_elf.c
+drd64_libgoblin_debug_dwarf_str.o: drd64_libgoblin_debug_dwarf_str.c $(HEADER)
+       $(CC) -c -o drd64_libgoblin_debug_dwarf_str.o $(FLAGS_DEBUG) \
+                               drd64_libgoblin_debug_dwarf_str.c
 drd64_libgoblin_debug_objinfo.o: drd64_libgoblin_debug_objinfo.c $(HEADER)
        $(CC) -c -o drd64_libgoblin_debug_objinfo.o $(FLAGS_DEBUG) \
                                drd64_libgoblin_debug_objinfo.c
index 781dc0e..ab85976 100644 (file)
@@ -98,7 +98,7 @@ Comment:
 #include"drd64_libgoblin_dwarf_line.h"
 #include"drd64_libgoblin_dwarf_tag.h"
 #include"drd64_libgoblin_dwarf.h"
-#include"drd64_libgoblin_dwarf_str.h"
+#include"drd64_libgoblin_debug_dwarf_str.h"
 #include"drd64_libgoblin_debug_elf.h"
 #include"drd64_libgoblin_debug_objinfo.h"
 
diff --git a/libgoblin/drd64_libgoblin_debug_dwarf_str.c b/libgoblin/drd64_libgoblin_debug_dwarf_str.c
new file mode 100644 (file)
index 0000000..5efee3b
--- /dev/null
@@ -0,0 +1,49 @@
+/*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
+
+                         D r . D e a m o n  6 4
+                        for INTEL64(R), AMD64(R)
+       
+   Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64*/
+
+/* File Info -----------------------------------------------------------
+File: drd64_.c
+Function: 
+Comment: 
+----------------------------------------------------------------------*/
+
+#define        DRD64_SRC_LIBGOBLIN_DEBUG_DWARF_STR
+#include"drd64_libgoblin.h"
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+
+
+
+/* EOF of drd64_.c ----------------------------------- */
similarity index 92%
rename from libgoblin/drd64_libgoblin_dwarf_str.h
rename to libgoblin/drd64_libgoblin_debug_dwarf_str.h
index 5c1be05..c2a7a76 100644 (file)
@@ -34,25 +34,25 @@ Function: Header
 Comment: 
 ----------------------------------------------------------------------*/
 
-#ifndef DRD64_HEADER_LIBGOBLIN_DWARF_STR
-#define DRD64_HEADER_LIBGOBLIN_DWARF_STR
+#ifndef DRD64_HEADER_LIBGOBLIN_DEBUG_DWARF_STR
+#define DRD64_HEADER_LIBGOBLIN_DEBUG_DWARF_STR
 
 #include"drd64_libgoblin.h"
 
-#ifdef DRD64_SRC_LIBGOBLIN_DWARF
-       #define LIBGOBLIN_DWARFSTR_EXTERN
+#ifdef DRD64_SRC_LIBGOBLIN_DEBUG_DWARF_STR
+       #define LIBGOBLIN_DEBUG_DWARF_STR_EXTERN
 #else
-       #define LIBGOBLIN_DWARFSTR_EXTERN       extern
+       #define LIBGOBLIN_DEBUG_DWARF_STR_EXTERN        extern
 #endif
 
 
-#define        DWARFSTR_TAG_MAX                        0x4f
-#define        DWARFSTR_AT_MAX                         0x6f
+#define        DEBUG_DWARF_STR_TAG_MAX         0x4f
+#define        DEBUG_DWARF_STR_AT_MAX          0x6f
 
-#ifndef DRD64_SRC_LIBGOBLIN_DWARF
-       extern  char    *gstr_dwarf_tag_name[DWARFSTR_TAG_MAX+1];
+#ifndef DRD64_SRC_LIBGOBLIN_DEBUG_DWARF_STR
+       extern  char    *gstr_dwarf_tag_name[DEBUG_DWARF_STR_TAG_MAX+1];
 #else
-       char    *gstr_dwarf_tag_name[DWARFSTR_TAG_MAX+1] = {
+       char    *gstr_dwarf_tag_name[DEBUG_DWARF_STR_TAG_MAX+1] = {
        "noe_TAG(ENDorERROR)",                  /* 0x00 */
        "DW_TAG_array_type",                    /* 0x01 */
        "DW_TAG_class_type",                    /* 0x02 */
@@ -156,10 +156,10 @@ Comment:
 // #define     DW_TAG_GNU_call_site_parameter          0x410a
 
 
-#ifndef DRD64_SRC_LIBGOBLIN_DWARF
-       extern  char    *gstr_dwarf_attribute_name[DWARFSTR_AT_MAX+1];
+#ifndef DRD64_SRC_LIBGOBLIN_DEBUG_DWARF_STR
+       extern  char    *gstr_dwarf_attribute_name[DEBUG_DWARF_STR_AT_MAX+1];
 #else
-       char    *gstr_dwarf_attribute_name[DWARFSTR_AT_MAX+1] = {
+       char    *gstr_dwarf_attribute_name[DEBUG_DWARF_STR_AT_MAX+1] = {
        "none_AT(ENDorERROR)",                  /* 0x00 */
        "DW_AT_sibling",                                /* 0x01 */
        "DW_AT_location",                               /* 0x02 */
@@ -280,12 +280,6 @@ Comment:
        };
 #endif
 
-
-#endif /* DRD64_HEADER_LIBGOBLIN_BINFO */
-
-/* EOF of drd64_.h ----------------------------------- */
-
-
 /*
 #define DW_AT_lo_user                  0x2000
 #define DW_AT_hi_user                  0x3fff
@@ -350,34 +344,53 @@ Comment:
 #define        DW_AT_APPLE_objc_complete_type          0x3fec
 #define        DW_AT_APPLE_property                    0x3fed
 
-#define DW_FORM_addr                   0x01
-#define DW_FORM_block2                 0x03
-#define DW_FORM_block4                 0x04
-#define DW_FORM_data2                  0x05
-#define DW_FORM_data4                  0x06
-#define DW_FORM_data8                  0x07
-#define DW_FORM_string                 0x08
-#define DW_FORM_block                  0x09
-#define DW_FORM_block1                 0x0a
-#define DW_FORM_data1                  0x0b
-#define DW_FORM_flag                   0x0c
-#define DW_FORM_sdata                  0x0d
-#define DW_FORM_strp                   0x0e
-#define DW_FORM_udata                  0x0f
-#define DW_FORM_ref_addr               0x10
-#define DW_FORM_ref1                   0x11
-#define DW_FORM_ref2                   0x12
-#define DW_FORM_ref4                   0x13
-#define DW_FORM_ref8                   0x14
-#define DW_FORM_ref_udata              0x15
-#define DW_FORM_indirect               0x16
-#define DW_FORM_sec_offset             0x17
-#define DW_FORM_exprloc                        0x18
-#define DW_FORM_flag_present           0x19
-#define DW_FORM_ref_sig8               0x20
-#define        DW_FORM_GNU_ref_alt             0x1f20
-#define        DW_FORM_GNU_strp_alt            0x1f21
+*/
+
+#define        DEBUG_DWARF_STR_FORM_MAX        0x21
 
+#ifndef DRD64_SRC_LIBGOBLIN_DEBUG_DWARF_STR
+       extern  char    *gstr_dwarf_form_name[DEBUG_DWARF_STR_FORM_MAX+1];
+#else
+       char    *gstr_dwarf_form_name[DEBUG_DWARF_STR_FORM_MAX+1] = {
+               "noe_FORM(0x00)",               // 0x00
+               "DW_FORM_addr",                 // 0x01
+               "noe_FORM(0x02)",               // 0x02
+               "DW_FORM_block2",               // 0x03
+               "DW_FORM_block4",               // 0x04
+               "DW_FORM_data2",                // 0x05
+               "DW_FORM_data4",                // 0x06
+               "DW_FORM_data8",                // 0x07
+               "DW_FORM_string",               // 0x08
+               "DW_FORM_block",                // 0x09
+               "DW_FORM_block1",               // 0x0a
+               "DW_FORM_data1",                // 0x0b
+               "DW_FORM_flag",                 // 0x0c
+               "DW_FORM_sdata",                // 0x0d
+               "DW_FORM_strp",                 // 0x0e
+               "DW_FORM_udata",                // 0x0f
+               "DW_FORM_ref_addr",             // 0x10
+               "DW_FORM_ref1",                 // 0x11
+               "DW_FORM_ref2",                 // 0x12
+               "DW_FORM_ref4",                 // 0x13
+               "DW_FORM_ref8",                 // 0x14
+               "DW_FORM_ref_udata",    // 0x15
+               "DW_FORM_indirect",             // 0x16
+               "DW_FORM_sec_offset",   // 0x17
+               "DW_FORM_exprloc",              // 0x18
+               "DW_FORM_flag_present", // 0x19
+               "DW_FORM_ref_sig8",             // 0x20
+       };
+#endif
+//             DW_FORM_GNU_ref_alt             0x1f20
+//             DW_FORM_GNU_strp_alt    0x1f21
+
+
+#endif /* DRD64_HEADER_LIBGOBLIN_BINFO */
+
+/* EOF of drd64_.h ----------------------------------- */
+
+
+/*
 #define DW_OP_addr                     0x03
 #define DW_OP_deref                    0x06
 #define DW_OP_const1u                  0x08