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: execution does not run in the source line's order


> Date: Sat, 11 Aug 2012 11:14:41 +0800
> From: rivers horse <horserivers@gmail.com>
> 
>      I  debug gdb using itself,  i find  a strange  issue  :
>               the programme  being  debugged  execute  not in line
> order,for example,  it goes into  line 20,then it goes  into line 18 ,
>     which are simply assignment operations,
> 
>     what is the reasin for this?

Compiler optimizations are known to reorder code, if doing so cannot
affect the result.  If your GDB is compiled with optimizations, that's
the reason.


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