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

ruby-changes:33338

From: naruse <ko1@a...>
Date: Wed, 26 Mar 2014 08:56:06 +0900 (JST)
Subject: [ruby-changes:33338] naruse:r45417 (trunk): temporaly change/add to debug on powerpc64-linux

naruse	2014-03-26 08:55:58 +0900 (Wed, 26 Mar 2014)

  New Revision: 45417

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45417

  Log:
    temporaly change/add to debug on powerpc64-linux

  Modified files:
    trunk/addr2line.c
    trunk/vm_dump.c
Index: addr2line.c
===================================================================
--- addr2line.c	(revision 45416)
+++ addr2line.c	(revision 45417)
@@ -571,11 +571,17 @@ fill_lines(int num_traces, void **traces https://github.com/ruby/ruby/blob/trunk/addr2line.c#L571
 	char *strtab = file + strtab_shdr->sh_offset;
 	ElfW(Sym) *symtab = (ElfW(Sym) *)(file + symtab_shdr->sh_offset);
 	int symtab_count = (int)(symtab_shdr->sh_size / sizeof(ElfW(Sym)));
+#ifdef __powerpc64__
+	kprintf("\n= %s %lx\n",lines[offset].path,lines[offset].base_addr);
+#endif
 	for (j = 0; j < symtab_count; j++) {
 	    ElfW(Sym) *sym = &symtab[j];
 	    int type = ELF_ST_TYPE(sym->st_info);
 	    intptr_t saddr = (intptr_t)sym->st_value + current_line->base_addr;
 	    if (type != STT_FUNC) continue;
+#ifdef __powerpc64__
+	kprintf("%s %lx %lx\n",strtab + sym->st_name,sym->st_value,sym->st_size);
+#endif
 	    for (i = offset; i < num_traces; i++) {
 		intptr_t d = (intptr_t)traces[i] - saddr;
 		if (lines[i].line != -1)
Index: vm_dump.c
===================================================================
--- vm_dump.c	(revision 45416)
+++ vm_dump.c	(revision 45417)
@@ -819,15 +819,6 @@ rb_vm_bugreport(void) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L819
 	fputs("\n", stderr);
     }
 
-#if HAVE_BACKTRACE || defined(_WIN32)
-    fprintf(stderr, "-- C level backtrace information "
-	    "-------------------------------------------\n");
-    rb_print_backtrace();
-
-
-    fprintf(stderr, "\n");
-#endif /* HAVE_BACKTRACE */
-
     if (other_runtime_info || vm) {
 	fprintf(stderr, "-- Other runtime information "
 		"-----------------------------------------------\n\n");
@@ -907,5 +898,14 @@ rb_vm_bugreport(void) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L898
 	    fprintf(stderr, "\n");
 	}
 #endif /* __FreeBSD__ */
+#if HAVE_BACKTRACE || defined(_WIN32)
+    fprintf(stderr, "-- C level backtrace information "
+	    "-------------------------------------------\n");
+    rb_print_backtrace();
+
+
+    fprintf(stderr, "\n");
+#endif /* HAVE_BACKTRACE */
+
     }
 }

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

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