This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 08/22] Record minimal symbols directly in reader.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]