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 6/9] agent capability of static tracepoint


On 02/24/2012 01:12 PM, Yao Qi wrote:
> On 02/24/2012 05:51 AM, Pedro Alves wrote:
>> > Hmm, this looks backwards.  We're reading the existence of a global in
>> > the agent called "ust_loaded", indicating whether it has loaded
>> > ust, and after, we check for the static trace capability.  If
>> > "ust_loaded" exists in the agent, then it sure understands static
>> > tracepoints.  The right check is:
>> > 
>> >  1. does the agent understand static tracepoints?
>> >  2. yes?  good.  and, is ust loaded perchance?
>> > 
>> > If the agent doesn't understand AGENT_CAPA_STATIC_TRACE,
>> > then you'd fail right on the ust_loaded read, or some other
>> > mechanism to check whether ust is in fact loaded in the inferior.
>> > 
> This logic makes sense to me.

Then can you revert the rename please (and the reindent it caused)?
Reading the callers, "loaded" is stronger than "supports", which would
be true even if ust is not loaded.  Let's leave a rename out until the
semantics of the function changes.

>  /* Returns true if both the in-process agent library and the static
> -   tracepoints libraries are loaded in the inferior.  */
> +   tracepoints libraries are loaded in the inferior, and agent has
> +   capability on static tracepoints.  */

s/on/for

Okay with those changes.

-- 
Pedro Alves


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