Re: Breakpoints in "unrolled loop"



Hans-Bernhard Bröker wrote:

what's the behaviour of your debugger(s) when the code contains
unrolled loops, IOW one source statement corresponds to many locations
in the binary?

I don't see why that should pose any particular problem. Debug
information is usually stored as a function of binary location, i.e. you
give it a binary location, and it looks up the source location from that.

if you select a source statement to set a breakpoint, the debugger has
to select which binary location(s) get a breakpoint.

In single step, I would set the breakpoint at the next corresponding
binary location. 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.

This can be impossible with massively unrolled loops and/or limited
hardware breakpoints.

It's usually the *opposite* case that causes troubles, i.e. when code
folding has turned multiple copies of the same functionality into a

ack, that's indeed hard.

Oliver
--
Oliver Betz, Muenchen (oliverbetz.de)
.



Relevant Pages

  • Re: [RFC] hwbkpt: Hardware breakpoints (was Kwatch)
    ... Debug exceptions don't occur very often, and when they do it won't ... The global kernel allocations will already be set in the processor from the ... CPU 1 goes in and alters the user breakpoint data, ... * Hardware breakpoints are implemented using the CPU's debug registers, ...
    (Linux-Kernel)
  • RE: Debugging problems in VS2005 that didnt exist in VS2003
    ... So now I'm getting my Debug Output, albeit in the Immediate Window - at some ... > as LibB, and add this new UserControl on the AppA form. ... > the entire solution and run AppA in debug mode in VS2005, my breakpoint in ... > breakpoints in FCL code will not available now. ...
    (microsoft.public.vsnet.debugging)
  • Re: Breakpoint instantiation
    ... How can I enable more debugzones in the OAL and put more debug messages? ... KITL is not initialized. ... The connection is OK ... Could the breakpoint problem be related with this? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: regsvr32 error code 0x80004002
    ... My breakpoint isn't hit yet, but there's a warning with odd syntax. ... See if those registry entries did indeed get ... debug version? ...
    (microsoft.public.vc.mfc)
  • remote gdb (and firewire/dcons) not functioning as expected
    ... I'm trying to debug the problem introduced by the earlier commit to ... Remote debugging using /dev/cuaa0 ... Unable to find dynamic linker breakpoint function. ...
    (freebsd-current)