Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windbg: Put break-point on all functions in a class

Tags:

windbg

I need a simple way of putting break-points on all functions in a class. Something like this bp myDll!MyClass::*

like image 863
cprogrammer Avatar asked Nov 04 '11 16:11

cprogrammer


People also ask

How do you put breakpoint on all of the methods in a class?

Press F3 and then press F9 to add a breakpoint.

How do I set a break point in WinDbg?

WinDbg Menu You can open the Breakpoints dialog box by choosing Breakpoints from the Edit menu or by pressing ALT+F9. This dialog box lists all breakpoints, and you can use it to disable, enable, or clear existing breakpoints or to set new breakpoints.

How to put break point in function?

To set a breakpoint in source code, click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.


1 Answers

You can try this link:

Windbg by Volker von Einem -> Setting multiple breakpoints via wildcard pattern

Sometimes I need a break point on a specific funtion in multiple classes. Examples are the use of templates, interfaces or inheritence.

This can be easily achived via the bm (I translate as break match).

Example:

bm /a MyModule!!CComCollectionMap*::*get_Exists*

This will set a deferred breakpoint on every function that matches the given expression. It is a good idea to check the matches upfront with the following expression:

x MyModule!!CComCollectionMap*::*get_Exists*

In order to clear all currently set break points use:

bc *
like image 157
Kjell Gunnar Avatar answered Sep 28 '22 23:09

Kjell Gunnar