Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA/RFC] Prec multi-thread support [1/4] X86 insn support
@ 2009-11-25  8:06 Hui Zhu
  2009-11-25 10:44 ` Mark Kettenis
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hui Zhu @ 2009-11-25  8:06 UTC (permalink / raw)
  To: gdb-patches ml; +Cc: Michael Snyder

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

When I debug i386 multi-thread inferior, it need support int3 and
rdtsc.  So make a patch to support them.

2009-11-24  Hui Zhu  <teawater@gmail.com>

	* i386-tdep.c (i386_process_record): Add code for int3 and rdtsc.

---
 i386-tdep.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

--- a/i386-tdep.c
+++ b/i386-tdep.c
@@ -4847,10 +4847,6 @@ reswitch:
       /* int3 */
       /* XXX */
     case 0xcc:
-      printf_unfiltered (_("Process record doesn't support instruction "
-               "int3.\n"));
-      ir.addr -= 1;
-      goto no_support;
       break;

       /* int */
@@ -4958,10 +4954,8 @@ reswitch:

       /* rdtsc */
     case 0x0f31:
-      printf_unfiltered (_("Process record doesn't support "
-               "instruction rdtsc.\n"));
-      ir.addr -= 2;
-      goto no_support;
+      I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
+      I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REDX_REGNUM);
       break;

       /* sysenter */

[-- Attachment #2: prec-x86-add-insn.txt --]
[-- Type: text/plain, Size: 753 bytes --]

---
 i386-tdep.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

--- a/i386-tdep.c
+++ b/i386-tdep.c
@@ -4847,10 +4847,6 @@ reswitch:
       /* int3 */
       /* XXX */
     case 0xcc:
-      printf_unfiltered (_("Process record doesn't support instruction "
-			   "int3.\n"));
-      ir.addr -= 1;
-      goto no_support;
       break;
 
       /* int */
@@ -4958,10 +4954,8 @@ reswitch:
 
       /* rdtsc */
     case 0x0f31:
-      printf_unfiltered (_("Process record doesn't support "
-			   "instruction rdtsc.\n"));
-      ir.addr -= 2;
-      goto no_support;
+      I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
+      I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REDX_REGNUM);
       break;
 
       /* sysenter */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/RFC] Prec multi-thread support [1/4] X86 insn support
  2009-11-25  8:06 [RFA/RFC] Prec multi-thread support [1/4] X86 insn support Hui Zhu
@ 2009-11-25 10:44 ` Mark Kettenis
  2009-11-25 10:57   ` Hui Zhu
  2009-11-25 20:04 ` Michael Snyder
  2009-11-30 19:58 ` Tom Tromey
  2 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2009-11-25 10:44 UTC (permalink / raw)
  To: teawater; +Cc: gdb-patches, msnyder

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

> From: Hui Zhu <teawater@gmail.com>
> Date: Wed, 25 Nov 2009 16:05:44 +0800
> 
> When I debug i386 multi-thread inferior, it need support int3 and
> rdtsc.  So make a patch to support them.
> 
> 2009-11-24  Hui Zhu  <teawater@gmail.com>
> 
> 	* i386-tdep.c (i386_process_record): Add code for int3 and rdtsc.

Looks reasonable to me.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/RFC] Prec multi-thread support [1/4] X86 insn support
  2009-11-25 10:44 ` Mark Kettenis
@ 2009-11-25 10:57   ` Hui Zhu
  0 siblings, 0 replies; 6+ messages in thread
From: Hui Zhu @ 2009-11-25 10:57 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches, msnyder

Thanks.

Hui

On Wed, Nov 25, 2009 at 18:43, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> From: Hui Zhu <teawater@gmail.com>
>> Date: Wed, 25 Nov 2009 16:05:44 +0800
>>
>> When I debug i386 multi-thread inferior, it need support int3 and
>> rdtsc.  So make a patch to support them.
>>
>> 2009-11-24  Hui Zhu  <teawater@gmail.com>
>>
>>       * i386-tdep.c (i386_process_record): Add code for int3 and rdtsc.
>
> Looks reasonable to me.
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/RFC] Prec multi-thread support [1/4] X86 insn support
  2009-11-25  8:06 [RFA/RFC] Prec multi-thread support [1/4] X86 insn support Hui Zhu
  2009-11-25 10:44 ` Mark Kettenis
@ 2009-11-25 20:04 ` Michael Snyder
  2009-11-30 19:58 ` Tom Tromey
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Snyder @ 2009-11-25 20:04 UTC (permalink / raw)
  To: Hui Zhu; +Cc: gdb-patches ml

This one looks fine to me.

Hui Zhu wrote:
> When I debug i386 multi-thread inferior, it need support int3 and
> rdtsc.  So make a patch to support them.
> 
> 2009-11-24  Hui Zhu  <teawater@gmail.com>
> 
> 	* i386-tdep.c (i386_process_record): Add code for int3 and rdtsc.
> 
> ---
>  i386-tdep.c |   10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> --- a/i386-tdep.c
> +++ b/i386-tdep.c
> @@ -4847,10 +4847,6 @@ reswitch:
>        /* int3 */
>        /* XXX */
>      case 0xcc:
> -      printf_unfiltered (_("Process record doesn't support instruction "
> -               "int3.\n"));
> -      ir.addr -= 1;
> -      goto no_support;
>        break;
> 
>        /* int */
> @@ -4958,10 +4954,8 @@ reswitch:
> 
>        /* rdtsc */
>      case 0x0f31:
> -      printf_unfiltered (_("Process record doesn't support "
> -               "instruction rdtsc.\n"));
> -      ir.addr -= 2;
> -      goto no_support;
> +      I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
> +      I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REDX_REGNUM);
>        break;
> 
>        /* sysenter */


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/RFC] Prec multi-thread support [1/4] X86 insn support
  2009-11-25  8:06 [RFA/RFC] Prec multi-thread support [1/4] X86 insn support Hui Zhu
  2009-11-25 10:44 ` Mark Kettenis
  2009-11-25 20:04 ` Michael Snyder
@ 2009-11-30 19:58 ` Tom Tromey
  2009-12-08  5:53   ` Hui Zhu
  2 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2009-11-30 19:58 UTC (permalink / raw)
  To: Hui Zhu; +Cc: gdb-patches ml, Michael Snyder

>>>>> ">" == Hui Zhu <teawater@gmail.com> writes:

>> When I debug i386 multi-thread inferior, it need support int3 and
>> rdtsc.  So make a patch to support them.

>>        /* XXX */

I think this comment is now obsolete.

Tom


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/RFC] Prec multi-thread support [1/4] X86 insn support
  2009-11-30 19:58 ` Tom Tromey
@ 2009-12-08  5:53   ` Hui Zhu
  0 siblings, 0 replies; 6+ messages in thread
From: Hui Zhu @ 2009-12-08  5:53 UTC (permalink / raw)
  To: tromey; +Cc: gdb-patches ml, Michael Snyder

OK.  I will remove it in new version of this patch.

Thanks,
Hui

On Tue, Dec 1, 2009 at 03:58, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> ">" == Hui Zhu <teawater@gmail.com> writes:
>
>>> When I debug i386 multi-thread inferior, it need support int3 and
>>> rdtsc.  So make a patch to support them.
>
>>>        /* XXX */
>
> I think this comment is now obsolete.
>
> Tom
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-08  5:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-25  8:06 [RFA/RFC] Prec multi-thread support [1/4] X86 insn support Hui Zhu
2009-11-25 10:44 ` Mark Kettenis
2009-11-25 10:57   ` Hui Zhu
2009-11-25 20:04 ` Michael Snyder
2009-11-30 19:58 ` Tom Tromey
2009-12-08  5:53   ` Hui Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox