This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 08/22] Record minimal symbols directly in reader.
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>, Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 6 Oct 2016 02:12:49 +0100
- Subject: Re: [RFA 08/22] Record minimal symbols directly in reader.
- Authentication-results: sourceware.org; auth=none
- References: <1474949330-4307-1-git-send-email-tom@tromey.com> <1474949330-4307-9-git-send-email-tom@tromey.com> <1bd8bed63872ee567495bf23bc3fe35f@simark.ca>
On 10/01/2016 05:29 AM, Simon Marchi wrote:
> On 2016-09-27 00:08, Tom Tromey wrote:
>> This patch changes minimal symbol creation in two ways. First, it
>> removes global variables in favor of members of
>> scoped_minimal_symbol_reader. Second, it changes functions like
>> prim_record_minimal_symbol to be member functions of
>> scoped_minimal_symbol_reader.
>
> I think this patch (and the previous ones that lead to it) are great.
> That's the kind of thing that will make the data flow easier to understand.
>
> About the naming, it's a bit of a nit, but since it might set the
> standard for future classes, I prefer to ask anyway. Does it help in
> any way to prefix this class' name with "scoped_"? All C++
> class/objects are "scoped" when statically allocated in a scope, meaning
> that they get destroyed when execution goes out of that scope. So it's
> not really the property of the class itself that it's scoped, more about
> how it's being used. It would be a bit like naming "std::string" ->
> "std::scoped_string", since it frees its resources when being destroyed.
> "minimal_symbol_reader" sounds like a perfect name for that class,
> doesn't it?
>
> On the other hand, I think scoped_restore is appropriately named, since
> it conveys that its primary (and only?) reason to exist is to be used in
> conjunction with scopes to do some variable restoring.
Seconded.
Sorry, hadn't read your reply yet when I sent the previous email.
Thanks,
Pedro Alves