From: Simon Marchi <simon.marchi@polymtl.ca>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/5] Replace dw2_get_cu/dw2_get_cutu with methods of dwarf2_per_objfile
Date: Mon, 02 Apr 2018 17:21:00 -0000 [thread overview]
Message-ID: <f1f286c4cc12496b43b7070c65f35974@polymtl.ca> (raw)
In-Reply-To: <20180402161753.sq7cnm3shwbwtsgy@adacore.com>
On 2018-04-02 12:17, Joel Brobecker wrote:
> Hi Simon,
>
> On Sat, Mar 31, 2018 at 08:04:41PM -0400, Simon Marchi wrote:
>> Those two functions look like good candidates to become methods of
>> dwarf2_per_objfile. I did that, and added get_tu as well. When
>> replacing usages of dw2_get_cutu, I changed some instances to get_cutu
>> and others to get_cu, when appropriate (when we know we want a CU and
>> not a TU).
>>
>> gdb/ChangeLog:
>>
>> * dwarf2read.h (struct signatured_type): Forward declare.
>> (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
>> New methods.
>> * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
>> (dw2_get_cutu): ...this.
>> (dwarf2_per_objfile::get_cu): Rename from...
>> (dw2_get_cu): ...this.
>> (dwarf2_per_objfile::get_tu): New.
>> (create_addrmap_from_index): Adjust.
>> (create_addrmap_from_aranges): Adjust.
>> (dw2_find_last_source_symtab): Adjust.
>> (dw2_map_symtabs_matching_filename): Adjust.
>> (dw2_symtab_iter_next): Adjust.
>> (dw2_print_stats): Adjust.
>> (dw2_expand_all_symtabs): Adjust.
>> (dw2_expand_symtabs_with_fullname): Adjust.
>> (dw2_expand_marked_cus): Adjust.
>> (dw_expand_symtabs_matching_file_matcher): Adjust.
>> (dw2_map_symbol_filenames): Adjust.
>> (dw2_debug_names_iterator::next): Adjust.
>> (dwarf2_initialize_objfile): Adjust.
>> (set_partial_user): Adjust.
>> (dwarf2_build_psymtabs_hard): Adjust.
>
> Got time to look at this one to (and discover the dw2_get_cutu
> function).
> The patch looks good to me. Not only that, I see that you changed some
> of the "get_cutu" calls to either ::get_cu or ::get_tu when there was
> enough context to know which one it was that we were handling. This is
> a very nice enhancement, in my opinion.
>
> That's all the time I have to review this patch series for now.
> I may or may not be able to review the rest, so please anyone feel
> free to take a look.
Thanks, your input is appreciated!
next prev parent reply other threads:[~2018-04-02 17:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-01 0:04 [PATCH 0/5] Random dwarf2read.c improvements Simon Marchi
2018-04-01 0:04 ` [PATCH 1/5] Remove some unused variables in dwarf2read.c Simon Marchi
2018-04-02 16:00 ` Joel Brobecker
2018-04-01 0:04 ` [PATCH 3/5] Remove some usages of get_dwarf2_per_objfile Simon Marchi
2018-04-01 0:04 ` [PATCH 4/5] Make dwarf2_per_objfile::all_comp_units an std::vector Simon Marchi
2018-04-01 0:16 ` [PATCH 5/5] Make dwarf2_per_objfile::all_type_units " Simon Marchi
2018-04-01 0:16 ` [PATCH 2/5] Replace dw2_get_cu/dw2_get_cutu with methods of dwarf2_per_objfile Simon Marchi
2018-04-02 16:17 ` Joel Brobecker
2018-04-02 17:21 ` Simon Marchi [this message]
2018-04-07 18:01 ` [PATCH 0/5] Random dwarf2read.c improvements Simon Marchi
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=f1f286c4cc12496b43b7070c65f35974@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=brobecker@adacore.com \
--cc=gdb-patches@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: link
Be 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