Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windbg: How to set breakpoint on one of the overloads of a C++ function?

I have two overloads of a c++ function and I would like to set a breakpoint on one of them:

0:000> bu myexe!displayerror
Matched: 00000000`ff3c6100 myexe!displayError (int, HRESULT, wchar_t *)
Matched: 00000000`ff3c60d0 myexe!displayError (int, HRESULT)
Ambiguous symbol error at 'myexe!displayerror'

Heck I would be fine with setting breakpoints on all overloads, but can't seem to figure out how:

0:000> bu myexe!displayerror*
Matched: 00000000`ff3c6100 myexe!displayError (int, HRESULT, wchar_t *)
Matched: 00000000`ff3c60d0 myexe!displayError (int, HRESULT)
Ambiguous symbol error at 'myexe!displayerror*'
like image 553
user15071 Avatar asked Oct 02 '08 10:10

user15071


People also ask

How do I set a breakpoint 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 do you set breakpoints?

Set breakpoints in source code 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.

How do you set a breakpoint in GCC?

Breakpoints can be set for specific functions, lines or memory locations with the break command. To set a breakpoint on a specific function, use the command break function-name . For example, the following command sets a breakpoint at the start of the main function in the program above: $ gdb a.

What is breakpoint in C programming?

What Does Breakpoint Mean? A breakpoint, in the context of C#, is an intentional stop marked in the code of an application where execution pauses for debugging. This allows the programmer to inspect the internal state of the application at that point.


2 Answers

Try:

bu 0xff3c6100

If I remember right, WinDbg allows setting breakpoints by address too.

like image 194
Chris Jester-Young Avatar answered Nov 01 '22 01:11

Chris Jester-Young


Have you tried "bm myexe!displayerror*" ?

like image 45
Cyber Oliveira Avatar answered Nov 01 '22 00:11

Cyber Oliveira