[PATCH] gdb 9.1: fix of unnecessary gdb termination
Паша Клюев
pkluiev@mail.ru
Mon May 25 18:00:51 GMT 2020
Fixing a problem that occurs when debugging programs compiled by Intel compiler,
when applying a patch, the debugger works further, let there be an unknown type, but gdb should work.
diff ./gdb-9.1/gdb/dwarf2read.c ./gdb-9.1-patched/gdb/dwarf2read.c
--- ./gdb-9.1/gdb/dwarf2read.c 2020-02-08 15:50:14.000000000 +0300
+++ ./gdb-9.1-patched/gdb/dwarf2read.c 2020-05-21 18:00:46.297640168 +0300
@@ -23521,11 +23521,17 @@
|| cu->per_cu->is_dwz),
ref_cu);
if (!die)
- error (_("Dwarf Error: Cannot find DIE at %s referenced from DIE "
+ /* patch begin
+ Cause:
+ Exit from gdb by incorrect DWARF information in debugging file
+ Fix:
+ Error message in gdb was changed to warning message
+ */
+ warning (_("Dwarf Error: Cannot find DIE at %s referenced from DIE "
+ /* patch end */
"at %s [in module %s]"),
sect_offset_str (sect_off), sect_offset_str (src_die->sect_off),
objfile_name (cu->per_cu->dwarf2_per_objfile->objfile));
-
return die;
}
diff ./gdb-9.1/gdb/f-typeprint.c ./gdb-9.1-patched/gdb/f-typeprint.c
--- ./gdb-9.1/gdb/f-typeprint.c 2020-02-08 15:49:29.000000000 +0300
+++ ./gdb-9.1-patched/gdb/f-typeprint.c 2020-05-21 18:01:49.828195999 +0300
@@ -458,7 +458,15 @@
if (TYPE_NAME (type) != NULL)
fprintfi_filtered (level, stream, "%s", TYPE_NAME (type));
else
- error (_("Invalid type code (%d) in symbol table."), TYPE_CODE (type));
+ /* PD patch begin
+ Cause:
+ Exit from gdb by unknown variable's data type
+ Fix:
+ Error message was changed to print the data type 'UNKNOWN TYPE'
+ */
+ fprintfi_filtered (level, stream, "UNKNOWN TYPE");
+ /* PD patch end */
+
break;
}
--
Regards Pavel.
More information about the Gdb-patches
mailing list