mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-07 18:30:25 +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
|
@ -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>
|
2014-10-24 Paulo Andrade <pcpa@gnu.org>
|
||||||
|
|
||||||
* lib/jit_ia64.c, lib/jit_ppc.c: Correct handling of function
|
* lib/jit_ia64.c, lib/jit_ppc.c: Correct handling of function
|
||||||
|
|
|
@ -59,13 +59,18 @@ static jit_state_t *disasm_jit;
|
||||||
void
|
void
|
||||||
jit_init_debug(char *progname)
|
jit_init_debug(char *progname)
|
||||||
{
|
{
|
||||||
if (progname == NULL)
|
|
||||||
return;
|
|
||||||
#if DISASSEMBLER
|
#if DISASSEMBLER
|
||||||
bfd_init();
|
bfd_init();
|
||||||
|
|
||||||
disasm_bfd = bfd_openr(progname, NULL);
|
if (progname)
|
||||||
assert(disasm_bfd);
|
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_object);
|
||||||
bfd_check_format(disasm_bfd, bfd_archive);
|
bfd_check_format(disasm_bfd, bfd_archive);
|
||||||
disasm_print = disassembler(disasm_bfd);
|
disasm_print = disassembler(disasm_bfd);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue