This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: amd64 executable debugging


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" <simon.marchi@polymtl.ca> wrote:

> On 2018-03-24 09:14, vijay nag wrote:
>
>> Hello GDB,
>>
>> Most often while debugging amd64 executable, GDB throws '<variable
>> 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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]