From: Yao Qi <qiyaoltc@gmail.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>,
"Wiederhake\, Tim" <tim.wiederhake@intel.com>,
xdje42@gmail.com
Subject: Re: GDB 8.0 release/branching 2017-03-20 update
Date: Tue, 21 Mar 2017 13:07:00 -0000 [thread overview]
Message-ID: <86zigevkv0.fsf@gmail.com> (raw)
In-Reply-To: <CAH=s-PP5HtpcGxGVBQ7eYaO_reV=GggZ6eVv5Nhs8kChNJHVLQ@mail.gmail.com> (Yao Qi's message of "Mon, 20 Mar 2017 22:39:12 +0000")
Yao Qi <qiyaoltc@gmail.com> writes:
[cc Doug who reviewed the patches v6]
> I'll post my design draft tomorrow, then people can compare
> the current design to mine. If we think we need to improve the
> current design, it is unlikely to get it done by 8.0.
Python APIs of record and btrace
This summarizes the new added record and btrace Python APIs, in order
to facilitate the discussion that whether we need to release them in
8.0.
* Current status and design
These new python APIs and classes are added to master already.
BtraceInstruction
{
int number;
int error;
gdb.Symtab_and_line sal;
pc, data, decoded, size;
is_speculative;
};
BtraceFunctionCall
{
int number;
gdb.Symbol symbol;
int level;
BtraceInstruction instructions;
BtraceFunctionCall up, prev_sibling, next_sibling;
};
gdb.current_recording (), gdb.start_recording and
gdb.stop_recording (),
Record
{
ptid;
format;
begin, end;
replay_position;
instruction_history, function_call_history;
};
* Issues in the APIs and suggestions
1. BtraceInstruction.sal is not necessary. It can be got via
gdb.find_pc_line(BtraceInstruction.pc).
2. BtraceInstruction has some attributes (pc, data, decoded, and size,)
which are not btrace related.
They should be moved to a new class gdb.Instruction and BtraceInstruction
extends it.
Instruction
{
pc, data, decode, size;
};
BtraceInstruction : Instruction
{
int number;
int error;
is_speculative;
};
gdb.Instruction can be used in somewhere else, for example, we can add
a function Inferior.read_code (address), which returns gdb.Instruction.
The record of other methods, like "full", can get its own instructions,
but they have to be extended from gdb.Instruction. Just like
gdb.FinishBreakpoint extends gdb.Breakpoint.
3. Why does Record have an attribute ptid?
Other record method may have process-wide record/trace. I'd like to put
common attributes in Record, and extend Record for each specific record
method.
Record
{
method, format;
instruction_history;
};
BtraceRecord : Record
{
ptid;
...
};
FullRecord : Record
{
};
gdb.current_recording () can be a factory returning the right Record
object according to target_record_method (inferior_ptid).
* Actions
According to my analysis above, these APIs still need some adjustments
and re-designs, so I request to revert these commits below,
cee59b3 Fix break on Python 2
0a0faf9 Add documentation for new record Python bindings.
714aa61 python: Add tests for record Python bindings
75c0bdf python: Implement btrace Python bindings for record history.
4726b2d python: Create Python bindings for record history.
and add them back gradually after 8.0 release. To be clear, I can offer
some times review the new design and patches later, but I don't take
over this project, Tim is still the owner.
--
Yao (齐尧)
next prev parent reply other threads:[~2017-03-21 13:07 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 20:16 Joel Brobecker
2017-03-20 20:21 ` Keith Seitz
2017-03-20 22:39 ` Yao Qi
2017-03-20 22:47 ` Yao Qi
2017-03-20 22:52 ` Joel Brobecker
2017-03-20 23:03 ` Yao Qi
2017-03-21 13:28 ` Joel Brobecker
2017-03-21 7:35 ` Wiederhake, Tim
2017-03-21 13:28 ` Joel Brobecker
2017-03-21 13:07 ` Yao Qi [this message]
2017-03-21 13:31 ` Joel Brobecker
2017-03-22 13:58 ` Metzger, Markus T
2017-03-22 17:09 ` Yao Qi
2017-03-23 16:01 ` Metzger, Markus T
2017-03-23 17:25 ` Yao Qi
2017-03-23 18:17 ` Metzger, Markus T
2017-03-24 14:41 ` Yao Qi
2017-03-27 10:51 ` Metzger, Markus T
2017-03-27 11:19 ` Yao Qi
2017-03-27 12:46 ` Metzger, Markus T
2017-03-27 16:03 ` Yao Qi
2017-03-28 7:16 ` Metzger, Markus T
2017-03-28 13:25 ` Yao Qi
2017-03-28 15:08 ` Metzger, Markus T
2017-03-28 15:49 ` Yao Qi
2017-03-29 6:08 ` Metzger, Markus T
[not found] ` <861stgo072.fsf@gmail.com>
2017-03-29 14:38 ` Metzger, Markus T
2017-03-30 10:50 ` Yao Qi
2017-03-30 11:58 ` Metzger, Markus T
[not found] ` <86h92a4w86.fsf@gmail.com>
2017-03-30 15:55 ` Metzger, Markus T
2017-03-31 13:55 ` Yao Qi
2017-03-31 15:21 ` Metzger, Markus T
2017-03-31 16:02 ` Joel Brobecker
2017-04-06 14:40 ` Wiederhake, Tim
2017-04-07 8:10 ` Yao Qi
2017-04-07 11:53 ` Wiederhake, Tim
2017-04-07 15:19 ` Yao Qi
2017-03-21 14:00 ` Yao Qi
2017-03-21 14:03 ` Pedro Alves
2017-03-27 13:35 ` Antoine Tremblay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86zigevkv0.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tim.wiederhake@intel.com \
--cc=xdje42@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox