Re: Breakpoints in "unrolled loop"
- From: Oliver Betz <OBetz@xxxxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 20:34:00 +0200
Hans-Bernhard Bröker wrote:
if you select a source statement to set a breakpoint, the debugger has
to select which binary location(s) get a breakpoint.
Not quite true. Somebody has to make that decision, but it doesn't have
to be done by the tool alone. I've seen at least one debugger offer a
complete selection of eligible code addresses in such cases.
This would be fine. Do you remember which debugger did so?
Similar problems can happen even without optimization, too. E.g.
imagine setting a breakpoint on a statement that's actually a call to a
multi-statement inlined function, or function-like macro.
Indeed. Currently, I have to accept to get a breakpoint on the first
statement.
When setting a breakpoint during program execution (e.g. by
background debug mode), I would set a breakpoint at _each_
corresponding location, since I can't know the PC at the time of
breakpoint setting.
Personally I think I'd prefer a tool that sets a breakpoint on the first
copy in this case (assuming that it's really just an unrolled loop) or
generally on the entry point into the unrolled portion.
If there are function calls with long (potential) duration in the
loop, this could delay the breakpoint hit. On the other hand, such
loops shouldn't be unrolled.
Ultimately, source code <-> binary code is an n:m relation. Yes, that
makes it tricky to resolve queries in both directions. But I don't
believe anybody ever promised that writing good debuggers for optimizing
compilers was simple.
No, but I try to forward some information to the supplier to make it
better.
Thanks for your comments!
Oliver
--
Oliver Betz, Muenchen (oliverbetz.de)
.
- Follow-Ups:
- Re: Breakpoints in "unrolled loop"
- From: Hans-Bernhard Bröker
- Re: Breakpoints in "unrolled loop"
- References:
- Breakpoints in "unrolled loop"
- From: Oliver Betz
- Re: Breakpoints in "unrolled loop"
- From: Hans-Bernhard Bröker
- Re: Breakpoints in "unrolled loop"
- From: Oliver Betz
- Re: Breakpoints in "unrolled loop"
- From: Hans-Bernhard Bröker
- Breakpoints in "unrolled loop"
- Prev by Date: Re: jtagice mk1
- Next by Date: Re: Breakpoints in "unrolled loop"
- Previous by thread: Re: Breakpoints in "unrolled loop"
- Next by thread: Re: Breakpoints in "unrolled loop"
- Index(es):
Relevant Pages
|