http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55586



--- Comment #3 from Aleksandr Platonov <pam at oktetlabs dot ru> 2013-02-11 
08:00:41 UTC ---

(In reply to comment #2)

> As far as I can tell, it is a bug in earlier versions of GDB, and not in the

> compiler.

> 

> a GDB that was 7.3 or newer (SLES 11 SP2, IBM Advance Toolchain 5.0, etc.) and

> put a breakpoint on the my_function, the debugger puts the breakpoint on the

> STWU instruction, and it hits the breakpoint.

> 

I can reproduce this problem with GDB 7.5.

I do not think that this is GDB problem, just because GDB should skip function

prologue according with debug information (if debug information does not exist

then GDB will analyze instructions and breakpoint will be set at correct

address)



GCC creates 2 elements in .debug_line section for the same source line number

and GDB sets breakpoint at address from the second .debug_line section element.

I think this behavior of GDB is not a bug.



Could we avoid creation of the second .debug_line section element or just

associate it with the next source line?

Reply via email to