Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] fix gdb_disassemble_info
@ 2003-07-04  2:28 Kei Sakamoto
  2003-07-18 20:17 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Kei Sakamoto @ 2003-07-04  2:28 UTC (permalink / raw)
  To: gdb-patches

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

The attached patch fixes "gdb_disassemble_info" in "disasm.c".

Some targets (m32r, xstormy16, etc.) uses "info->arch" at
"print_insn_*" in "opcodes/*-dis.c". "info" is initialized by
"gdb_disassemble_info" but it does not set "info->arch". So
these targets sometimes abort during dissassemble.


2003-07-04  Kei Sakamoto  <sakamoto.kei@renesas.com>

        * disasm.c (gdb_disassemble_info): Initilize di.arch.

[-- Attachment #2: disasm.c.patch --]
[-- Type: application/octet-stream, Size: 510 bytes --]

--- insight-20030703.orig/src/gdb/disasm.c	Fri May 23 08:00:15 2003
+++ insight-20030703/src/gdb/disasm.c	Fri Jul  4 09:17:15 2003
@@ -328,6 +328,7 @@
      Further, it has been supperseeded by trust-read-only-sections
      (although that should be superseeded by target_trust..._p()).  */
   di.read_memory_func = dis_asm_read_memory;
+  di.arch = gdbarch_bfd_arch_info (gdbarch)->arch;
   di.mach = gdbarch_bfd_arch_info (gdbarch)->mach;
   di.endian = gdbarch_byte_order (gdbarch);
   return di;

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

* Re: [PATCH] fix gdb_disassemble_info
  2003-07-04  2:28 [PATCH] fix gdb_disassemble_info Kei Sakamoto
@ 2003-07-18 20:17 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2003-07-18 20:17 UTC (permalink / raw)
  To: Kei Sakamoto; +Cc: gdb-patches

> The attached patch fixes "gdb_disassemble_info" in "disasm.c".
> 
> Some targets (m32r, xstormy16, etc.) uses "info->arch" at
> "print_insn_*" in "opcodes/*-dis.c". "info" is initialized by
> "gdb_disassemble_info" but it does not set "info->arch". So
> these targets sometimes abort during dissassemble.
> 
> 
> 2003-07-04  Kei Sakamoto  <sakamoto.kei@renesas.com>
> 
>         * disasm.c (gdb_disassemble_info): Initilize di.arch.

Oops!  I've checked this in - mainline and 6.0 branch.

Andrew



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

end of thread, other threads:[~2003-07-18 20:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-04  2:28 [PATCH] fix gdb_disassemble_info Kei Sakamoto
2003-07-18 20:17 ` Andrew Cagney

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