Re: Breakpoints in "unrolled loop"



Oliver Betz wrote:
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?

ACCEMIC MDE, a debugger for Fujitsu 16-bit and 32-bit controllers.

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.

But only for as long as the whole unrolled loop takes to return to its beginning. Unless that loop covers the majority of program execution time, odds are the code will be *outside* the loop the moment the breakpoint is set.
.



Relevant Pages

  • Re: [Patch 00/11] Hardware Breakpoint interfaces
    ... legacy ptrace interface. ... to set up a breakpoint a debugger needs to call ptrace ... be best to keep the existing registers in the thread structure. ... It's just a tiny loop. ...
    (Linux-Kernel)
  • Re: debugging multithreaded app
    ... >> i was debugging a multithreaded app, when i stumbled across some weird ... > on encountering the breakpoint? ... If so, why use the hokey busy loop? ... between the functionality in the threads, and the cleanup code. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: (BUG) Inline assembly/breakpoints in lcc
    ... fixing it with high priority. ... If an inline assembly statement immediately follows a for loop ... and you try to set a breakpoint on it, then the breakpoint is hit at each ... The compiler does NOT emit any debug info when using ...
    (comp.lang.c)
  • Re: Bookmarks
    ... I tried using breakpoint and f8 to watch what is happening. ... it drops out of the loop and refuses to do the ... 'setbookmarks' routine. ... >> My error, Malc ...
    (microsoft.public.word.vba.general)
  • Re: loop debugging Compag Visual Fortran Compiler
    ... | facility in Compaq Visual Fortran 6.6.0. ... Suppose I have a simple loop ... | there a way in Compaq Visual Fortran (in the debugger) to watch the ... Select the newly created breakpoint, and in the "expression" edit box ...
    (comp.lang.fortran)