From patchwork Fri Apr 25 04:55:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Zhu X-Patchwork-Id: 674 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id 6BFB33603DF for ; Thu, 24 Apr 2014 21:55:25 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14314964) id ED63414778B8; Thu, 24 Apr 2014 21:55:24 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id BEC8314778AD for ; Thu, 24 Apr 2014 21:55:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=VVn 4WeA5is9xv+GRmocac10wm7wuoxIZG4A0ZynvpQKGm8LG6DFUMJdWGPDmGz8Ghkx D21tqMopAANxxelEl+qDXAJGq6I4pgXrIYw/MuI/fNCIW3YWBeaed2KoIObBLB94 ZysgHh6YVFbg3tZsK2cDr4rK70QY5hTHPXlm4EpU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=miZzkFAuY VtqUSRuedIZ7m7nmEg=; b=Aly98QKLPmCRBg9ZsFgh7Pf/rjANYcKFsOll3JEgG t7UvMwET9sOuHcAg7PsPE289bsD8WG0rLstu41O/XiHrZTW1SIC0D6ErimqCbwCv MevtJzbqe/66JuvUDtYaNd9ZD0j/OxGFao4K/Wdt9NRtjh9R5tX8BjBU4PVxTmt/ l0= Received: (qmail 30463 invoked by alias); 25 Apr 2014 04:55:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 30452 invoked by uid 89); 25 Apr 2014 04:55:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Apr 2014 04:55:20 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WdYAO-0006fv-Ud from Hui_Zhu@mentor.com for gdb-patches@sourceware.org; Thu, 24 Apr 2014 21:55:16 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 24 Apr 2014 21:55:16 -0700 Received: from localhost.localdomain (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Thu, 24 Apr 2014 21:55:16 -0700 Message-ID: <5359EAB3.7060808@mentor.com> Date: Fri, 25 Apr 2014 12:55:15 +0800 From: Hui Zhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: gdb-patches ml Subject: [PATCH] Make "set disassemble-next-line on" can work with DUMMY_FRAME, SIGTRAMP_FRAME and ARCH_FRAME X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in When GDB debug DUMMY_FRAME, SIGTRAMP_FRAME and ARCH_FRAME, even if "set disassemble-next-line on", it will not output the asm code: (gdb) set disassemble-next-line on (gdb) si (gdb) (gdb) So make this patch make they can work together, it will become: (gdb) si => 0xffffffff816bfb09 : 65 48 8b 0c 25 c8 c7 00 00 mov %gs:0xc7c8,%rcx (gdb) => 0xffffffff816bfb12 : 48 81 e9 d8 1f 00 00 sub $0x1fd8,%rcx (gdb) => 0xffffffff816bfb19 : 8b 51 10 mov 0x10(%rcx),%edx Thanks, Hui 2014-04-25 Hui Zhu * stack.c (print_frame_info): Call do_gdb_disassembly with DUMMY_FRAME, SIGTRAMP_FRAME and ARCH_FRAME. --- a/gdb/stack.c +++ b/gdb/stack.c @@ -836,6 +836,13 @@ print_frame_info (struct frame_info *fra ui_out_text (uiout, "\n"); annotate_frame_end (); + /* If disassemble-next-line is set to auto or on output the next + instruction. */ + if (disassemble_next_line == AUTO_BOOLEAN_AUTO + || disassemble_next_line == AUTO_BOOLEAN_TRUE) + do_gdb_disassembly (get_frame_arch (frame), 1, + get_frame_pc (frame), get_frame_pc (frame) + 1); + do_cleanups (uiout_cleanup); return; }