Difficulties with breakpoints #4342
Replies: 5 comments 24 replies
-
|
@danrose501 Are you getting any other messages, esp. in the Interpreter, indicating why the application is stopping? And is the behavior the same if you run the application in Windbg? The debugger typically stops for events and exceptions that it either doesn't know how to handle or that you've explicitly marked "Break". If you open the Debug node in the Objects view (under Process), you'll see subnodes for Events and Exceptions, and within each is an Execute node indicating how that event/exception is handled. "Break" means the obvious thing, and you can toggle through the other options using "T". So, if, for example, the process breaks that you're F5ing through corresponded to DLL loads, I would check the Module Load event and make sure it didn't accidentally get set to "Break". Alternatively, you might be hitting some exception that normally wouldn't cause the debugger to stop or the process to fail (C Runtime Exceptions are a typical candidate), but, if the debugger hasn't been explicitly told not to stop, it will until you define that exception and the behavior you'd like to see in the debugger. |
Beta Was this translation helpful? Give feedback.
-
|
@danrose501 So am guessing you haven't gotten a copy of windbg yet. If and when you get that, running your target in windbg would really really help us figure out what's going on. Leaving that aside, a few notes.... First, open and closed red circles in Objects do NOT mean enabled and disabled - solid means it has elements, i.e. is a container, and open means it does not. So, one question I still have is, particularly for dbgeng IN-VM, what is the setting for Debugger->Sessions->[0]->Processes->[xxx]->Debug->Events->Load Module->Execute & Continue? If it's set to "Output-only" but still stopping at every load, something odd is going on. I would like to know why. Assuming there are no relevant messages in the Interpreter window (the breakpoint messages are not relevant), try running Ghidra with support/ghidraDebug, rather than ghidraRun. Some chance we can find a clue in the console. On the BP front, can you dop the equivalent of the "notepad test" for your target, i.e. set a breakpoint at an instruction you absolutely know has to be executed? |
Beta Was this translation helpful? Give feedback.
-
|
OK, sorry - wasn't sufficiently clear.... By "the equivalent of the notepad test", I meant can you: |
Beta Was this translation helpful? Give feedback.
-
|
@danrose501 I don't think the thread count should affect anything other than perhaps a slow start. Needing the x86 version does not make sense to me. Do you have a sense as to why? Are you running on a 32-bit OS? Did you try running using ghidraDebug? Basically, am looking for anything approaching a clue here. :) |
Beta Was this translation helpful? Give feedback.
-
|
Interesting observations - am interested in following up if and when you have time. Some quick comments:
Re Observations: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In summary, I've been using Ida for debugging a particular Windows application but am trying to switch over to Ghidra 10. I've tried using dbgeng locally in IN-VM and locally via GADP. I am able to get he application to run but I'm having difficulty with breakpoints. I have only been able to set BPs in the Interpreter window with the
bp <address>command after the app has been started and paused. However, when I resume (F5) the process it continually stops in ntdll.dll (I think). After many F5s after I delete the BP and the process then runs.Per suggestions from d-millar I installed the latest SDK/Windbg. I then started notepad.exe with the debugger using locally IN-VM and, after the initial stopping in ntdll.dll I set a BP a couple of instructions later, F5 and voila, the BP hit so it appears I can debug that app.
My problems are no doubt due to "cockpit error" so I would appreciate any thoughts/suggestions of things to try.
Beta Was this translation helpful? Give feedback.
All reactions