TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Rob Landley
from: Wim Veldhuis
date: 1995-01-17 00:04:24
subject: How to interpret crash code

Rob Landley wrote in a message to Kim Cheung:

 RL> Well, the standard technique (if it's your code) is to stick
 RL> a bunch of printf("Hi there!") calls in various places until
 RL> you've got it narrowed down to the actual line that's doing
 RL> the crashing, at which point you do some thinking.  
 RL> If you didn't compile it, and/or don't have the source code,
 RL> you're in trouble.  

Sorry to butt in, but I think there is a better way :-)

What I (under Windows) do is the following. I start the debugger and let
the debugger run the app. When an exception occurs, the debugger is invoked
in assembler mode, showing the faulty instruction. Since I don't do
assembler (much), I alter the invalid pointer (segment:offset values,
replacing them with valid values (usually ds:0 or a known and sacrificable
variable)), and then stepping through the asm until I hit source code. 
It works with Turbo debugger (Windows), but not with CodeView (also
windows) because it won't let you continue after an exception 13. So the
possibility is that it might work with OS/2 also. It surely is the fastest
method I know (at the moment) 

mvg/wr
  
--- timEd/2 1.01.g3+
* Origin: LightHouse BBS ==> I am a H.U.G.O. Member ! (2:285/324.3)
SEEN-BY: 12/2442 620/243 624/50 632/348 640/820 690/660 711/409 410 413 430
SEEN-BY: 711/807 808 809 934 942 949 712/353 515 713/888 800/1 7877/2809
@PATH: 285/324 37 32 1 280/0 801 24/24 396/1 3615/50 229/2 12/2442 711/409
@PATH: 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.