From: Markus Deuling <deuling@de.ibm.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <uweigand@de.ibm.com>
Subject: [rfc]: Get endianess from disassemble_info
Date: Tue, 19 Feb 2008 19:29:00 -0000 [thread overview]
Message-ID: <47BB2D94.2040608@de.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 534 bytes --]
Hi,
this patch replaces some current_gdbachs by getting the current endianess from disassemble_info
instead via a gdbarch callback.
Tested via gdb_buildall.sh and native on PowerPC without regression. Ok to commit ?
ChangeLog:
* rs6000-tdep.c (gdb_print_insn_powerpc): Get the current endianess
from disassemble_info instead of gdbarch_byte_order
* mips-tdep.c (gdb_print_insn_mips): Likewise.
* arm-tdep.c (gdb_print_insn_arm): Likewise.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
[-- Attachment #2: diff-disasm --]
[-- Type: text/plain, Size: 1588 bytes --]
diff -urpN src/gdb/arm-tdep.c dev/gdb/arm-tdep.c
--- src/gdb/arm-tdep.c 2008-01-27 06:30:37.000000000 +0100
+++ dev/gdb/arm-tdep.c 2008-02-19 20:22:51.000000000 +0100
@@ -2018,7 +2018,7 @@ gdb_print_insn_arm (bfd_vma memaddr, dis
else
info->symbols = NULL;
- if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+ if (info->endian == BFD_ENDIAN_BIG)
return print_insn_big_arm (memaddr, info);
else
return print_insn_little_arm (memaddr, info);
diff -urpN src/gdb/mips-tdep.c dev/gdb/mips-tdep.c
--- src/gdb/mips-tdep.c 2008-01-11 14:20:52.000000000 +0100
+++ dev/gdb/mips-tdep.c 2008-02-19 20:21:15.000000000 +0100
@@ -4878,7 +4878,7 @@ gdb_print_insn_mips (bfd_vma memaddr, st
info->disassembler_options = "gpr-names=32";
/* Call the appropriate disassembler based on the target endian-ness. */
- if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+ if (info->endian == BFD_ENDIAN_BIG)
return print_insn_big_mips (memaddr, info);
else
return print_insn_little_mips (memaddr, info);
diff -urpN src/gdb/rs6000-tdep.c dev/gdb/rs6000-tdep.c
--- src/gdb/rs6000-tdep.c 2008-02-11 05:48:37.000000000 +0100
+++ dev/gdb/rs6000-tdep.c 2008-02-19 19:11:10.000000000 +0100
@@ -2929,7 +2929,7 @@ gdb_print_insn_powerpc (bfd_vma memaddr,
if (!info->disassembler_options)
info->disassembler_options = "any";
- if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+ if (info->endian == BFD_ENDIAN_BIG)
return print_insn_big_powerpc (memaddr, info);
else
return print_insn_little_powerpc (memaddr, info);
next reply other threads:[~2008-02-19 19:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 19:29 Markus Deuling [this message]
2008-02-19 23:18 ` Ulrich Weigand
2008-02-20 14:37 ` Markus Deuling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47BB2D94.2040608@de.ibm.com \
--to=deuling@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox