Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

someone working on CDB debugger?

<< < (11/12) > >>

Bat:

--- Quote from: oBFusCATed on December 29, 2012, 06:32:54 pm ---
--- Quote from: Bat on December 29, 2012, 06:12:43 pm ---Here a patch to add "Breakpoint at main entry"

--- End quote ---
Isn't this the same as using the step-into command instead of debug->start?

--- End quote ---
Not really the same. In fact 4 cases :

-Hit run, with no bp at start : program run fully
-Hit step-into, with no bp at start : program stop just after loading (so long before main() or WinMain(), before initializing DLL and so on)
-Hit run, with bp at start : program stop at WinMain
-Hit step-into, with bp at start : program stop just after loading and if we run, it stop at main() WinMain() too ...

In case, Step-into+Bp we can change beahviour not to place main() bp ...

Patch include a configuration checkbox to activate (or not) Breakpoint at start

Martin K.:

--- Quote from: Bat on December 29, 2012, 06:44:08 pm ---
--- Quote from: oBFusCATed on December 29, 2012, 06:32:54 pm ---
--- Quote from: Bat on December 29, 2012, 06:12:43 pm ---Here a patch to add "Breakpoint at main entry"

--- End quote ---
Isn't this the same as using the step-into command instead of debug->start?

--- End quote ---
Not really the same. In fact 4 cases :

-Hit run, with no bp at start : program run fully
-Hit step-into, with no bp at start : program stop just after loading (so long before main() or WinMain(), before initializing DLL and so on)
-Hit run, with bp at start : program stop at WinMain
-Hit step-into, with bp at start : program stop just after loading and if we run, it stop at main() WinMain() too ...

In case, Step-into+Bp we can change beahviour not to place main() bp ...

Patch include a configuration checkbox to activate (or not) Breakpoint at start


--- End quote ---

Hi,

Makes sense after the first look, are there some other comments on this?

Martin

oBFusCATed:

--- Quote from: Bat on December 29, 2012, 06:44:08 pm ----Hit step-into, with no bp at start : program stop just after loading (so long before main() or WinMain(), before initializing DLL and so on)

--- End quote ---
If you ask me, I'd make it to stop at main and I'll add an option to make it possible to stop just after load.
GDB does just this currently and in fact there is no option.

Martin K.:

--- Quote from: oBFusCATed on December 29, 2012, 07:24:52 pm ---
--- Quote from: Bat on December 29, 2012, 06:44:08 pm ----Hit step-into, with no bp at start : program stop just after loading (so long before main() or WinMain(), before initializing DLL and so on)

--- End quote ---
If you ask me, I'd make it to stop at main and I'll add an option to make it possible to stop just after load.
GDB does just this currently and in fact there is no option.

--- End quote ---

You mean:

1.) Run runs the program under debugger control with user breakpoints set - like currently and "step into" sets a temporary breakpoint at main, Winmain, _main or whatever is found by the debugger?
2.) make an option to stop the debuggee after it is loaded - before main.

right?

I haven't implemented it so far, because i haven't checked whats happen when my project is a shared library und another program (which uses this library) will be started as debuggee. There are two other points i'm aware of with CDB and executable breakpoints: CDB64 is able to debug 32 and 64 bit programs, but it sets another breakpoint while starting the 32bit runtime environment (WoW64), the debugger should go over it (maybe should an option also, or depending on the option "stop after loading"), the second is the ability of the MSVC Compiler to generate incremental link tables. When i set a breakpoint on a function entry while this feature is on, the debuggee will break at the link table entry and the user has to step one time to reach the requested breakpoint position. Maybe also an option for the user...

Martin

Bat:

--- Quote from: Martin K. on December 29, 2012, 09:20:42 pm ---You mean:

1.) Run runs the program under debugger control with user breakpoints set - like currently and "step into" sets a temporary breakpoint at main, Winmain, _main or whatever is found by the debugger?
2.) make an option to stop the debuggee after it is loaded - before main.

right?

--- End quote ---

For me it's a good base.

With DLL 2 or 3 possibility in fact :
-stop at main() of host program
-stop at DllEntry() of DLL (here EntryPoint name should be recovered)
-stop at both

Stopping at DllEntry is good option ?

And if we keep option "stop debuggee after loading", all other possibility can do manually

For 32/64 bit I haven't do enought 64 bits debugging. If debugger add itself some breakpoint they can be bypassed manually in first time ...

If it's ok I will do modification

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version