This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gdb segv in arm disassembler
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Doug Evans <dje at google dot com>
- Cc: dgutson at codesourcery dot com, gdb at sourceware dot org, binutils at sourceware dot org
- Date: Mon, 25 Jan 2010 21:36:58 -0500
- Subject: Re: gdb segv in arm disassembler
- References: <20100126022255.344B284414@ruffy.mtv.corp.google.com>
On Mon, Jan 25, 2010 at 06:22:55PM -0800, Doug Evans wrote:
> Hi.
>
> I'm getting a segv in the arm disassembler when invoked from gdb,
> I think due to this patch.
> When invoked from gdb, info->symtab can be NULL.
Yes. Sorry - I have a patch for this but I have got stuck travelling
instead of finishing the patch series it's part of.
I think this is the appropriate fix:
---
opcodes/arm-dis.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: gdb-mainline/opcodes/arm-dis.c
===================================================================
--- gdb-mainline.orig/opcodes/arm-dis.c 2010-01-07 00:22:43.000000000 -0800
+++ gdb-mainline/opcodes/arm-dis.c 2010-01-11 11:18:44.000000000 -0800
@@ -4355,8 +4355,7 @@ print_insn (bfd_vma pc, struct disassemb
long given;
int status;
int is_thumb = FALSE;
- int is_data = (bfd_asymbol_flavour (*info->symtab)
- == bfd_target_elf_flavour) ? TRUE : FALSE;
+ int is_data = FALSE;
int little_code;
unsigned int size = 4;
void (*printer) (bfd_vma, struct disassemble_info *, long);
--
Daniel Jacobowitz
CodeSourcery