Re: [PATCH 2/2] new tracepoint downloaded MI notification.

Pedro Alves
2012-11-29T16:00:08Z

On 11/29/2012 03:46 PM, Yao Qi wrote:
> On 11/23/2012 02:32 AM, Pedro Alves wrote:
>> What about the case of connecting to a target that is tracing, after
>> disconnected tracing? Do we already tell the frontend somehow which
>> tracepoints are active on the target? Should tracepoints have an
>> "installed on target" field?
>>
>> Yao Qi wrote:
>>> >On 11/01/2012 03:09 AM, Marc Khouzam wrote:
>>>> >>Now that GDB pushes new tracepoints to the target immediately, that
>>>> >>use-case may not apply, but I wonder if there are other situations
>>>> >>where some tracepoints will be on the target and other will not?
>>> >
>>> >Yes, the pending tracepoints won't be downloaded after tracing is started until they are resolved. The notification is required for this case.
>> Ok. If the answer to my question above is yes, it might be this
>> notification ends up unnecessary in favor of a generic
>> =breakpoint-modified.
>
> Pedro, to make sure I don't misread your comments, I'd like to ask are you suggesting that we can add an 'installed on target' field for tracepoint in '=breakpoint-modified' notification?

Well, sort of, but by side effect, since =breakpoint-modified includes all
the fields of a breakpoint/tracepoint.

Say you've set up a disconnected tracing session, and then disconnect.
Later, you start a new clean gdb session, create a new tracepoint (never
downloaded/installed on the target), and reconnect. At this point, GDB will fetch
the target's tracepoint list, and sync it with GDB's. The frontend gets
a =breakpoint-created for each of those uploaded tracepoints, but it has
no clue why they were created / their installed status.

You end up with some tracepoints that are installed, and some that aren't
in GDB's list. Does the frontend know this today by some means I'm missing?
If not, does fixing this mean adding an "installed" property to
breakpoints/tracepoints? Say we added your new notification, and then fixed the
above as I'm suggesting. At that point, this new tracepoint downloaded
notification ends up being redundant.

So I'm trying to get us to think with a broad perspective around
the "installed on target" frontend needs.

--
Pedro Alves