Loop unrolling Problem !!

Peter Barada pbarada@mail.wm.sps.mot.com
Thu Jul 25 08:26:00 GMT 2002


>I know that the optimazation will solve this problem,
>but I am going to development a source level debugging tool(link gdb).
>if the code within an loop will be duplicate when specify -O0 ,
>I have no idea how to implement the break point, because the same source
>line will be map to more than one address in binary code in stabs debug
>information.
>
>if possible, will you give me a hand to tell me where the source 
>related with this loop unrolling.

You could look into the GDB source to see how it handles it.  I'd
think(I haven't looked at the code yet), that GDB picks the first(or
lowest) address that it finds.

I guess you haven't thought about what to do with inlined functions
yet(since in that case you'll have N copies of the function in the
code, one for each call, each with the same source line numbering.

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)



More information about the Binutils mailing list