+2019-05-29 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ Ref.: https://bugzilla.redhat.com/show_bug.cgi?id=1708192
+ Ref.: https://bugzilla.redhat.com/show_bug.cgi?id=1715008
+ * dwarf2read.c (dwarf_decode_macro_bytes): Move check to see if
+ 'body' is NULL to the outter 'if', protecting the '!is_define'
+ situation as well.
+
2019-05-29 Tom Tromey <tromey@adacore.com>
* dwarf2read.c (partial_die_parent_scope): Call dwarf_tag_name.
is_define ? _("definition") : _("undefinition"),
line == 0 ? _("zero") : _("non-zero"), line, body);
- if (is_define)
+ if (body == NULL)
{
- if (body != NULL)
- parse_macro_definition (current_file, line, body);
- else
- {
- /* Fedora's rpm-build's "debugedit" binary
- corrupted .debug_macro sections.
-
- For more info, see
- https://bugzilla.redhat.com/show_bug.cgi?id=1708786 */
- complaint (_("debug info gives %s invalid macro definition "
- "without body (corrupted?) at line %d"
- "on file %s"),
- at_commandline ? _("command-line")
- : _("in-file"),
- line, current_file->filename);
- }
+ /* Fedora's rpm-build's "debugedit" binary
+ corrupted .debug_macro sections.
+
+ For more info, see
+ https://bugzilla.redhat.com/show_bug.cgi?id=1708786 */
+ complaint (_("debug info gives %s invalid macro %s "
+ "without body (corrupted?) at line %d "
+ "on file %s"),
+ at_commandline ? _("command-line") : _("in-file"),
+ is_define ? _("definition") : _("undefinition"),
+ line, current_file->filename);
}
+ else if (is_define)
+ parse_macro_definition (current_file, line, body);
else
{
gdb_assert (macinfo_type == DW_MACRO_undef