| 1 | = DevelopersFAQ = |
| 2 | |
| 3 | Here you can find answers to some of the most frequently asked questions about development of FM/2. If you have |
| 4 | |
| 5 | a question not answered on this page, you can ask it at |
| 6 | |
| 7 | http://tech.groups.yahoo.com/group/fm2/ |
| 8 | |
| 9 | ---- |
| 10 | [[PageOutline(2-6,,inline)]] |
| 11 | ---- |
| 12 | |
| 13 | == Trouble Shooting == #trouble-shooting |
| 14 | |
| 15 | === How to find the source code for a trap? === |
| 16 | |
| 17 | The OpenWatcom maps does not provide the source line detail that the VAC |
| 18 | maps provided, so the procedure for locating the trapping source code line |
| 19 | changes a bit, but it's still reasonable easy. |
| 20 | |
| 21 | Grab the object:offset value for the failing cs:eip from popuplog.os2. |
| 22 | |
| 23 | Sort the memory map section of fm3dll.map. |
| 24 | |
| 25 | FInd the function containing the trapping object:offset value. |
| 26 | |
| 27 | Calculate the offset from the function start to the object:offset value. |
| 28 | |
| 29 | Determine the source file for the function containing the trapping |
| 30 | function. |
| 31 | |
| 32 | Run |
| 33 | |
| 34 | wdis -l -s filename.obj |
| 35 | |
| 36 | where filename is the source file base name. This will create |
| 37 | filename.lst. |
| 38 | |
| 39 | Find the failing function in filename.lst |
| 40 | |
| 41 | Find the calculated offset. |
| 42 | |
| 43 | This is the line that trapped. |
| 44 | |
| 45 | There will be labels of the form L$289. These are relative to the |
| 46 | function start so it's easy to find the matching source code in filename.c |
| 47 | |
| 48 | === When the trap is in the watcom libraries, how can I trace it back to the actual call in the source? === |
| 49 | |
| 50 | For this you need a trap dump file. Then you can let pmdf do the work. You need my mapsymw.pl to convert the |
| 51 | Watcom map file to something pmdf can use. To get my mapsymw.pl, you can contact me at |
| 52 | |
| 53 | Steven H. Levine[[BR]] |
| 54 | steve53@earthlink.net |
| 55 | |
| 56 | You can also use the Watcom debugger. It can give you a call trace too. |
| 57 | |
| 58 | ---- |