* [RFA/RFC Prec] Add process record skip 6/6 (doc)
@ 2009-08-19 8:15 Hui Zhu
2009-08-19 18:45 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Hui Zhu @ 2009-08-19 8:15 UTC (permalink / raw)
To: gdb-patches ml, Michael Snyder, Anthony Green
[-- Attachment #1: Type: text/plain, Size: 990 bytes --]
2008-08-19 Hui Zhu <teawater@gmail.com>
* gdb.texinfo (Process Record and Replay): Document
'record skip', 'record skip enable' and 'record skip disable'.
---
doc/gdb.texinfo | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/doc/gdb.texinfo
+++ b/doc/gdb.texinfo
@@ -5190,6 +5190,21 @@ When record target runs in replay mode (
subsequent execution log and begin to record a new execution log starting
from the current address. This means you will abandon the previously
recorded ``future'' and begin recording a new ``future''.
+
+@kindex record skip
+@kindex rec skip
+@item record skip
+Show the status of record skip.
+
+@kindex record skip disable
+@kindex rec skip disable
+@item record skip disable @r{[}id@r{]}
+Disable the specified record skip entry (or all record skip entries).
+
+@kindex record skip enable
+@kindex rec skip enable
+@item record skip enable @r{[}id@r{]}
+Enable the specified record skip entry (or all record skip entries).
@end table
[-- Attachment #2: 6-skip-record-doc.txt --]
[-- Type: text/plain, Size: 833 bytes --]
---
doc/gdb.texinfo | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/doc/gdb.texinfo
+++ b/doc/gdb.texinfo
@@ -5190,6 +5190,21 @@ When record target runs in replay mode (
subsequent execution log and begin to record a new execution log starting
from the current address. This means you will abandon the previously
recorded ``future'' and begin recording a new ``future''.
+
+@kindex record skip
+@kindex rec skip
+@item record skip
+Show the status of record skip.
+
+@kindex record skip disable
+@kindex rec skip disable
+@item record skip disable @r{[}id@r{]}
+Disable the specified record skip entry (or all record skip entries).
+
+@kindex record skip enable
+@kindex rec skip enable
+@item record skip enable @r{[}id@r{]}
+Enable the specified record skip entry (or all record skip entries).
@end table
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-19 8:15 [RFA/RFC Prec] Add process record skip 6/6 (doc) Hui Zhu @ 2009-08-19 18:45 ` Eli Zaretskii 2009-08-23 3:52 ` Hui Zhu 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2009-08-19 18:45 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches, msnyder, green > From: Hui Zhu <teawater@gmail.com> > Date: Wed, 19 Aug 2009 16:12:13 +0800 > > 2008-08-19 Hui Zhu <teawater@gmail.com> > > * gdb.texinfo (Process Record and Replay): Document > 'record skip', 'record skip enable' and 'record skip disable'. Thanks. > +@kindex record skip > +@kindex rec skip > +@item record skip > +Show the status of record skip. > + > +@kindex record skip disable > +@kindex rec skip disable > +@item record skip disable @r{[}id@r{]} > +Disable the specified record skip entry (or all record skip entries). What is a ``record skip entry''? Without explaining that, this text is not helpful. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-19 18:45 ` Eli Zaretskii @ 2009-08-23 3:52 ` Hui Zhu 2009-08-23 22:48 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Hui Zhu @ 2009-08-23 3:52 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches, msnyder, green On Thu, Aug 20, 2009 at 02:41, Eli Zaretskii<eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> Date: Wed, 19 Aug 2009 16:12:13 +0800 >> >> 2008-08-19 Hui Zhu <teawater@gmail.com> >> >> * gdb.texinfo (Process Record and Replay): Document >> 'record skip', 'record skip enable' and 'record skip disable'. > > Thanks. > >> +@kindex record skip >> +@kindex rec skip >> +@item record skip >> +Show the status of record skip. >> + >> +@kindex record skip disable >> +@kindex rec skip disable >> +@item record skip disable @r{[}id@r{]} >> +Disable the specified record skip entry (or all record skip entries). > > What is a ``record skip entry''? Without explaining that, this text > is not helpful. > Hi Eli, I make a new patch that have some introduction about record skip entry. What do you think about it? Thanks, Hui --- doc/gdb.texinfo | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) --- a/doc/gdb.texinfo +++ b/doc/gdb.texinfo @@ -5190,6 +5190,27 @@ When record target runs in replay mode ( subsequent execution log and begin to record a new execution log starting from the current address. This means you will abandon the previously recorded ``future'' and begin recording a new ``future''. + +@kindex record skip +@kindex rec skip +@item record skip +The record skip entry is a special breakpoint. When the process +record and replay target start, it will be inserted to the +begin of a function. When this breakpoint break the inferior and +@value{GDBN} is in record mode, @value{GDBN} will skip record all +the execution log of this function's instructions and record the +change of memory and registers of this function as one instruction. +Show the status of record skip. + +@kindex record skip disable +@kindex rec skip disable +@item record skip disable @r{[}id@r{]} +Disable the specified record skip entry (or all record skip entries). + +@kindex record skip enable +@kindex rec skip enable +@item record skip enable @r{[}id@r{]} +Enable the specified record skip entry (or all record skip entries). @end table ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-23 3:52 ` Hui Zhu @ 2009-08-23 22:48 ` Eli Zaretskii 2009-08-24 9:53 ` Hui Zhu 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2009-08-23 22:48 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches, msnyder, green > From: Hui Zhu <teawater@gmail.com> > Date: Sun, 23 Aug 2009 11:33:28 +0800 > Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com > > I make a new patch that have some introduction about record skip entry. > What do you think about it? Thanks. This is much better, but I still don't understand something: > +The record skip entry is a special breakpoint. When the process > +record and replay target start, it will be inserted to the > +begin of a function. Which function is that? The 3 "rec skip" commands you document here don't give the user a way to specify any functions. So how does process record know what function(s) to skip? > When this breakpoint break the inferior and > +@value{GDBN} is in record mode, @value{GDBN} will skip record all > +the execution log of this function's instructions and record the > +change of memory and registers of this function as one instruction. Why is this feature useful? > +Show the status of record skip. Will this produce a list of all rec skip entries, or will it just show the status of the ``current'' record skip (whatever ``current'' may mean in this context)? If it shows a list, how about an example of what this list looks like? Once I understand these issues, I will be able to suggest how to reword this text to be more clear, and also improve the markup. Thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-23 22:48 ` Eli Zaretskii @ 2009-08-24 9:53 ` Hui Zhu 2009-08-24 19:14 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Hui Zhu @ 2009-08-24 9:53 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches, msnyder, green On Mon, Aug 24, 2009 at 02:31, Eli Zaretskii<eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> Date: Sun, 23 Aug 2009 11:33:28 +0800 >> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com >> >> I make a new patch that have some introduction about record skip entry. >> What do you think about it? > > Thanks. This is much better, but I still don't understand something: > >> +The record skip entry is a special breakpoint. When the process >> +record and replay target start, it will be inserted to the >> +begin of a function. > > Which function is that? The 3 "rec skip" commands you document here > don't give the user a way to specify any functions. So how does > process record know what function(s) to skip? Because the change of each function is special, function record_skip_entry_create need a special record function pointer for each function that want to skip. For example, in "5-skip-record-i386-linux.txt". + record_skip_entry_create (gdbarch, "printf", + i386_linux_process_record_simple_function); + record_skip_entry_create (gdbarch, "memset", + i386_linux_process_record_memset); + record_skip_entry_create (gdbarch, "memcpy", + i386_linux_process_record_memset); i386_linux_process_record_simple_function is for printf. i386_linux_process_record_memset is for memset and memcpy. > >> When this breakpoint break the inferior and >> +@value{GDBN} is in record mode, @value{GDBN} will skip record all >> +the execution log of this function's instructions and record the >> +change of memory and registers of this function as one instruction. > > Why is this feature useful? My introduce is not very clear. Without the skip, to record a function, it need record all the insn change: 1. It need step by step. Speed is low. 2. It need record the change of each insn, it will need a lot of memory. With the skip, to record a function, it just record the change in the begin of function, after that, continue. 1. It doesn't need step by step. Speed is hight. 2. it doesn't need record the each insn, it will not need a lot of memory. Could you help me make this introduce clear? > >> +Show the status of record skip. > > Will this produce a list of all rec skip entries, or will it just show > the status of the ``current'' record skip (whatever ``current'' may > mean in this context)? If it shows a list, how about an example of > what this list looks like? This is a example: (top-gdb) record skip Process record is not skip. Id Enb Address What 1 y 0xb7c07330 printf 2 y 0xb7c334b0 memset 3 y 0xb7c339a0 memcpy (top-gdb) record skip disable 3 (top-gdb) record skip Process record is not skip. Id Enb Address What 1 y 0xb7c07330 printf 2 y 0xb7c334b0 memset 3 n 0xb7c339a0 memcpy (top-gdb) record skip enable (top-gdb) record skip Process record is not skip. Id Enb Address What 1 y 0xb7c07330 printf 2 y 0xb7c334b0 memset 3 y 0xb7c339a0 memcpy > > Once I understand these issues, I will be able to suggest how to > reword this text to be more clear, and also improve the markup. I will try to make the the doc more clear with your help. Thanks a lot. :) Hui ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-24 9:53 ` Hui Zhu @ 2009-08-24 19:14 ` Eli Zaretskii 2009-08-25 4:25 ` Hui Zhu 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2009-08-24 19:14 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches, msnyder, green > From: Hui Zhu <teawater@gmail.com> > Date: Mon, 24 Aug 2009 16:49:42 +0800 > Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com > > Because the change of each function is special, function > record_skip_entry_create need a special record function pointer for > each function that want to skip. For example, in > "5-skip-record-i386-linux.txt". > + record_skip_entry_create (gdbarch, "printf", > + i386_linux_process_record_simple_function); > + record_skip_entry_create (gdbarch, "memset", > + i386_linux_process_record_memset); > + record_skip_entry_create (gdbarch, "memcpy", > + i386_linux_process_record_memset); > > i386_linux_process_record_simple_function is for printf. > i386_linux_process_record_memset is for memset and memcpy. So we currently support record skip of only 3 functions, the ones mentioned above, is that right? In that case, we should document those functions in the manual, I think. > Without the skip, to record a function, it need record all the insn change: > 1. It need step by step. Speed is low. > 2. It need record the change of each insn, it will need a lot of memory. > > With the skip, to record a function, it just record the change in the > begin of function, after that, continue. > 1. It doesn't need step by step. Speed is hight. > 2. it doesn't need record the each insn, it will not need a lot of memory. Do we lose any information because of skip? If not, why don't we do that always, why do we need an option to enable and disable that? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-24 19:14 ` Eli Zaretskii @ 2009-08-25 4:25 ` Hui Zhu 2009-08-26 17:54 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Hui Zhu @ 2009-08-25 4:25 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches, msnyder, green On Tue, Aug 25, 2009 at 03:03, Eli Zaretskii<eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> Date: Mon, 24 Aug 2009 16:49:42 +0800 >> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com >> >> Because the change of each function is special, function >> record_skip_entry_create need a special record function pointer for >> each function that want to skip. For example, in >> "5-skip-record-i386-linux.txt". >> + record_skip_entry_create (gdbarch, "printf", >> + i386_linux_process_record_simple_function); >> + record_skip_entry_create (gdbarch, "memset", >> + i386_linux_process_record_memset); >> + record_skip_entry_create (gdbarch, "memcpy", >> + i386_linux_process_record_memset); >> >> i386_linux_process_record_simple_function is for printf. >> i386_linux_process_record_memset is for memset and memcpy. > > So we currently support record skip of only 3 functions, the ones > mentioned above, is that right? In that case, we should document > those functions in the manual, I think. Yes, I think after this feature in, we can add more and more functions to support skip. What do you think about the doc like this: The record skip support following functions: I386-Linux printf, memcpy, memset. > >> Without the skip, to record a function, it need record all the insn change: >> 1. It need step by step. Speed is low. >> 2. It need record the change of each insn, it will need a lot of memory. >> >> With the skip, to record a function, it just record the change in the >> begin of function, after that, continue. >> 1. It doesn't need step by step. Speed is hight. >> 2. it doesn't need record the each insn, it will not need a lot of memory. > > Do we lose any information because of skip? If not, why don't we do > that always, why do we need an option to enable and disable that? > This is a very good question. It will not lose any information. I add a disable function because if customer want reverse debug inside the function, he will need setp by step without skip like in before. For example, debug the libc. Thanks, Hui ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-25 4:25 ` Hui Zhu @ 2009-08-26 17:54 ` Eli Zaretskii 2009-08-31 13:59 ` Hui Zhu 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2009-08-26 17:54 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches, msnyder, green > From: Hui Zhu <teawater@gmail.com> > Date: Tue, 25 Aug 2009 11:47:09 +0800 > Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com > > >> i386_linux_process_record_simple_function is for printf. > >> i386_linux_process_record_memset is for memset and memcpy. > > > > So we currently support record skip of only 3 functions, the ones > > mentioned above, is that right? Â In that case, we should document > > those functions in the manual, I think. > > Yes, I think after this feature in, we can add more and more functions > to support skip. But then the proposed code is IMHO awfully limited, isn't it? Why not add some more general mechanism, for several broad classes of functions (like the `simple_function' class you used for `printf'), and let the user specify which functions she wants to skip, instead of hard-coding the functions in GDB? By contrast, the suggested code will cause us to have gobs of library functions intimately known to GDB, and will bloat the executable, for starters. Also, why is this code being make Linux-specific? Surely, most, if not all, other implementations of `printf', `memset' and `memcpy' have the exact same API and the same external effects as those you have in glibc, no? > What do you think about the doc like this: > The record skip support following functions: > I386-Linux printf, memcpy, memset. If we want to hard-code the functions, then we need something like this in the manual: Only some standard functions are currently supported by the @code{record skip} command; type the command without arguments to see the full list. > > Do we lose any information because of skip? Â If not, why don't we do > > that always, why do we need an option to enable and disable that? > > > > This is a very good question. > It will not lose any information. > I add a disable function because if customer want reverse debug inside > the function, he will need setp by step without skip like in before. > For example, debug the libc. Okay, but then at least let's have it on by default. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-26 17:54 ` Eli Zaretskii @ 2009-08-31 13:59 ` Hui Zhu 2009-08-31 17:41 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Hui Zhu @ 2009-08-31 13:59 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches, msnyder, green [-- Attachment #1: Type: text/plain, Size: 4230 bytes --] On Thu, Aug 27, 2009 at 01:50, Eli Zaretskii<eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> Date: Tue, 25 Aug 2009 11:47:09 +0800 >> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com >> >> >> i386_linux_process_record_simple_function is for printf. >> >> i386_linux_process_record_memset is for memset and memcpy. >> > >> > So we currently support record skip of only 3 functions, the ones >> > mentioned above, is that right? In that case, we should document >> > those functions in the manual, I think. >> >> Yes, I think after this feature in, we can add more and more functions >> to support skip. > > But then the proposed code is IMHO awfully limited, isn't it? Why > not add some more general mechanism, for several broad classes of > functions (like the `simple_function' class you used for `printf'), > and let the user specify which functions she wants to skip, instead of > hard-coding the functions in GDB? > > By contrast, the suggested code will cause us to have gobs of library > functions intimately known to GDB, and will bloat the executable, for > starters. > > Also, why is this code being make Linux-specific? Surely, most, if > not all, other implementations of `printf', `memset' and `memcpy' have > the exact same API and the same external effects as those you have in > glibc, no? The api is same, but the ABI for each arch and os is not same, each printf, memset or memcpy of each arch-os will get the argument from different memory and different register. And they will change different memory and reg. So it be designed to arch-os special. > >> What do you think about the doc like this: >> The record skip support following functions: >> I386-Linux printf, memcpy, memset. > > If we want to hard-code the functions, then we need something like > this in the manual: > > Only some standard functions are currently supported by the > @code{record skip} command; type the command without arguments to > see the full list. OK. > >> > Do we lose any information because of skip? If not, why don't we do >> > that always, why do we need an option to enable and disable that? >> > >> >> This is a very good question. >> It will not lose any information. >> I add a disable function because if customer want reverse debug inside >> the function, he will need setp by step without skip like in before. >> For example, debug the libc. > > Okay, but then at least let's have it on by default. > Yes, all of them will set to on by default. I make a new patch. Please help me with it. Thanks, Hui 2008-08-31 Hui Zhu <teawater@gmail.com> * gdb.texinfo (Process Record and Replay): Document 'record skip', 'record skip enable' and 'record skip disable'. --- doc/gdb.texinfo | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) --- a/doc/gdb.texinfo +++ b/doc/gdb.texinfo @@ -5214,6 +5214,31 @@ When record target runs in replay mode ( subsequent execution log and begin to record a new execution log starting from the current address. This means you will abandon the previously recorded ``future'' and begin recording a new ``future''. + +@kindex record skip +@kindex rec skip +@item record skip +The record skip entry is a special breakpoint. When the process +record and replay target start, it will be inserted to the +begin of a function. When this breakpoint break the inferior and +@value{GDBN} is in record mode, @value{GDBN} will skip record all +the execution log of this function's instructions and record the +change of memory and registers of this function as one instruction. +Show the status of record skip. + +Only some standard functions are currently supported by the +@code{record skip} command; type the command without arguments to +see the full list. + +@kindex record skip disable +@kindex rec skip disable +@item record skip disable @r{[}id@r{]} +Disable the specified record skip entry (or all record skip entries). + +@kindex record skip enable +@kindex rec skip enable +@item record skip enable @r{[}id@r{]} +Enable the specified record skip entry (or all record skip entries). @end table [-- Attachment #2: 6-skip-record-doc.txt --] [-- Type: text/plain, Size: 1388 bytes --] --- doc/gdb.texinfo | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) --- a/doc/gdb.texinfo +++ b/doc/gdb.texinfo @@ -5214,6 +5214,31 @@ When record target runs in replay mode ( subsequent execution log and begin to record a new execution log starting from the current address. This means you will abandon the previously recorded ``future'' and begin recording a new ``future''. + +@kindex record skip +@kindex rec skip +@item record skip +The record skip entry is a special breakpoint. When the process +record and replay target start, it will be inserted to the +begin of a function. When this breakpoint break the inferior and +@value{GDBN} is in record mode, @value{GDBN} will skip record all +the execution log of this function's instructions and record the +change of memory and registers of this function as one instruction. +Show the status of record skip. + +Only some standard functions are currently supported by the +@code{record skip} command; type the command without arguments to +see the full list. + +@kindex record skip disable +@kindex rec skip disable +@item record skip disable @r{[}id@r{]} +Disable the specified record skip entry (or all record skip entries). + +@kindex record skip enable +@kindex rec skip enable +@item record skip enable @r{[}id@r{]} +Enable the specified record skip entry (or all record skip entries). @end table ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-31 13:59 ` Hui Zhu @ 2009-08-31 17:41 ` Eli Zaretskii 2009-09-01 8:57 ` Hui Zhu 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2009-08-31 17:41 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches, msnyder, green > From: Hui Zhu <teawater@gmail.com> > Date: Mon, 31 Aug 2009 21:26:04 +0800 > Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com > > --000e0cd72d34f48d8004726ffae8 > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > > On Thu, Aug 27, 2009 at 01:50, Eli Zaretskii<eliz@gnu.org> wrote: > >> From: Hui Zhu <teawater@gmail.com> > >> Date: Tue, 25 Aug 2009 11:47:09 +0800 > >> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com > >> > >> >> i386_linux_process_record_simple_function is for printf. > >> >> i386_linux_process_record_memset is for memset and memcpy. > >> > > >> > So we currently support record skip of only 3 functions, the ones > >> > mentioned above, is that right? =A0In that case, we should document > >> > those functions in the manual, I think. > >> > >> Yes, I think after this feature in, we can add more and more functions > >> to support skip. > > > > But then the proposed code is IMHO awfully limited, isn't it? Why > > not add some more general mechanism, for several broad classes of > > functions (like the `simple_function' class you used for `printf'), > > and let the user specify which functions she wants to skip, instead of > > hard-coding the functions in GDB? > > > > By contrast, the suggested code will cause us to have gobs of library > > functions intimately known to GDB, and will bloat the executable, for > > starters. You didn't answer these concerns. Nor did anyone else; am I the only one who is bothered by the ad-hoc nature of such design? > > Also, why is this code being make Linux-specific? =A0Surely, most, if > > not all, other implementations of `printf', `memset' and `memcpy' have > > the exact same API and the same external effects as those you have in > > glibc, no? > > The api is same, but the ABI for each arch and os is not same, each > printf, memset or memcpy of each arch-os will get the argument from > different memory and different register. And they will change > different memory and reg. Are you talking in general, or are you talking about the x86 architecture? I think all x86 implementations of `printf' and `memset' will use the same ABI, certainly those that use GCC as the native compiler. > +The record skip entry is a special breakpoint. When the process > +record and replay target start, it will be inserted to the > +begin of a function. When this breakpoint break the inferior and ^^^^^ ^^^^^ ^^^^ "beginning" "breaks" ", if" > +@value{GDBN} is in record mode, @value{GDBN} will skip record all ^^^^^^^^^^^^^^^ "refrain from recording" > +the execution log of this function's instructions and record the ^^^^^^^^^^ "and only record" > +change of memory and registers of this function as one instruction. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "modifications of memory and registers by this function" > +Show the status of record skip. "This command shows the status of record skipping." > +@item record skip disable @r{[}id@r{]} ^^ "@var{id}" > +@item record skip enable @r{[}id@r{]} Likewise. OK with these changes. Thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-08-31 17:41 ` Eli Zaretskii @ 2009-09-01 8:57 ` Hui Zhu 2009-09-01 17:12 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Hui Zhu @ 2009-09-01 8:57 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches, msnyder, green [-- Attachment #1: Type: text/plain, Size: 5766 bytes --] On Tue, Sep 1, 2009 at 00:44, Eli Zaretskii<eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> Date: Mon, 31 Aug 2009 21:26:04 +0800 >> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com >> >> --000e0cd72d34f48d8004726ffae8 >> Content-Type: text/plain; charset=ISO-8859-1 >> Content-Transfer-Encoding: quoted-printable >> >> On Thu, Aug 27, 2009 at 01:50, Eli Zaretskii<eliz@gnu.org> wrote: >> >> From: Hui Zhu <teawater@gmail.com> >> >> Date: Tue, 25 Aug 2009 11:47:09 +0800 >> >> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com >> >> >> >> >> i386_linux_process_record_simple_function is for printf. >> >> >> i386_linux_process_record_memset is for memset and memcpy. >> >> > >> >> > So we currently support record skip of only 3 functions, the ones >> >> > mentioned above, is that right? =A0In that case, we should document >> >> > those functions in the manual, I think. >> >> >> >> Yes, I think after this feature in, we can add more and more functions >> >> to support skip. >> > >> > But then the proposed code is IMHO awfully limited, isn't it? Why >> > not add some more general mechanism, for several broad classes of >> > functions (like the `simple_function' class you used for `printf'), >> > and let the user specify which functions she wants to skip, instead of >> > hard-coding the functions in GDB? >> > >> > By contrast, the suggested code will cause us to have gobs of library >> > functions intimately known to GDB, and will bloat the executable, for >> > starters. > > You didn't answer these concerns. Nor did anyone else; am I the only > one who is bothered by the ad-hoc nature of such design? > Sorry I forgot it. I think this idea is not bad. But when user set a simple_function to GDB, check if this function is really a simple function or not is not easy. What about keep this idea and add special patch for it when gdb support record skip? >> > Also, why is this code being make Linux-specific? =A0Surely, most, if >> > not all, other implementations of `printf', `memset' and `memcpy' have >> > the exact same API and the same external effects as those you have in >> > glibc, no? >> >> The api is same, but the ABI for each arch and os is not same, each >> printf, memset or memcpy of each arch-os will get the argument from >> different memory and different register. And they will change >> different memory and reg. > > Are you talking in general, or are you talking about the x86 > architecture? I think all x86 implementations of `printf' and > `memset' will use the same ABI, certainly those that use GCC as the > native compiler. Yes, I think they are same in 32 bits. But x86 is special, it need support amd64 too. It's 64 bits and have another different registers. So.. I think the arch developer can call "record_skip_entry_create" in the place that he like. > >> +The record skip entry is a special breakpoint. When the process >> +record and replay target start, it will be inserted to the >> +begin of a function. When this breakpoint break the inferior and > ^^^^^ ^^^^^ ^^^^ > "beginning" "breaks" ", if" > >> +@value{GDBN} is in record mode, @value{GDBN} will skip record all > ^^^^^^^^^^^^^^^ > "refrain from recording" > >> +the execution log of this function's instructions and record the > ^^^^^^^^^^ > "and only record" > >> +change of memory and registers of this function as one instruction. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > "modifications of memory and registers by this function" > >> +Show the status of record skip. > > "This command shows the status of record skipping." > >> +@item record skip disable @r{[}id@r{]} > ^^ > "@var{id}" > >> +@item record skip enable @r{[}id@r{]} > > Likewise. > > OK with these changes. > > Thanks. > I make a new patch according to your comments. Please help me review it. Thanks, Hui --- doc/gdb.texinfo | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) --- a/doc/gdb.texinfo +++ b/doc/gdb.texinfo @@ -5214,6 +5214,31 @@ When record target runs in replay mode ( subsequent execution log and begin to record a new execution log starting from the current address. This means you will abandon the previously recorded ``future'' and begin recording a new ``future''. + +@kindex record skip +@kindex rec skip +@item record skip +The record skip entry is a special breakpoint. When the process +record and replay target start, it will be inserted to the +beginning of a function. When this breaks break, if +@value{GDBN} is in record mode, refrain from recording skip record all +the execution log of this function's instructions and only record the +modifications of memory and registers by this function. +This command shows the status of record skipping. + +Only some standard functions are currently supported by the +@code{record skip} command; type the command without arguments to +see the full list. + +@kindex record skip disable +@kindex rec skip disable +@item record skip disable @var{id} +Disable the specified record skip entry (or all record skip entries). + +@kindex record skip enable +@kindex rec skip enable +@item record skip enable @var{id} +Enable the specified record skip entry (or all record skip entries). @end table [-- Attachment #2: 6-skip-record-doc.txt --] [-- Type: text/plain, Size: 1383 bytes --] --- doc/gdb.texinfo | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) --- a/doc/gdb.texinfo +++ b/doc/gdb.texinfo @@ -5214,6 +5214,31 @@ When record target runs in replay mode ( subsequent execution log and begin to record a new execution log starting from the current address. This means you will abandon the previously recorded ``future'' and begin recording a new ``future''. + +@kindex record skip +@kindex rec skip +@item record skip +The record skip entry is a special breakpoint. When the process +record and replay target start, it will be inserted to the +beginning of a function. When this breaks break, if +@value{GDBN} is in record mode, refrain from recording skip record all +the execution log of this function's instructions and only record the +modifications of memory and registers by this function. +This command shows the status of record skipping. + +Only some standard functions are currently supported by the +@code{record skip} command; type the command without arguments to +see the full list. + +@kindex record skip disable +@kindex rec skip disable +@item record skip disable @var{id} +Disable the specified record skip entry (or all record skip entries). + +@kindex record skip enable +@kindex rec skip enable +@item record skip enable @var{id} +Enable the specified record skip entry (or all record skip entries). @end table ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-09-01 8:57 ` Hui Zhu @ 2009-09-01 17:12 ` Eli Zaretskii 2009-09-02 12:01 ` Hui Zhu 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2009-09-01 17:12 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb-patches, msnyder, green > From: Hui Zhu <teawater@gmail.com> > Date: Tue, 1 Sep 2009 16:56:42 +0800 > Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com > > I think this idea is not bad. But when user set a simple_function to > GDB, check if this function is really a simple function or not is not > easy. Why should GDB care? Let the user care. > What about keep this idea and add special patch for it when gdb > support record skip? <Shrug> If no one else is concerned about this, I can live with that. > +beginning of a function. When this breaks break, if ^^^^^^^^^^^^^^^^^^^^^^ "When this breakpoint breaks" Otherwise, fine. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA/RFC Prec] Add process record skip 6/6 (doc) 2009-09-01 17:12 ` Eli Zaretskii @ 2009-09-02 12:01 ` Hui Zhu 0 siblings, 0 replies; 13+ messages in thread From: Hui Zhu @ 2009-09-02 12:01 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches, msnyder, green On Wed, Sep 2, 2009 at 01:10, Eli Zaretskii<eliz@gnu.org> wrote: >> From: Hui Zhu <teawater@gmail.com> >> Date: Tue, 1 Sep 2009 16:56:42 +0800 >> Cc: gdb-patches@sourceware.org, msnyder@vmware.com, green@moxielogic.com >> >> I think this idea is not bad. But when user set a simple_function to >> GDB, check if this function is really a simple function or not is not >> easy. > > Why should GDB care? Let the user care. > >> What about keep this idea and add special patch for it when gdb >> support record skip? > > <Shrug> If no one else is concerned about this, I can live with that. Please don't worry about it. I will post it to wiki. > >> +beginning of a function. When this breaks break, if > ^^^^^^^^^^^^^^^^^^^^^^ > "When this breakpoint breaks" > > Otherwise, fine. > Thanks a lot. Hui --- doc/gdb.texinfo | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) --- a/doc/gdb.texinfo +++ b/doc/gdb.texinfo @@ -5214,6 +5214,31 @@ When record target runs in replay mode ( subsequent execution log and begin to record a new execution log starting from the current address. This means you will abandon the previously recorded ``future'' and begin recording a new ``future''. + +@kindex record skip +@kindex rec skip +@item record skip +The record skip entry is a special breakpoint. When the process +record and replay target start, it will be inserted to the +beginning of a function. When this breakpoint breaks, if +@value{GDBN} is in record mode, refrain from recording skip record all +the execution log of this function's instructions and only record the +modifications of memory and registers by this function. +This command shows the status of record skipping. + +Only some standard functions are currently supported by the +@code{record skip} command; type the command without arguments to +see the full list. + +@kindex record skip disable +@kindex rec skip disable +@item record skip disable @var{id} +Disable the specified record skip entry (or all record skip entries). + +@kindex record skip enable +@kindex rec skip enable +@item record skip enable @var{id} +Enable the specified record skip entry (or all record skip entries). @end table ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-09-02 12:01 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-08-19 8:15 [RFA/RFC Prec] Add process record skip 6/6 (doc) Hui Zhu 2009-08-19 18:45 ` Eli Zaretskii 2009-08-23 3:52 ` Hui Zhu 2009-08-23 22:48 ` Eli Zaretskii 2009-08-24 9:53 ` Hui Zhu 2009-08-24 19:14 ` Eli Zaretskii 2009-08-25 4:25 ` Hui Zhu 2009-08-26 17:54 ` Eli Zaretskii 2009-08-31 13:59 ` Hui Zhu 2009-08-31 17:41 ` Eli Zaretskii 2009-09-01 8:57 ` Hui Zhu 2009-09-01 17:12 ` Eli Zaretskii 2009-09-02 12:01 ` Hui Zhu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox