[前][次][番号順一覧][スレッド一覧]

ruby-changes:52124

From: naruse <ko1@a...>
Date: Mon, 13 Aug 2018 15:31:46 +0900 (JST)
Subject: [ruby-changes:52124] naruse:r64332 (trunk): Define parse_compressed_debug_line() only ifdef SUPPORT_COMPRESSED_DEBUG_LINE

naruse	2018-08-13 15:31:37 +0900 (Mon, 13 Aug 2018)

  New Revision: 64332

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64332

  Log:
    Define parse_compressed_debug_line() only ifdef SUPPORT_COMPRESSED_DEBUG_LINE

  Modified files:
    trunk/addr2line.c
Index: addr2line.c
===================================================================
--- addr2line.c	(revision 64331)
+++ addr2line.c	(revision 64332)
@@ -104,6 +104,7 @@ void *alloca(); https://github.com/ruby/ruby/blob/trunk/addr2line.c#L104
 #ifdef SHF_COMPRESSED
 # ifdef HAVE_LIBZ
 #  include <zlib.h>
+#  define SUPPORT_COMPRESSED_DEBUG_LINE
 # endif
 #else /* compatibility with glibc < 2.22 */
 # define SHF_COMPRESSED 0
@@ -482,6 +483,7 @@ follow_debuglink(const char *debuglink, https://github.com/ruby/ruby/blob/trunk/addr2line.c#L483
     fill_lines(num_traces, traces, 0, objp, lines, offset);
 }
 
+#ifdef SUPPORT_COMPRESSED_DEBUG_LINE
 static int
 parse_compressed_debug_line(int num_traces, void **traces,
 		 char *debug_line, unsigned long size,
@@ -516,6 +518,7 @@ finish: https://github.com/ruby/ruby/blob/trunk/addr2line.c#L518
     free(uncompressed_debug_line);
     return ret ? -1 : 0;
 }
+#endif
 
 /* read file and fill lines */
 static uintptr_t
@@ -684,7 +687,7 @@ fill_lines(int num_traces, void **traces https://github.com/ruby/ruby/blob/trunk/addr2line.c#L687
     }
 
     if (compressed_p) {
-#ifdef HAVE_LIBZ
+#ifdef SUPPORT_COMPRESSED_DEBUG_LINE
 	int r = parse_compressed_debug_line(num_traces, traces,
 		file + debug_line_shdr->sh_offset,
 		debug_line_shdr->sh_size,

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]