mirror of
https://github.com/ianlancetaylor/libbacktrace.git
synced 2026-04-01 23:19:07 +08:00
libbacktrace: suggest how to fix missing debug info
* elf.c (elf_nodebug): Suggest -g. * macho.c (macho_nodebug): Suggest -g and dsymutil. * pecoff.c (coff_nodebug): Suggest -g. Fixes #122
This commit is contained in:
2
elf.c
2
elf.c
@@ -589,7 +589,7 @@ elf_nodebug (struct backtrace_state *state, uintptr_t pc,
|
|||||||
return bdata.ret;
|
return bdata.ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_callback (data, "no debug info in ELF executable", -1);
|
error_callback (data, "no debug info in ELF executable (make sure to compile with -g)", -1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
macho.c
2
macho.c
@@ -324,7 +324,7 @@ macho_nodebug (struct backtrace_state *state ATTRIBUTE_UNUSED,
|
|||||||
backtrace_full_callback callback ATTRIBUTE_UNUSED,
|
backtrace_full_callback callback ATTRIBUTE_UNUSED,
|
||||||
backtrace_error_callback error_callback, void *data)
|
backtrace_error_callback error_callback, void *data)
|
||||||
{
|
{
|
||||||
error_callback (data, "no debug info in Mach-O executable", -1);
|
error_callback (data, "no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)", -1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
pecoff.c
2
pecoff.c
@@ -240,7 +240,7 @@ coff_nodebug (struct backtrace_state *state ATTRIBUTE_UNUSED,
|
|||||||
backtrace_full_callback callback ATTRIBUTE_UNUSED,
|
backtrace_full_callback callback ATTRIBUTE_UNUSED,
|
||||||
backtrace_error_callback error_callback, void *data)
|
backtrace_error_callback error_callback, void *data)
|
||||||
{
|
{
|
||||||
error_callback (data, "no debug info in PE/COFF executable", -1);
|
error_callback (data, "no debug info in PE/COFF executable (make sure to compile with -g)", -1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user