From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10583 invoked by alias); 6 May 2010 00:23:37 -0000 Received: (qmail 10575 invoked by uid 22791); 6 May 2010 00:23:36 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD 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; Thu, 06 May 2010 00:23:33 +0000 Received: (qmail 6100 invoked from network); 6 May 2010 00:23:31 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 May 2010 00:23:31 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: Move amd64_insn_length to common code Date: Thu, 06 May 2010 00:23:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) Cc: Doug Evans References: <201004301954.22310.pedro@codesourcery.com> In-Reply-To: <201004301954.22310.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005060123.29521.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00145.txt.bz2 On Friday 30 April 2010 19:54:22, Pedro Alves wrote: > I'll be posting a patch that adds code to i386-tdep.c > that will need to know the length of an instruction. We already > have code for that in amd64-tdep.c. I don't suppose you > see a problem with moving it to a more common/reusable place? FYI, I went ahead and applied this. Easy to revert and address some other way if need be. > 2010-04-30 Pedro Alves > > gdb/ > * amd64-tdep.c: Include disasm.h. > (amd64_insn_length_fprintf, amd64_insn_length_init_dis) > (amd64_insn_length): Moved to disasm.c and renamed. > (fixup_riprel): Adjust. > * disasm.c (do_ui_file_delete): New. > (gdb_insn_length): New. > (gdb_buffered_insn_length_fprintf) > (gdb_buffered_insn_length_init_dis) > (gdb_buffered_insn_length): New, moved from amd64-tdep.c, and > renamed. > * disasm.h (gdb_insn_length): Declare. > (gdb_buffered_insn_length): Declare. -- Pedro Alves