breakpoint.c patch

J.T. Conklin jtc@redback.com
Mon Aug 23 14:17:00 GMT 1999


One concern I have with this patch is that on my NetBSD/i386 system
temporary breakpoints are removed when single stepping.  Like Linux,
NetBSD/i386 has a non-zero DECR_PC_AFTER_BREAK and single step is
implemented with hardware.  I've briefly examined the NetBSD kernel
code, and can't find evidence that it's doing anything unusual like
adjusting the program counter.  I'll spend more time investigating
that, plus running on an embedded X86 target running the remote
protocol later this evening.

Part of the uglyness of breakpoint handling seems is that break and
step return values are overloaded on signals.  Granted that is just
the way things are implemented on UNIX systems.  I'm thinking it may
make sense for GDB to have a higher level representation and require
that the low-level native and remote backends contain whatever cruft
necessary to distingush between signals, breakpoints, and single step.
Perhaps something like TARGET_WAITKIND_BREAK and TARGET_WAITKIND_STEP.

This way, complicated expressions that attempt to determine the type
of an event are in target specific code where they cannot mess things
up for other targets.

Thoughts?

        --jtc

-- 
J.T. Conklin
RedBack Networks


More information about the Gdb mailing list