[Crash-utility] [PATCH] GDB started inside crash should not read any .gdbinit

Johan.Erlandsson at sony.com Johan.Erlandsson at sony.com
Tue Mar 9 09:40:06 UTC 2021


I don't think we want .gdbinit files to impact functions in
crash. Example of bad behavior, a .gdbinit file with:
set logging on

then when starting crash there is segmentation fault.
---
 gdb_interface.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb_interface.c b/gdb_interface.c
index f4f4dd3..cfa9f1e 100644
--- a/gdb_interface.c
+++ b/gdb_interface.c
@@ -42,6 +42,7 @@ gdb_main_loop(int argc, char **argv)
 {
        argc = 1;
 
+       argv[argc++] = "--nx";
        if (pc->flags & SILENT) {
                if (pc->flags & READNOW)
                        argv[argc++] = "--readnow";
-- 
2.17.1






More information about the Crash-utility mailing list