This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: break of close loop
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Simon Richter'" <Simon dot Richter at hogyros dot de>
- Cc: "'Daniel Jacobowitz'" <drow at false dot org>,"'Efim Monjak'" <ymonyak at lipowsky dot de>,<gdb at sources dot redhat dot com>
- Date: Fri, 4 Nov 2005 15:35:46 -0000
- Subject: RE: break of close loop
Simon Richter wrote:
> Hi,
>
> Dave Korn wrote:
>
>> The stub is probably implemented by placing a temp breakpoint
>> immediately after the instruction to be tested, but has negelected the
>> fact that to handle jumps you may need to place the temp breakpoint
>> somewhere _other_ than immediately after the instruction,
>
> The question at hand appears to be breakpoints placed on top of the
> instruction being stepped, as the instruction steps back to itself. This
> is especially common on architectures with a dedicated "decrement and
> jump if not zero" instruction.
That's one of the corner-cases and is indeed one of the reasons why
emulating a branch instruction is often a better idea than trying to let it
run and trap it....
cheers,
DaveK
--
Can't think of a witty .sigline today....