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: [PATCH V3 1/9] Adapt `info probes' to support printing probes of different types.


On Friday, November 14 2014, Pedro Alves wrote:

> On 10/31/2014 06:56 PM, Sergio Durigan Junior wrote:
>> Also, any particular reason why you did not create a field "type" inside
>> "struct probe", instead of making a function that returns the string?  I
>> consider the field would be simpler (i.e., not pollute the probe_ops
>> structure), and it could be set when creating the probes.
>
> Not sure I understood it (and probably doesn't matter much), seems like
> that'd waste memory storing the same info over and over?

We would be wasting sizeof (char *) for each probe created, indeed, but
I think this is clearer (also for debugging purposes) than having all
the necessary machinery to call a function that will return the same
info...

Anyway, I won't oppose the current approach too, I was just curious :-P.

-- 
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


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