From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100448 invoked by alias); 25 Mar 2018 06:02:50 -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 100411 invoked by uid 89); 25 Mar 2018 06:02:47 -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=Hx-languages-length:2301, HX-Received:sk:w1-v6mr, H*c:alternative, avenue X-HELO: mail-ot0-f176.google.com Received: from mail-ot0-f176.google.com (HELO mail-ot0-f176.google.com) (74.125.82.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 25 Mar 2018 06:02:45 +0000 Received: by mail-ot0-f176.google.com with SMTP id r30-v6so17407496otr.2 for ; Sat, 24 Mar 2018 23:02:45 -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=VQoVD3uR4EUfdUFKvfIeub6NCNPXJluYArrVAxGTSkk=; b=Znqpmz1+41oTIjHkleNUywnVA/jptE0yeupeWvkFkl5hDZjYtXxAkQy3b+2lIk97JT /iuu8DZg0nba9Ht98Bg1q6bPxJdocm+GbEsx68SSsYkkxTvbNwvPJqOadLx+b3t6zIqU w3k4uj9l+FFlAcOxQXwgrCzOLKij1XoHnxBz32J/UBd0a7YuaRniYzdkLTX31Hr7KTWW 1KPHhiOqcaj/iCc/VcbNtv0HCTqMOF1M7FCxJxKHL29nQ9rOZ18Wn9HIyV9G5+qdI4C9 GUZmTWBIAazw349fM+MCdrPcin9JOR7iQGr0vvb6zXfGf0VhmwKHA4d0xADtVN41s6Hc 9V0Q== X-Gm-Message-State: AElRT7Hde8nHytF+lZHQ354R+lBqPf0sEhh2aY8UkkTeypfmXxmspvxA pbAnrEO7Of0A4T8d0kQ6hioIsStn3rydkTotMxE= X-Google-Smtp-Source: AIpwx4+Ln+CakjS4ZfMiR6+jIHjK4AKmUOjyJuwd84nv44L/K0PSNVBqJ1lKcntFV8mCjUdWPJoKViMn8gG8WEa9B+4= X-Received: by 2002:a9d:70c1:: with SMTP id w1-v6mr6575299otj.300.1521957763834; Sat, 24 Mar 2018 23:02:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:5412:0:0:0:0:0 with HTTP; Sat, 24 Mar 2018 23:02:43 -0700 (PDT) Received: by 2002:a9d:5412:0:0:0:0:0 with HTTP; Sat, 24 Mar 2018 23:02:43 -0700 (PDT) In-Reply-To: References: From: vijay nag Date: Sun, 25 Mar 2018 06:02: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/msg00043.txt.bz2 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 >