From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id INrCDn1IFGBRJwAAWB0awg (envelope-from ) for ; Fri, 29 Jan 2021 12:40:13 -0500 Received: by simark.ca (Postfix, from userid 112) id 2C7CC1EF80; Fri, 29 Jan 2021 12:40:13 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CDC9C1E939 for ; Fri, 29 Jan 2021 12:40:12 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6BB17395040E; Fri, 29 Jan 2021 17:40:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BB17395040E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1611942012; bh=+rYRANuPeapwYpM84JYODJRyi2upzLX7HF1JME2o968=; h=To:Subject:Date:References:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=KhTxvh3VEhXm3OrX/qbwumZIs9jv5qOM8StwHInuFI4nh7E4aATWuLyrtl27WPTfA dMZgOSxr4E2GKHvIVmDsgsps9C839aIQJESwOuSVzUSCVn4nhtYEXwgRBwkf/ENS12 d//XDKBo6/X0WzXwYXrxQwIeadln0wFD+9rltlY0= Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 08185393BC1D for ; Fri, 29 Jan 2021 17:40:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 08185393BC1D Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1l5XkY-0007K0-BX for gdb@sourceware.org; Fri, 29 Jan 2021 18:40:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gdb@sourceware.org Subject: Re: How to display instructions around the current instuction? Date: Fri, 29 Jan 2021 17:38:05 -0000 (UTC) Message-ID: References: <871re5a1le.fsf@igel.home> <87o8h86gwc.fsf@igel.home> User-Agent: slrn/pre1.0.4-5 (Linux) X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tavis Ormandy via Gdb Reply-To: Tavis Ormandy Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" On 2021-01-28, Andreas Schwab wrote: > On Jan 28 2021, Peng Yu wrote: > >> There could be a syntax to go back a given number of instructions. > > How do you know how long each instruction is? > I just learned about the x/-5i syntax and had the same question. I didn't look at the code but it does seem to know where the boundaries are (e.g. if you start in the middle of an instruction). I guess it must disassemble forward from a previous known location to learn all the boundaries first? Tavis. -- _o) $ lynx lock.cmpxchg8b.com /\\ _o) _o) $ finger taviso@sdf.org _\_V _( ) _( ) @taviso