mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 13:19:54 +00:00
Ignore dwarf struct types with DW_AT_declaration
Fixes #23557 Signed-off-by: wagner riffel <w@104d.net>
This commit is contained in:
parent
e8de77f5cc
commit
ed8ce7c0b2
@ -516,6 +516,10 @@ cleanup:
|
||||
static void parse_structure_type(Context *ctx, ut64 idx) {
|
||||
const RBinDwarfDie *die = &ctx->all_dies[idx];
|
||||
|
||||
if (find_attr_idx (die, DW_AT_declaration) != -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
RAnalBaseTypeKind kind;
|
||||
if (die->tag == DW_TAG_union_type) {
|
||||
kind = R_ANAL_BASE_TYPE_KIND_UNION;
|
||||
|
@ -824,3 +824,14 @@ EXPECT=<<EOF
|
||||
typedef char * string;
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=dwarf declaration dont overwrite type
|
||||
FILE=bins/elf/dwarf_typedecl
|
||||
CMDS=tsc
|
||||
EXPECT=<<EOF
|
||||
struct Foo {
|
||||
int bar;
|
||||
int baz;
|
||||
};
|
||||
EOF
|
||||
RUN
|
||||
|
Loading…
Reference in New Issue
Block a user