This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: Loop unrolling Problem !!


>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)


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