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: Bug in i386_process_record?


On Fri, Aug 28, 2009 at 09:35, Michael Snyder<msnyder@vmware.com> wrote:
> Hui Zhu wrote:
>>
>> On Thu, Aug 27, 2009 at 09:43, Hui Zhu<teawater@gmail.com> wrote:
>>>
>>> On Thu, Aug 27, 2009 at 08:28, Michael Snyder<msnyder@vmware.com> wrote:
>>>>
>>>> Do you think you could add some new tests to i386-reverse.exp,
>>>> to verify the string instructions?
>>>>
>>>> Thanks,
>>>> Michael
>>>>
>>> OK. I will do it.
>>>
>>> Thanks,
>>> Hui
>>>
>>
>> Hi Michael,
>>
>> I make a patch to add the test for string insn.
>>
>> Please help me review it.
>
> Good start -- but you need to write some expect script to go with it!
> ;-)

Hi Michael,

This patch can make inferior without string_insn_patch get fail in:
gdb_test "continue" \
    " end of main .*" \
    "continue to end of main"
Prec will get error in asm volatile("rep\n" line when continue.

Do you think I need make string_insn test  divide with inc_test in
expect script?

Thanks,
Hui

>
>
>> 2009-08-27 ?Hui Zhu ?<teawater@gmail.com>
>>
>> ? ? ? ?* gdb.reverse/i386-reverse.c (string_insn_tests): New function.
>> ? ? ? ?(main): Call "string_insn_tests".
>>
>> ---
>> ?testsuite/gdb.reverse/i386-reverse.c | ? 16 ++++++++++++++++
>> ?1 file changed, 16 insertions(+)
>>
>> --- a/testsuite/gdb.reverse/i386-reverse.c
>> +++ b/testsuite/gdb.reverse/i386-reverse.c
>> @@ -38,9 +38,25 @@ inc_dec_tests (void)
>> ? asm ("dec %edi");
>> ?} /* end inc_dec_tests */
>>
>> +void
>> +string_insn_tests (void)
>> +{
>> + ?register char x asm("ax");
>> + ?char *dstp = (char *) 1;
>> + ?int d0;
>> + ?int len = 0;
>> +
>> + ?asm volatile("rep\n"
>> + ? ? ? ? ? ? ?"stosb" /* %0, %2, %3 */ :
>> + ? ? ? ? ? ? ?"=D" (dstp), "=c" (d0) :
>> + ? ? ? ? ? ? ?"0" (dstp), "1" (len), "a" (x) :
>> + ? ? ? ? ? ? ?"memory");
>> +}
>> +
>> ?int
>> ?main ()
>> ?{
>> ? inc_dec_tests ();
>> + ?string_insn_tests ();
>> ? return 0; ? ?/* end of main */
>> ?}
>
>


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