From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7836 invoked by alias); 6 May 2010 06:29:38 -0000 Received: (qmail 7825 invoked by uid 22791); 6 May 2010 06:29:37 -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 sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 May 2010 06:29:31 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o466S49r021475; Thu, 6 May 2010 08:28:04 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o466S29s016457; Thu, 6 May 2010 08:28:02 +0200 (CEST) Date: Thu, 06 May 2010 06:29:00 -0000 Message-Id: <201005060628.o466S29s016457@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: pedro@codesourcery.com CC: gdb-patches@sourceware.org, dje@google.com In-reply-to: <201005060123.29521.pedro@codesourcery.com> (message from Pedro Alves on Thu, 6 May 2010 01:23:29 +0100) Subject: Re: Move amd64_insn_length to common code References: <201004301954.22310.pedro@codesourcery.com> <201005060123.29521.pedro@codesourcery.com> 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/msg00150.txt.bz2 > From: Pedro Alves > Date: Thu, 6 May 2010 01:23:29 +0100 > > 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. Looked very reasonable to me anyway. > > 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.