From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30321 invoked by alias); 24 Mar 2018 17:03:24 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 29300 invoked by uid 89); 24 Mar 2018 17:03:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 24 Mar 2018 17:03:22 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w2OH3GUM008949 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 24 Mar 2018 13:03:20 -0400 Received: by simark.ca (Postfix, from userid 112) id E765E1E77E; Sat, 24 Mar 2018 13:03:15 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 0FDD51E4B2; Sat, 24 Mar 2018 13:03:12 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 24 Mar 2018 17:03:00 -0000 From: Simon Marchi To: vijay nag Cc: gdb@sourceware.org Subject: Re: amd64 executable debugging In-Reply-To: References: Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.4 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sat, 24 Mar 2018 17:03:16 +0000 X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00041.txt.bz2 On 2018-03-24 09:14, vijay nag wrote: > Hello GDB, > > Most often while debugging amd64 executable, GDB throws ' optimized out>' error and also sometimes when function parameters are > passed on register GDB reports incorrect information in few frames. I'm > sure in 64 bit with more registers available, there is more revenue for > optimization, it is entirely possible that GDB gets confused due to > that > and information provided by GDB isn't reliable sometimes. I'm > wondering if > the latest GDB has somehow solved this problem Or disassembling and > studying instructions is the only way to go about it ? Also, is there a > way > to increase this debug-ability by adding any additional compiler flags > ? > > --Vijay-- Hi Vijay, You didn't mention it so I'll state the obvious, do you build without optimizations (-O0)? Otherwise, it's expected to have some optimized out values. Simon