From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22999 invoked by alias); 24 Feb 2003 22:07:00 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22981 invoked from network); 24 Feb 2003 22:06:59 -0000 Received: from unknown (HELO ns2.uk.superh.com) (193.128.105.170) by 172.16.49.205 with SMTP; 24 Feb 2003 22:06:59 -0000 Received: from sh-uk-ex01.uk.w2k.superh.com (sh-uk-ex01 [192.168.16.17]) by ns2.uk.superh.com (8.11.6+Sun/8.11.6) with ESMTP id h1OLn2n01014; Mon, 24 Feb 2003 21:49:02 GMT Received: from superh.com ([192.168.16.50]) by sh-uk-ex01.uk.w2k.superh.com with Microsoft SMTPSVC(5.0.2195.5329); Mon, 24 Feb 2003 22:06:56 +0000 Message-ID: <3E5A9781.7B68A30A@superh.com> Date: Mon, 24 Feb 2003 22:07:00 -0000 From: Joern Rennecke Organization: SuperH UK Ltd. X-Accept-Language: en MIME-Version: 1.0 To: Elena Zannoni CC: Fernando Nasser , gdb@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Re: sh-elf disassembly broken (Was: Re: RFC: Moving disassembler_command to cli land and using newer disassembler code) References: <3E231F8E.72AA3D4A@superh.com> <3E5A7F58.8C87B17D@superh.com> <15962.37967.484158.441126@localhost.redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Feb 2003 22:06:56.0835 (UTC) FILETIME=[0BCEA930:01C2DC51] X-SW-Source: 2003-02/txt/msg00612.txt.bz2 Elena Zannoni wrote: > > Joern, would something like this work, instead? > Index: sh-tdep.c > =================================================================== > RCS file: /cvs/uberbaum/gdb/sh-tdep.c,v > retrieving revision 1.96 > diff -u -p -r1.96 sh-tdep.c > --- sh-tdep.c 3 Feb 2003 14:38:05 -0000 1.96 > +++ sh-tdep.c 24 Feb 2003 21:48:59 -0000 > @@ -937,6 +937,7 @@ sh_store_struct_return (CORE_ADDR addr, > static int > gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info) > { > + info->mach = gdbarch_bfd_arch_info (current_gdbarch)->mach; > info->endian = TARGET_BYTE_ORDER; > return print_insn_sh (memaddr, info); > } > It looks like it should work for the way disassembling is used right now, but it would mean that we don't honour the setting of mach in the input parameter. So if you want to add a command that disassembles a region of memory assuming another machine setting than the current one, you'd be out of luck. -- -------------------------- SuperH (UK) Ltd. 2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX T:+44 1454 465658