execution does not run in the source line's order

Jan Kratochvil jan.kratochvil@redhat.com
Sat Aug 11 06:24:00 GMT 2012


On Sat, 11 Aug 2012 05:14:41 +0200, rivers horse wrote:
>      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?

You have probably compiled the file with -O2, use/force -O0 (gcc options).


Regards,
Jan



More information about the Gdb mailing list