]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/symtab] Emit malformed macro definition complaint once
authorTom de Vries <tdevries@suse.de>
Tue, 30 Jul 2024 14:56:31 +0000 (16:56 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 30 Jul 2024 14:56:31 +0000 (16:56 +0200)
commit4e7b18de44be59e8a85b62aa0d89d0c4a54d0dbe
treefaf147e24beebc11f54470cd0fc9140accec425b
parentb1da98a74656685087b0afd97af8080edc78d995
[gdb/symtab] Emit malformed macro definition complaint once

Add a test-case gdb.dwarf2/macro-complaints.exp, that checks complaints for the
.debug_macro section.

For one malformed macro definition, I get two identical complaints:
...
During symbol reading: macro debug info contains a malformed macro definition:^M
`M1_11_MALFORMED(ARG'^M
During symbol reading: macro debug info contains a malformed macro definition:^M
`M1_11_MALFORMED(ARG'^M
...

Fix this by bailing out after the first one.

Tested on aarch64-linux.

Reviewed-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
gdb/dwarf2/macro.c
gdb/testsuite/gdb.dwarf2/macro-complaints.exp [new file with mode: 0644]