* [RFA Precord] Disable process record in amd64
@ 2009-05-13 8:07 Hui Zhu
2009-05-13 10:18 ` Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: Hui Zhu @ 2009-05-13 8:07 UTC (permalink / raw)
To: gdb-patches ml
Hi,
The i386 process record can't work together with amd64 now. So I make
a patch to disable it in amd64.
2009-05-13 Hui Zhu <teawater@gmail.com>
* amd64-tdep.c (amd64_init_abi): Disable process record
function that set in i386_gdbarch_init.
* i386-tdep.c (i386_gdbarch_init): Call
set_gdbarch_process_record before gdbarch_init_osabi to make
process record can be disable in gdbarch_init_osabi.
Thanks,
Hui
---
amd64-tdep.c | 3 +++
i386-tdep.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
--- a/amd64-tdep.c
+++ b/amd64-tdep.c
@@ -2049,6 +2049,9 @@ amd64_init_abi (struct gdbarch_info info
amd64_regset_from_core_section);
set_gdbarch_get_longjmp_target (gdbarch, amd64_get_longjmp_target);
+
+ /* Disable process record function that set in i386_gdbarch_init. */
+ set_gdbarch_process_record (gdbarch, 0);
}
\f
--- a/i386-tdep.c
+++ b/i386-tdep.c
@@ -5256,6 +5256,8 @@ i386_gdbarch_init (struct gdbarch_info i
frame_base_set_default (gdbarch, &i386_frame_base);
+ set_gdbarch_process_record (gdbarch, i386_process_record);
+
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
@@ -5277,8 +5279,6 @@ i386_gdbarch_init (struct gdbarch_info i
set_gdbarch_skip_permanent_breakpoint (gdbarch,
i386_skip_permanent_breakpoint);
- set_gdbarch_process_record (gdbarch, i386_process_record);
-
return gdbarch;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA Precord] Disable process record in amd64
2009-05-13 8:07 [RFA Precord] Disable process record in amd64 Hui Zhu
@ 2009-05-13 10:18 ` Pedro Alves
2009-05-13 10:24 ` Mark Kettenis
2009-05-13 16:31 ` Hui Zhu
0 siblings, 2 replies; 4+ messages in thread
From: Pedro Alves @ 2009-05-13 10:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Hui Zhu
On Wednesday 13 May 2009 09:07:03, Hui Zhu wrote:
> Hi,
>
> The i386 process record can't work together with amd64 now. So I make
> a patch to disable it in amd64.
It would be better to move the `set_gdbarch_process_record (gdbarch, i386_process_record)'
call to tdep files where precord will actually work --- in this
case, i386-linux-tdep.c --- instead of having i386-tdep.c assume
precord support. We've done the exact same thing for displaced
stepping.
>
> 2009-05-13 Hui Zhu <teawater@gmail.com>
>
> * amd64-tdep.c (amd64_init_abi): Disable process record
> function that set in i386_gdbarch_init.
> * i386-tdep.c (i386_gdbarch_init): Call
> set_gdbarch_process_record before gdbarch_init_osabi to make
> process record can be disable in gdbarch_init_osabi.
>
> Thanks,
> Hui
>
> ---
> amd64-tdep.c | 3 +++
> i386-tdep.c | 4 ++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> --- a/amd64-tdep.c
> +++ b/amd64-tdep.c
> @@ -2049,6 +2049,9 @@ amd64_init_abi (struct gdbarch_info info
> amd64_regset_from_core_section);
>
> set_gdbarch_get_longjmp_target (gdbarch, amd64_get_longjmp_target);
> +
> + /* Disable process record function that set in i386_gdbarch_init. */
> + set_gdbarch_process_record (gdbarch, 0);
> }
> \f
>
> --- a/i386-tdep.c
> +++ b/i386-tdep.c
> @@ -5256,6 +5256,8 @@ i386_gdbarch_init (struct gdbarch_info i
>
> frame_base_set_default (gdbarch, &i386_frame_base);
>
> + set_gdbarch_process_record (gdbarch, i386_process_record);
> +
> /* Hook in ABI-specific overrides, if they have been registered. */
> gdbarch_init_osabi (info, gdbarch);
>
> @@ -5277,8 +5279,6 @@ i386_gdbarch_init (struct gdbarch_info i
> set_gdbarch_skip_permanent_breakpoint (gdbarch,
> i386_skip_permanent_breakpoint);
>
> - set_gdbarch_process_record (gdbarch, i386_process_record);
> -
> return gdbarch;
> }
>
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA Precord] Disable process record in amd64
2009-05-13 10:18 ` Pedro Alves
@ 2009-05-13 10:24 ` Mark Kettenis
2009-05-13 16:31 ` Hui Zhu
1 sibling, 0 replies; 4+ messages in thread
From: Mark Kettenis @ 2009-05-13 10:24 UTC (permalink / raw)
To: pedro; +Cc: gdb-patches, teawater
> From: Pedro Alves <pedro@codesourcery.com>
> Date: Wed, 13 May 2009 11:18:02 +0100
>
> On Wednesday 13 May 2009 09:07:03, Hui Zhu wrote:
> > Hi,
> >
> > The i386 process record can't work together with amd64 now. So I make
> > a patch to disable it in amd64.
>
> It would be better to move the `set_gdbarch_process_record (gdbarch, i386_process_record)'
> call to tdep files where precord will actually work --- in this
> case, i386-linux-tdep.c --- instead of having i386-tdep.c assume
> precord support. We've done the exact same thing for displaced
> stepping.
I agree with Pedro here.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA Precord] Disable process record in amd64
2009-05-13 10:18 ` Pedro Alves
2009-05-13 10:24 ` Mark Kettenis
@ 2009-05-13 16:31 ` Hui Zhu
1 sibling, 0 replies; 4+ messages in thread
From: Hui Zhu @ 2009-05-13 16:31 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
On Wed, May 13, 2009 at 18:18, Pedro Alves <pedro@codesourcery.com> wrote:
> On Wednesday 13 May 2009 09:07:03, Hui Zhu wrote:
>> Hi,
>>
>> The i386 process record can't work together with amd64 now. So I make
>> a patch to disable it in amd64.
>
> It would be better to move the `set_gdbarch_process_record (gdbarch, i386_process_record)'
> call to tdep files where precord will actually work --- in this
> case, i386-linux-tdep.c --- instead of having i386-tdep.c assume
> precord support. We've done the exact same thing for displaced
> stepping.
>
Maybe make i386_process_record support x86-64 is better.
Forget this patch.
Thanks,
Hui
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-13 16:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-13 8:07 [RFA Precord] Disable process record in amd64 Hui Zhu
2009-05-13 10:18 ` Pedro Alves
2009-05-13 10:24 ` Mark Kettenis
2009-05-13 16:31 ` Hui Zhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox