From: John L. <le...@mo...> - 2006-09-18 01:35:29
|
On Mon, Sep 18, 2006 at 11:01:54AM +1000, Anton Blanchard wrote: > So main starts at line 10. But with -O2 we lose the stack spill code and > get: > > main: > .loc 1 10 0 <---- > .loc 1 12 0 <---- > lis 9,y@ha > > and we must end up picking up the second entry, line 12. Not sure if its > a bug in binutils, most of the time we probably want the second line > attribution since its closer to the code. Hrm. There's nothing much that libbfd can really do here, since there's no way to specify anything other than the PC value. Unfortunate. > > What are is_correct_functions()'s arguments? > > if (!is_correct_function(function, sym.name())) I meant the runtime ones. Presumably "bar" and "main". > Yeah Im not sure either. The current behaviour penalises apps that are > built correctly (vs ones built with mixed debug/non debug objects) so it > would be good to find a compromise. Once again wishing that libbfd weren't so broken. regards john |