* [PATCH] rs6000-tdep.c: Use set_gdbarch_print_insn()
@ 2002-04-08 17:13 Kevin Buettner
2002-04-08 18:19 ` Elena Zannoni
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Buettner @ 2002-04-08 17:13 UTC (permalink / raw)
To: gdb-patches
I've just committed the patch below...
From Jimi X <jimix@watson.ibm.com>:
* rs6000-tdep.c (rs6000_gdbarch_init): Use set_gdbarch_print_insn().
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.45
diff -u -p -r1.45 rs6000-tdep.c
--- rs6000-tdep.c 8 Apr 2002 22:56:46 -0000 1.45
+++ rs6000-tdep.c 8 Apr 2002 23:52:06 -0000
@@ -2536,11 +2536,6 @@ rs6000_gdbarch_init (struct gdbarch_info
gdbarch = gdbarch_alloc (&info, tdep);
power = arch == bfd_arch_rs6000;
- /* Select instruction printer. */
- tm_print_insn = arch == power ? print_insn_rs6000 :
- info.byte_order == BFD_ENDIAN_BIG ? print_insn_big_powerpc :
- print_insn_little_powerpc;
-
/* Choose variant. */
v = find_variant_by_arch (arch, mach);
if (!v)
@@ -2585,6 +2580,14 @@ rs6000_gdbarch_init (struct gdbarch_info
tdep->regoff[i] = off;
off += regsize (v->regs + i, wordsize);
}
+
+ /* Select instruction printer. Note: tm_print_insn is still used by
+ gdbtk (insight), so we set both tm_print_insn and the gdbarch
+ method. */
+ tm_print_insn = arch == power ? print_insn_rs6000 :
+ info.byte_order == BFD_ENDIAN_BIG ? print_insn_big_powerpc :
+ print_insn_little_powerpc;
+ set_gdbarch_print_insn (gdbarch, tm_print_insn);
set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rs6000-tdep.c: Use set_gdbarch_print_insn()
2002-04-08 17:13 [PATCH] rs6000-tdep.c: Use set_gdbarch_print_insn() Kevin Buettner
@ 2002-04-08 18:19 ` Elena Zannoni
2002-04-08 18:45 ` Kevin Buettner
2002-04-08 19:17 ` Kevin Buettner
0 siblings, 2 replies; 4+ messages in thread
From: Elena Zannoni @ 2002-04-08 18:19 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
Kevin Buettner writes:
> I've just committed the patch below...
Kevin,
tm_print_insn shouldn't be used/needed anymore. I have removed gdbtk's uses
of tm_print_insn a while back.
Elena
>
> From Jimi X <jimix@watson.ibm.com>:
> * rs6000-tdep.c (rs6000_gdbarch_init): Use set_gdbarch_print_insn().
>
> Index: rs6000-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
> retrieving revision 1.45
> diff -u -p -r1.45 rs6000-tdep.c
> --- rs6000-tdep.c 8 Apr 2002 22:56:46 -0000 1.45
> +++ rs6000-tdep.c 8 Apr 2002 23:52:06 -0000
> @@ -2536,11 +2536,6 @@ rs6000_gdbarch_init (struct gdbarch_info
> gdbarch = gdbarch_alloc (&info, tdep);
> power = arch == bfd_arch_rs6000;
>
> - /* Select instruction printer. */
> - tm_print_insn = arch == power ? print_insn_rs6000 :
> - info.byte_order == BFD_ENDIAN_BIG ? print_insn_big_powerpc :
> - print_insn_little_powerpc;
> -
> /* Choose variant. */
> v = find_variant_by_arch (arch, mach);
> if (!v)
> @@ -2585,6 +2580,14 @@ rs6000_gdbarch_init (struct gdbarch_info
> tdep->regoff[i] = off;
> off += regsize (v->regs + i, wordsize);
> }
> +
> + /* Select instruction printer. Note: tm_print_insn is still used by
> + gdbtk (insight), so we set both tm_print_insn and the gdbarch
> + method. */
> + tm_print_insn = arch == power ? print_insn_rs6000 :
> + info.byte_order == BFD_ENDIAN_BIG ? print_insn_big_powerpc :
> + print_insn_little_powerpc;
> + set_gdbarch_print_insn (gdbarch, tm_print_insn);
>
> set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
> set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rs6000-tdep.c: Use set_gdbarch_print_insn()
2002-04-08 18:19 ` Elena Zannoni
@ 2002-04-08 18:45 ` Kevin Buettner
2002-04-08 19:17 ` Kevin Buettner
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Buettner @ 2002-04-08 18:45 UTC (permalink / raw)
To: Elena Zannoni, Kevin Buettner; +Cc: gdb-patches
On Apr 8, 9:18pm, Elena Zannoni wrote:
> tm_print_insn shouldn't be used/needed anymore. I have removed gdbtk's uses
> of tm_print_insn a while back.
Ah... thanks. When I checked a few minutes ago, it seemed to be there,
but I must of been looking at some old code. (Hmm... I thought I updated
before checking.)
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rs6000-tdep.c: Use set_gdbarch_print_insn()
2002-04-08 18:19 ` Elena Zannoni
2002-04-08 18:45 ` Kevin Buettner
@ 2002-04-08 19:17 ` Kevin Buettner
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Buettner @ 2002-04-08 19:17 UTC (permalink / raw)
To: Elena Zannoni; +Cc: gdb-patches
On Apr 8, 9:18pm, Elena Zannoni wrote:
> tm_print_insn shouldn't be used/needed anymore. I have removed gdbtk's uses
> of tm_print_insn a while back.
I've just committed the following patch which takes care of this...
* rs6000-tdep.c (rs6000_gdbarch_init): Don't set tm_print_insn;
it's no longer required.
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.48
diff -u -p -r1.48 rs6000-tdep.c
--- rs6000-tdep.c 9 Apr 2002 01:41:46 -0000 1.48
+++ rs6000-tdep.c 9 Apr 2002 02:05:41 -0000
@@ -2458,6 +2458,7 @@ rs6000_gdbarch_init (struct gdbarch_info
unsigned long mach;
bfd abfd;
int osabi, sysv_abi;
+ gdbarch_print_insn_ftype *print_insn;
from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
bfd_get_flavour (info.abfd) == bfd_target_xcoff_flavour;
@@ -2574,13 +2575,14 @@ rs6000_gdbarch_init (struct gdbarch_info
off += regsize (v->regs + i, wordsize);
}
- /* Select instruction printer. Note: tm_print_insn is still used by
- gdbtk (insight), so we set both tm_print_insn and the gdbarch
- method. */
- tm_print_insn = arch == power ? print_insn_rs6000 :
- info.byte_order == BFD_ENDIAN_BIG ? print_insn_big_powerpc :
- print_insn_little_powerpc;
- set_gdbarch_print_insn (gdbarch, tm_print_insn);
+ /* Select instruction printer. */
+ if (arch == power)
+ print_insn = print_insn_rs6000;
+ else if (info.byte_order == BFD_ENDIAN_BIG)
+ print_insn = print_insn_big_powerpc;
+ else
+ print_insn = print_insn_little_powerpc;
+ set_gdbarch_print_insn (gdbarch, print_insn);
set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-04-09 2:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 17:13 [PATCH] rs6000-tdep.c: Use set_gdbarch_print_insn() Kevin Buettner
2002-04-08 18:19 ` Elena Zannoni
2002-04-08 18:45 ` Kevin Buettner
2002-04-08 19:17 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox