Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setting breakpoints in all functions

202 views
Skip to first unread message

assaf

unread,
Aug 2, 2004, 6:50:38 PM8/2/04
to
hi all

i would like to set a breakpoint at the begingin of each function in the
process!!!
(not just my source code).

also, i would like to be able to save the breakpoints between sessions.
so when i shut down WinDbg, i would like it to remember all the breakpoints.
so that the next time i run it, the breakpoints will already be there.

this is the default behaviour of VisualStudio, is this possible to achieve
in WinDbg?

assaf


Pavel Lebedinsky

unread,
Aug 6, 2004, 1:22:55 AM8/6/04
to
"assaf" wrote:

> i would like to set a breakpoint at the begingin of each
> function in the process!!!
> (not just my source code).

Are you really sure you want to do this? That's a lot
of breakpoints.

Anyway, you can set multiple breakpoints with the bm command.
"bm *!*" should set breakpoints on all functions in all
modules for which you have private symbols (public symbols
don't have type information so debugger cannot determine if
a symbol is really a function or not).

For modules without private symbols you can force export
symbols to be loaded (by using an empty or bogus symbol
path), and then bm *!* will put breakpoints on all
exported functions.

I just tried it for notepad.exe and it's still working
(more than 3000 breakpoints already set). Looks like adding
a breakpoint is at least an O(N) operation, so inserting
huge numbers of breakpoints doesn't scale very well.

> also, i would like to be able to save the breakpoints
> between sessions. so when i shut down WinDbg, i would
> like it to remember all the breakpoints. so that the
> next time i run it, the breakpoints will already be there.

I rarely use windbg (I prefer cdb myself) but I'm sure this
is possible. Take a look at debugger docs.

0 new messages