From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id BF12B3857C77 for ; Thu, 11 Mar 2021 12:22:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BF12B3857C77 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-206-kCNncOLWPwSZi9GIX_CeUw-1; Thu, 11 Mar 2021 07:22:14 -0500 X-MC-Unique: kCNncOLWPwSZi9GIX_CeUw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D033219253C0 for ; Thu, 11 Mar 2021 12:22:13 +0000 (UTC) Received: from [10.33.36.3] (unknown [10.33.36.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7AFA319703 for ; Thu, 11 Mar 2021 12:22:13 +0000 (UTC) Subject: Re: Question about disassembly To: gdb@sourceware.org References: From: Andrew Dinn Message-ID: <4425a354-036c-7995-8b47-a92983b340e0@redhat.com> Date: Thu, 11 Mar 2021 12:22:12 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Thu, 11 Mar 2021 12:22:17 -0000 On 11/03/2021 12:16, Christian Biesinger via Gdb wrote: > On Thu, Mar 11, 2021, 13:07 Mahmood Naderan via Gdb > wrote: > >> Hi >> How can I debug disassembly instructions with "step" or "next"? >> Right now, then I use 'n' it seems that gdb executes multiple assembly >> instructions and then stops. Sound like it uses the source level debugging. >> > > Use stepi / nexti You will probably want to print the next instruction after each step which can be done using x/i $pc. I use the following command definitions (added to my .gdbinit). define si stepi x/i $pc end define ni nexti x/i $pc end regards, Andrew Dinn -----------