public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] Convert IS_TYPE_UNIT_GROUP to method Date: Sun, 08 Mar 2020 10:27:42 -0400 [thread overview] Message-ID: <197400e8009fa9a15ddc59cbf2cc32b0debd3424@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 197400e8009fa9a15ddc59cbf2cc32b0debd3424 *** commit 197400e8009fa9a15ddc59cbf2cc32b0debd3424 Author: Tom Tromey <tom@tromey.com> AuthorDate: Mon Feb 24 15:50:57 2020 -0700 Commit: Tom Tromey <tom@tromey.com> CommitDate: Mon Feb 24 15:50:57 2020 -0700 Convert IS_TYPE_UNIT_GROUP to method This converts the IS_TYPE_UNIT_GROUP to a method on dwarf2_per_cu_data. gdb/ChangeLog 2020-02-24 Tom Tromey <tom@tromey.com> * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>: New method. * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove. (dw2_do_instantiate_symtab, dw2_get_file_names) (build_type_psymtab_dependencies, load_full_type_unit): Update. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 044a1920ed..2507b9c7dd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2020-02-24 Tom Tromey <tom@tromey.com> + + * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>: + New method. + * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove. + (dw2_do_instantiate_symtab, dw2_get_file_names) + (build_type_psymtab_dependencies, load_full_type_unit): Update. + 2020-02-24 Tom Tromey <tom@tromey.com> * dwarf2read.c (dwarf2_build_psymtabs_hard): Use diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 701d19ebb7..0f514eafe8 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -573,9 +573,7 @@ struct type_unit_group /* dwarf2read.c's main "handle" on a TU symtab. To simplify things we create an artificial CU that "includes" all the type units using this stmt_list so that the rest of the code still has - a "per_cu" handle on the symtab. - This PER_CU is recognized by having no section. */ -#define IS_TYPE_UNIT_GROUP(per_cu) ((per_cu)->section == NULL) + a "per_cu" handle on the symtab. */ struct dwarf2_per_cu_data per_cu; /* The TUs that share this DW_AT_stmt_list entry. @@ -2322,7 +2320,7 @@ dw2_do_instantiate_symtab (struct dwarf2_per_cu_data *per_cu, bool skip_partial) /* Skip type_unit_groups, reading the type units they contain is handled elsewhere. */ - if (IS_TYPE_UNIT_GROUP (per_cu)) + if (per_cu->type_unit_group_p ()) return; /* The destructor of dwarf2_queue_guard frees any entries left on @@ -3178,7 +3176,7 @@ dw2_get_file_names (struct dwarf2_per_cu_data *this_cu) /* This should never be called for TUs. */ gdb_assert (! this_cu->is_debug_types); /* Nor type unit groups. */ - gdb_assert (! IS_TYPE_UNIT_GROUP (this_cu)); + gdb_assert (! this_cu->type_unit_group_p ()); if (this_cu->v.quick->file_names != NULL) return this_cu->v.quick->file_names; @@ -7583,7 +7581,7 @@ build_type_psymtab_dependencies (void **slot, void *info) int i; gdb_assert (len > 0); - gdb_assert (IS_TYPE_UNIT_GROUP (per_cu)); + gdb_assert (per_cu->type_unit_group_p ()); pst->number_of_dependencies = len; pst->dependencies = objfile->partial_symtabs->allocate_dependencies (len); @@ -22718,7 +22716,7 @@ load_full_type_unit (struct dwarf2_per_cu_data *per_cu) struct signatured_type *sig_type; /* Caller is responsible for ensuring type_unit_groups don't get here. */ - gdb_assert (! IS_TYPE_UNIT_GROUP (per_cu)); + gdb_assert (! per_cu->type_unit_group_p ()); /* We have the per_cu, but we need the signatured_type. Fortunately this is an easy translation. */ diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index b06c2e218c..f7e740c3e9 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -437,6 +437,13 @@ struct dwarf2_per_cu_data { return dwarf_version; } + + /* A type unit group has a per_cu object that is recognized by + having no section. */ + bool type_unit_group_p () const + { + return section == nullptr; + } }; /* Entry in the signatured_types hash table. */
next reply other threads:[~2020-03-08 14:27 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-08 14:27 gdb-buildbot [this message] 2020-03-08 14:27 ` Failures on Fedora-i686, branch master gdb-buildbot 2020-03-08 14:56 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot 2020-03-08 15:33 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2020-03-08 15:36 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2020-03-08 16:13 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2020-03-09 20:48 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot 2020-03-11 2:26 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=197400e8009fa9a15ddc59cbf2cc32b0debd3424@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).