This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [PATCH 0/8] Break at each iteration for breakpoints placed on a while statement


Luis Machado <lgustavo@codesourcery.com> writes:

> Thinking about the series, isn't this problem related to the compiler
> optimizing things and/or presenting an imprecise addr/line information
> as opposed to GDB doing the wrong thing.

I think the address/line information is correct, and compiler does
nothing wrong in this case.  The first instruction of for loop is 
branch/jmp, which is correctly mapped to the right line.  GDB should
insert breakpoint at the place which can be hit in every iteration of
loop on that line, rather than the first instruction of the loop (or line).

-- 
Yao (éå)


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