From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103432 invoked by alias); 25 Mar 2018 06:04:57 -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 103398 invoked by uid 89); 25 Mar 2018 06:04:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*c:alternative, avenue, kindly, Kindly X-HELO: mail-oi0-f50.google.com Received: from mail-oi0-f50.google.com (HELO mail-oi0-f50.google.com) (209.85.218.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 25 Mar 2018 06:04:53 +0000 Received: by mail-oi0-f50.google.com with SMTP id x20-v6so13292717oie.2 for ; Sat, 24 Mar 2018 23:04:53 -0700 (PDT) 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=vpvhYJ9v1tK9M6U2P6SYnwL8D7pWEykaBFPQgbD0UGg=; b=GWLM1Ydt79KnNFxCZpkieFvsSanaOn9VwRWy5DsoyiLg6JnDPeOPg4/yePR5BD1355 HiDBbJApPvU7QchLLc+yjnf2N3pl3fzs7DUp/8aeZkCNWRpfzD5heHv6CnRgppNT0nAY 279O+1HerlgEUEOXc39UmIWbz6DMP3Q6M+YXFViKggnqQzfDxhEv1rvmIefVQmYxxMhn BnXJ1TnnXdi5Z1fKhLkVcJXQYExtS3h4BRDTpQMy1U5kJ6U3d9k8LeR97fRw45pgl+5R 2jOWyLUJRfPf+69Vf0Wp9nZL1rXYbn7tSi3LzN1BpUudGJQJOmZPTGv86sSbOlDX1RBO oGMA== X-Gm-Message-State: AElRT7GKsuD5+VCm4eUFnGcdTCcINgQ0R8jFz08gCnHc1ZPQaPd1L9/Y 3dXrzE8ljlCZJ+ujCpUlRT2gsBSQQl7Rx+9f+qM= X-Google-Smtp-Source: AG47ELuCbwIgbXcsbK3sL/XHh8prRmlgPugMBW5n5DCNPyoFsNkkj+AGd6AlBLXbCPHij8z5OJoxTIMlLY3Id/QieNc= X-Received: by 10.202.105.140 with SMTP id e134mr18559690oic.18.1521957892391; Sat, 24 Mar 2018 23:04:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:5412:0:0:0:0:0 with HTTP; Sat, 24 Mar 2018 23:04:51 -0700 (PDT) Received: by 2002:a9d:5412:0:0:0:0:0 with HTTP; Sat, 24 Mar 2018 23:04:51 -0700 (PDT) In-Reply-To: References: From: vijay nag Date: Sun, 25 Mar 2018 06:04:00 -0000 Message-ID: Subject: Re: amd64 executable debugging To: Simon Marchi Cc: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00044.txt.bz2 I mean the executable was built with -O2. The question is has GDB somehow managed to fix this problem on optimized binaries ? --Vijay-- On Mar 25, 2018 11:32 AM, "vijay nag" wrote: > Yes, I did. I was trying to postmortem a field crash on an optimized > binary. > > [Kindly excuse my typos in my previous and read revenue as avenue. ] > > On Mar 24, 2018 10:33 PM, "Simon Marchi" wrote: > >> 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 >> >