[PATCH v3 0/4] tracepoint multithread and multiprocess support

Hui Zhu hui_zhu@mentor.com
Tue Dec 31 03:28:00 GMT 2013


According to the comments from Pedro, I merged the tracepoint multithread
and multiprocess support that write by myself with Luis's multiprocess
tracepoint support.
Now, these patches make GDB and gdbserver support:
1. Multiprocess tracepoint support.
In GDB side, this functions is from Luis's patches (Thanks from remind
from Pedro).  It will make GDB save tracepoint's data to each inferior's
struct.  Then GDB will just conrol the tracepoint of current inferior.
In gdbserver side, according the from from Pedro, when get a tracepoint
that has "P" keep ptid in the tracepoint and check it when hits a tracepoint.

2. Multiprocess tracepoint together support.
In GDB side, it bases my v1 and v2 patches's design.  Keep old design of
GDB that control all the tracepoints together when gdbstub support "MultiProcessTracepointTogether".
And when GDB download tracepoint to gdbstub, it will send process ptid with it.
In gdbserver side, it doesn't support this function.

3. Multithread tracepoint support.
In GDB side, when gdb download tracepoint that for a special thread, it
will send thread ptid with it.
In gdbserver side, when get a tracepoint that has "P" keep ptid in the
tracepoint and check it when hits a tracepoint.

And I added a function that has relation with multithread and multiprocess
tracepoint.
When traceframe changed (tfind), GDB will check if this traceframe has
$pid, $lwp, $tid.  If so, Try to select this process and this thread that ptid
is $pid, $lwp, $tid.
If not, if this tracepoint has inferior's info or thread's info, try to
select this process and this thread.

These patches is tested and pass the regression test in x86_64 linux
native-extended-gdbserver and native-gdbserver.
I will introduce the patches clear in each of mail.
Please help me review them.

Thanks,
Hui



More information about the Gdb-patches mailing list