From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6498 invoked by alias); 26 Jan 2010 02:37:23 -0000 Received: (qmail 6487 invoked by uid 22791); 26 Jan 2010 02:37:22 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Jan 2010 02:37:07 +0000 Received: (qmail 32688 invoked from network); 26 Jan 2010 02:37:05 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Jan 2010 02:37:05 -0000 Date: Tue, 26 Jan 2010 02:37:00 -0000 From: Daniel Jacobowitz To: Doug Evans Cc: dgutson@codesourcery.com, gdb@sourceware.org, binutils@sourceware.org Subject: Re: gdb segv in arm disassembler Message-ID: <20100126023652.GA14474@caradoc.them.org> Mail-Followup-To: Doug Evans , dgutson@codesourcery.com, gdb@sourceware.org, binutils@sourceware.org References: <20100126022255.344B284414@ruffy.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100126022255.344B284414@ruffy.mtv.corp.google.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00192.txt.bz2 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