mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-07 08:40:21 +02:00
Do not fail gratuitously in jit_init_debug
* lib/jit_disasm.c: Do not cause an fatal error if init_jit fails in the jit_init_debug call.
This commit is contained in:
parent
0c6f675c8a
commit
9cdcfcc38f
2 changed files with 14 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue