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 2/8] Use class to manage BFD reference counts


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

>> -    return NULL;
>> +    return gdb_bfd_ref_ptr ();

Pedro> This provides a good reason to have an implicit construction from
Pedro> nullptr_t.  You had it in the original gdbpy_reference
Pedro> submission, but I had asked to remove it.  If we add it back,
Pedro> these cases could be more clearly written as "return
Pedro> NULL/nullptr".  Could you do that, and then drop all the hunks
Pedro> like:

>> -    return NULL;
>> +    return gdb_bfd_ref_ptr ();

Pedro> ?

I did this.

Pedro> I think these could be:
Pedro>     std::string filename
Pedro>       = string_printf ("%.*s", filename_len, pathname);
Pedro>     std::string member_name
Pedro>       = string_printf ("%.*s", path_len - filename_len - 2, sep + 1));

I did this, but it's a bit ugly as solib_find isn't const-correct.

I'll send a new patch soon.

Tom


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