lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--ChangeLog 5
-rw-r--r--lib/jit_disasm.c 13
2 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2558395..2058def 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014年10月25日 Paulo Andrade <pcpa@gnu.org>
+
+ * lib/jit_disasm.c: Do not cause an fatal error if init_jit
+ fails in the jit_init_debug call.
+
2014年10月24日 Paulo Andrade <pcpa@gnu.org>
* lib/jit_ia64.c, lib/jit_ppc.c: Correct handling of function
diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index c80c9e2..31480af 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -59,13 +59,18 @@ static jit_state_t *disasm_jit;
void
jit_init_debug(char *progname)
{
- if (progname == NULL)
- return;
#if DISASSEMBLER
bfd_init();
- disasm_bfd = bfd_openr(progname, NULL);
- assert(disasm_bfd);
+ if (progname)
+ disasm_bfd = bfd_openr(progname, NULL);
+ if (disasm_bfd == NULL) {
+#if defined(__linux__)
+ disasm_bfd = bfd_openr("/proc/self/exe", NULL);
+ if (disasm_bfd == NULL)
+#endif
+ return;
+ }
bfd_check_format(disasm_bfd, bfd_object);
bfd_check_format(disasm_bfd, bfd_archive);
disasm_print = disassembler(disasm_bfd);
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月26日 10:29:10 +0000

AltStyle によって変換されたページ (->オリジナル) /