flat assembler
Message board for the users of flat assembler.
Index
> Windows > Debug Symbols for Fasmw programs |
Author |
|
handyman 14 Jan 2008, 02:00
Edit: new version here that I hope will run for everyone. see posts below.
Here is a lil' ol' program that may be of help to some of you in creating debugging symbols for Ollydbg when debugging Fasmw programs. It is still a bit crude around the edges, but should be usable. Be sure to read the "readme.txt" file first since this program needs a bit of setup to make it fully functional. The basic premise is to create an export file containing as many exportable symbol names from a program as possible (within the current flbls.exe limitations). Then add the export file to the program with an include and recompile. Course if you delete a symbol be sure to remove it from the export file before compiling again or the compile will error. Best way is to save your source and then run flbls against the source to regenerate the export and then compile. Ollydbg can use these symbols to make the code and data sections more readable. If you want to see it what the final result looks like just run this program (flbls.exe) in Ollydbg and widen the Address columns to see the names in the code and data windows.
Last edited by handyman on 18 Jan 2008, 17:18; edited 2 times in total |
|||||||||||
14 Jan 2008, 02:00 |
|
LocoDelAssembly 14 Jan 2008, 02:24
Nice
I see a problem however, labels are exported with the ":" as well, is it intended behaviour? Example: Code: 0040A90F |. E8 70020000 CALL flbls.SetBuff: 0040A914 |. E8 90000000 CALL flbls.Add2Loc: 0040A919 |. E9 89000000 JMP flbls.chk4var.end: Also there is two problems with Ctrl+G, one is related to ":", since the label contains it but Olly ignores it for the search it never finds the symbol, and the other problem is with the dot since since the first word before the dot is considered a module name so those labels are unsearchable for this extra condition too. The latter problem doesn't look very fixable though |
|||
14 Jan 2008, 02:24 |
|
handyman 14 Jan 2008, 02:35
Don't use Ctrl+G for searching for label names, (see my comments in the readme.txt file) instead use Ctrl+N and use the name lookup window.
The naming convention is desired the way it is because it shows you the real name vs the .local name that can be used in the source code, and it is what fasm is really using for a label (except for the ":") when it compiles the code. And yes the ":" behind the lable names in code is desred because it lets you know in the names lookup window (Ctrl+N) what you are looking at. |
|||
14 Jan 2008, 02:35 |
|
handyman 14 Jan 2008, 02:41
AlexP:
Well, no, it's not suposed to do that! I wrote program under Win 98SE, and do not have any other operating systems to try it out on. Runs fine there. Run program in Ollydbg if you can and see if it tells you where it bombs and let me know what you find out if you can. Also if you are going to put in screen shot, be sure to reduce the size, cause the last one widened everything up to where this thread is now double the width of my screen, so now I have to scroll left and right. |
|||
14 Jan 2008, 02:41 |
|
AlexP 14 Jan 2008, 02:50
wow horrible stuff happened... sry but now I've gotta go 2 sleep but maybe others can help debug... Olly went weird on several occasions after I hit the "list all" button, then it displayed many weird thread-related messages at the status bar of olly. Well, g night.
Last edited by AlexP on 14 Jan 2008, 03:04; edited 3 times in total |
|||
14 Jan 2008, 02:50 |
|
handyman 14 Jan 2008, 02:56
AlexP
Something to try, I noticed that is seems you have spaces in the path name. Try a path that does not contain any spaces and see if it works. My win98 version for Fasmw and my program does not like any imbedded spaces in the path. |
|||
14 Jan 2008, 02:56 |
|
AlexP 14 Jan 2008, 03:06
Still crashed w/o spaces
|
|||
14 Jan 2008, 03:06 |
|
handyman 14 Jan 2008, 03:27
maybe Olly will give a hint of what happens. If you can run it in Ollydbg, maybe it will stop at the problem area. Just a thought. What operating system are you using?
|
|||
14 Jan 2008, 03:27 |
|
AlexP 14 Jan 2008, 04:21
You're lucky I couldn't sleep . If u looked at the taskbar, Vista 32-bit. I know, right? Should work perfectly but it keeps screwin' up on me. I'll debug it tomorrow after school(, and homework, and studies) and report back here probably in under 24 hrs. Good night finally..
PS: U should team up w/someone else to make a more visually appealing version of it once u get bugs worked out, good project idea for u |
|||
14 Jan 2008, 04:21 |
|
handyman 14 Jan 2008, 05:31
AlexP
download it again, I changed the memory allocation code a bit for better memory allocation matchups. Maybe the way I was handling it a first is what was messing you up. I have heard that Vista is quite a it more picky about some things then 98SE. |
|||
14 Jan 2008, 05:31 |
|
MHajduk 14 Jan 2008, 15:56
handyman
your program even doesn't start under Windows XP SP2 (both: original '.EXE' and recompiled with FASM 1.67.25.). |
|||
14 Jan 2008, 15:56 |
|
LocoDelAssembly 14 Jan 2008, 16:52
But it starts here and I also have Windows XP SP2
|
|||
14 Jan 2008, 16:52 |
|
handyman 16 Jan 2008, 02:48
AlexP
Quote:
Not sure what you are wanting here - and this comment was made prior to any attempt to run my program - except that as far as I can understand this particluar request there is no way my program, or any other that I know of that is outside of Olly (or any other debugger) for that matter, could do this. You may be able to make a plugin in Ollydbg that will do this, but you will have to do it yourself since you know what you have in mind for what you want . The best thing you could probably do is help me figure out why you cannot run my program, cause if you could it would help you place all the labels it can from your source into an export section in you program so that they can be imported into Olly so that when you run the program there you can see exactly where you are. I know it is in intermedate step that then has to be done for this, but until Fasm can put debugging symbols in this could be a way to get some symbol info into the debugger quicker then entering the info in yourself, or having to keep matching disassembled code to the source. If you are not using Ollydbg then this may not work either. |
|||
16 Jan 2008, 02:48 |
|
AlexP 16 Jan 2008, 02:56
I don't have time to do anything in the next two days, semester finals in school...
Lol I got an error box this time - |
|||
16 Jan 2008, 02:56 |
|
handyman 18 Jan 2008, 17:24
I think I may have found what is causing problem. I was using old InitcommonControls, which I have discovered is defunct and have replaced it with InitCommonControlsEx. I updated the zip file in the first post, so it is the most current version at this time.
|
|||
18 Jan 2008, 17:24 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.