This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
gdb "step" behavior in multi-threaded programs
- From: Kevin Hilman <khilman at equator dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: 21 Jan 2003 11:47:26 -0800
- Subject: [ECOS] gdb "step" behavior in multi-threaded programs
- Organization: Equator Technologies, Inc.
I'm working on the eCos gdb stub for new architecture, and I'm a bit
confused about the correct gdb behavior for breaking/stepping for
multi-threaded programs. For example, if you have a function being
called by multiple threads and you set a breakpoint at that function.
I presume that for breakpoints, whenever ANY thread calls that
function, the breakpoint should be hit, right?
What about stepping in that function (via the "step" command)? Should
gdb stop whenever ANY thread hits the next source line? or just the
thread that hit the breakpoint? And what about "stepi"?
My guess is that it should stop whenever any thread hits the next
line/instruction, but I'm not sure. This would be the easiest to
implement, but not necessarily the most useful from the debugger users
perspective. I also noticed in the gdb docs that for watchpoints,
they are specifically mentioned as being one thread only.
--
Kevin Hilman --- Equator Technologies, Inc.
khilman@equator.com --- Seattle, WA USA
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss