This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: breakpoint.c patch


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]