From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id la7XJCz4EmBkegAAWB0awg (envelope-from ) for ; Thu, 28 Jan 2021 12:45:16 -0500 Received: by simark.ca (Postfix, from userid 112) id 857E61EF80; Thu, 28 Jan 2021 12:45:16 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [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 176B01E945 for ; Thu, 28 Jan 2021 12:45:15 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BBC9D3840C21; Thu, 28 Jan 2021 17:45:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BBC9D3840C21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1611855914; bh=+UcmTLlv+OYMnRgprP+rpLCehecuSOBQu0asVTqzKzE=; h=In-Reply-To:References:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=xMLiIlq7SGH3LwpXSVwjR0A7cnjVheRSGDD5VN9XrxtM0UvaC6MFMiYJii9d5SmoK q1rOmWoTUhSgFuv3+v+SXsdg1ln5+tRXjb26T9znq5rx1RrfVVcn8HSA2OLl3+HFKo UFr8c4Lu9FtD9xM4DzfVd0s7AEUD72kKjur1NIUQ= Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id BF30B3834404 for ; Thu, 28 Jan 2021 17:45:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BF30B3834404 Received: by mail-il1-x136.google.com with SMTP id a1so6002220ilr.5 for ; Thu, 28 Jan 2021 09:45:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+UcmTLlv+OYMnRgprP+rpLCehecuSOBQu0asVTqzKzE=; b=lIt1CHkoZ/c/SeqJEYkAkN3JvWv0v+rEpFducRlcBb7jwphCHNF0WZ3k632v3sY35V oQjzaaOzx03awHyA54hIjiDGn7eEzZ/FPXRMalqEBVEyCGZ/fHmDxShpuS3h6dTdOssR 8Jw8qt4Xg6JAa7AgrKKSbws+7RtMt3m7EFv4RjM3ZTYIHGK3nP4AIe9dqdflvo0zgoWQ PqREVZVjlyk3su08J8bvWOg5aYClBQE7fKk7qnLMCEAZwq5rUh+cIlO7TeyfQblEk41Y ZNCG2K8rsAAHlgb8hUIh27+T2FIAscZQdvUw0pUHDRe+jmPzROiW90nTvarXHBg7Hj8m F6Zg== X-Gm-Message-State: AOAM531NCMVFH2u1zzK/x9jEZWxuYENYb+S6K7raCpGFFJR/IcF7k4ph 3/JEOHsWNwNWOZNeSIwikV4OylxwUx+B2mDq3f0= X-Google-Smtp-Source: ABdhPJylXt7hiW0wPtOgMGCqa7YtzaiY+fjUPyjFRCLCVG7LRmjvsB4Km+/Jz4FIwypPmySQjoqb7jcW0oOTngFuMJU= X-Received: by 2002:a05:6e02:154d:: with SMTP id j13mr166611ilu.153.1611855911436; Thu, 28 Jan 2021 09:45:11 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a6b:c88b:0:0:0:0:0 with HTTP; Thu, 28 Jan 2021 09:45:10 -0800 (PST) In-Reply-To: References: Date: Thu, 28 Jan 2021 11:45:10 -0600 Message-ID: Subject: Re: How to display instructions around the current instuction? To: Christo Crause Content-Type: text/plain; charset="UTF-8" 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: Peng Yu via Gdb Reply-To: Peng Yu Cc: gdb@sourceware.org Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" Hi Christo, > Another possibility could be: set disassemble-next-line on This does not correctly answer the question. It just show the current line but not the context. Also, how to just show the disassembled code but the hex numbers. I know the doc is here. But is there is a way to check its helpage withing gdb command line? Thanks. https://visualgdb.com/gdbreference/commands/set_disassemble-next-line Temporary breakpoint 1, 0x0000000000401134 in main () => 0x0000000000401134 : 48 83 ec 10 sub rsp,0x10 (gdb) 0x0000000000401138 in main () => 0x0000000000401138 : c7 45 fc 00 00 00 00 mov DWORD PTR [rbp-0x4],0x0 (gdb) 0x000000000040113f in main () => 0x000000000040113f : 48 bf 04 20 40 00 00 00 00 00 movabs rdi,0x402004 -- Regards, Peng