问题
why bp main failed? how to list source code as gdb's list command does?

this question is not the same as CDB command for setting a breakpoint based on a line number
seems cdb can be used with windbg, but is that possible to use cdb a bit similar to gdb?
回答1:
cdb allows 3 different commands to set breakpoints: bp, bm, and bu
- bp accepts arguments that are numeric addresses
- bm accepts arguments that are textual symbols in a module that is already loaded
- bu accepts arguments that are textual symbols in modules that may or may not be loaded yet.
To Set a breakpoint at main we can guess Image00390000 is actually hello.exe (Sometimes cdb fails to recover the name you would expect). You can use the command:
bm Image00390000!main
This assumes that main really is the symbol name, and that symbols are loaded. You can use:
lmvm Image00390000 //to check if symbols are loaded
x Image00390000!*main* //lists all symbols that have main anywhere in the name
来源:https://stackoverflow.com/questions/30011043/how-to-set-breakpoint-and-show-source-code-when-using-cdb-to-debug-c-programs