Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 08-24-2003, 03:13
Satyric0n
 
Posts: n/a
I have found the issue. To get this to work, you must create/enable the breakpoint while in the address context of the process who will actually call the function you want to break on.

You can see your current address context in the bottom-right of the SI window, I think it is always Idle when you Ctrl+D.

As an example, I wrote a quick Delphi app to test this (just a button on a form that calls MessageBoxA), it's called Project1. When I Ctrl+D, my address context is Idle. If I bpx MessageBoxA now, pressing the button on my form will show the messagebox without breaking. But, if I Ctrl+D, then do ADDR Project1 (or if I have more than one process running called Project1, I can do PROC, see the Process ID of the instance I want to break, and do ADDR <Process ID>), then do bpx MessageBoxA, when I press the button on my form, it breaks correctly.

Also, if you already have a breakpoint, instead of clearing the breakpoint and recreating it in the right address context, you can just disable it then reenable it in the right address context (less typing! ).

As far as I know, you had to do this same thing to get breakpoints to work in SoftICE 2.7. At least I did. That's how I knew what the problem was, since I had to figure this out while using 2.7 .

One thing I discovered is, when you run an app through symbol loader, and SI breaks on entry point, even though SI says you're in the right address context, if the PROC command shows more than one process with the name of the process you're debugging, you still have to manually do ADDR <process id>. I found that while Delphi was open, PROC listed two or more Project1 processes, one being my real running process, and the others having a status of Deleting. When I loaded my app through SL and immediately did bpx MessageBoxA, it didn't break properly. But, if I loaded my app through SL, and did ADDR <my running process id>, it worked. Once I closed Delphi, and loaded my app, PROC only showed one instance of Project1 (the one with the status of Deleting was no longer there), and immediately setting my bpx without doing ADDR worked. So, the rule here is, if PROC shows more than one process with the name of the process you're debugging, you always have to type ADDR <process id> before setting any breakpoints, regardless of what SI says your current address context is!

Since every time you press Ctrl+D, your address context is Idle, I find it useful when debugging an app to write a quick macro (I call mine AC) that just does ADDR <name/id of process I'm debugging>. Then, every time I hit Ctrl+D, I just type AC to get in the right address context, then breakpoints etc work correctly.

Let me know if my explanation is too confusing, or if you find a better solution.

Last edited by Satyric0n; 08-24-2003 at 05:34.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
breakpoints not breaking in olly.. abitofboth General Discussion 2 11-17-2005 19:13
Breaking DLL with OLLY Wackyass General Discussion 8 04-27-2005 16:34
PAL/GAL chip breaking code? hardsome General Discussion 0 04-10-2003 19:12


All times are GMT +8. The time now is 22:02.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )