flat assembler
Message board for the users of flat assembler.

Index > IDE Development > Fresh work version with "Source level debuger" :D

Goto page Previous  1, 2, 3  Next
Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Tommy wrote:
BTW: I noticed that when a DLL is loaded the only message that appears is "DLL loaded: "... Is this a bug, or haven't you implemented it fully yet?


Well, actually it is not a bug, but solution. Very Happy When "load DLL" debug event happen in debugged process, Win95 provide information about filename of the loaded module, so if you run Fresh on Win95/98 there will be the name of DLL. WinNT/2000/XP does not provide such information, the pointer in the returned structure is NULL. That was a reason for one of the fixed bugs on NT clones.
So, I don't know another way to determine what DLL, was loaded other than information that Windows sends to debugger. If you, or someone else know such method, it will be very helpfull.

Regards.
Post 27 Jan 2004, 17:01
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy
Oh.. Surprised That's why...? I'll check it and try to find a solution... Wink
Post 27 Jan 2004, 17:29
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Does it at least give you image base of loaded DLL on NT?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 27 Jan 2004, 22:41
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
comrade wrote:
Does it at least give you image base of loaded DLL on NT?


Yes, the problem is only the filename.
Post 27 Jan 2004, 22:56
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
BTW: New work version with all fixes for WinXP is uploaded in the Fresh site. Also FASM 1.51 beta 3 and Decard's documentation on Fresh macro library are added to the project.

Now Fresh (and debugger) should work on WinXP, but of course if you get some bugs, please report them here.

Regards.
Post 27 Jan 2004, 23:06
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
JohnFound wrote:
Yes, the problem is only the filename.

I could write a proc to get the filename from the image address... Wink
Post 28 Jan 2004, 00:52
View user's profile Send private message Yahoo Messenger Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Such procedure exist....
Code:
 mov     eax,IMAGEBASE_OF_DLL
        add     eax,[eax+IMAGE_DOS_HEADER.e_lfanew]
 mov     eax,dword [eax+IMAGE_NT_HEADERS.OptionalHeader.DataDirectory]   ; export table
      mov     eax,[eax+edx+IMAGE_EXPORT_DIRECTORY.nName]
  add     eax,edx
     stdcall [MessageBox],0,eax,OFFSET szAppTitle,MB_OK+MB_ICONASTERISK+MB_APPLMODAL    


Description:
Download
Filename: imagehdr.inc
Filesize: 2.97 KB
Downloaded: 214 Time(s)


_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 28 Jan 2004, 22:52
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Hi, comrade.
Your solution looks interesting. Actually I found another one that works too (well on Win98 Smile ), but I will check your too.
My solution is:
Code:
invoke GetModuleFileName, ImageBaseOfTheDll, ptrbuffer, bufflen
    

but actually I didn't check it under Win2000 yet.

Regards.
Post 28 Jan 2004, 23:02
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
But can you do it for non-system DLL that is not in process space of Fresh.exe? For routine I paste, you can convert moves to calls to ReadProcessMemory().

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 29 Jan 2004, 01:31
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
comrade wrote:
But can you do it for non-system DLL that is not in process space of Fresh.exe?


Probably not. Sad You are right, about this. I have to use ReadProcessMemory and internal structures. I will try some variants. Thank you for the help.

Regards
Post 29 Jan 2004, 06:39
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
edx supposed to hold imagebase too, sorry, I did not paste completely.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 29 Jan 2004, 17:37
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Hi all.
Next work version uploaded. (I know, it is a time for next official... Smile )
Big rewrite of the debugger to make it to run faster. Several bugfixes. Implemented FASM 1.51 beta 3.

If your tests are good, I think to continue with remaining debugger features - memory, stack, breakpoints etc.

Regards.
Post 30 Jan 2004, 00:36
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Hi John,
The debugger itself works just perfectly, at least on my machine Smile
But you didn't include new version of the help.asm - its here: http://board.flatassembler.net/download.php?id=508 Wink
Also, findreplace still need one change. It's only one line so I think it would be simpler if I tell you what to change rather than attaching the whole file. It's line 202 of findreplace.asm:
Code:
invoke  InvalidateRect, [hSourceEditor],NULL,0    

it should be:
Code:
invoke  InvalidateRect, NULL,NULL,0    

This line caused problem when searching all files in the project and some file was already open in the source editor. It's strange - it didn't update the screen with only hSourceEditor as a first parameter Confused

regards
Post 30 Jan 2004, 07:40
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Hi Decard.
Sorry for the delay. I was too tired yesterday. I will implement it probably this night. Smile
About InvalidateRect - isn't it too hard to force all windows to be redrawn? Maybe RedrawWindow with suitable parameters will be more gentle? Smile
BTW: We need some visual feedback during searching process in many files, because it may continue too long. Maybe some progress window?
Ah, and another thing - when Find/Replace window is opened, the the option "Search in current file" should be set, not the last used option (IMHO).

So, if you have time to make this, make it, but the freshguide is more important in this moment I think.

Regards
Post 30 Jan 2004, 08:56
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy
Good work John! Now, there's no delays during the debugging process... It's fast and good! Wink
Post 30 Jan 2004, 15:22
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Tommy wrote:
Good work John!


Thank you, Tommy. Btw, do you have some progress with AsmEdit?

I mean, following features will be highly neccessary in the near future:

1. Mark for current executed line.
2. Mark for break points.
3. It will be good if we can make AsmEdit read-only for the time of debugging.

Regards
Post 30 Jan 2004, 16:21
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy
I've just implemented the read-only feature... Posting an update during the week-end with some more fixes... Wink
Post 30 Jan 2004, 17:29
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Great, thank you! Ah, and please, there is a very anoying bug somewhere in the editor, that makes caret to disapear, even when the AsmEdit have keyboard focus. I don't know is it a problem with DestroyCaret, or with HideCaret... it is not very important, just look for it when you are working on another things.

Keep good work!
Post 30 Jan 2004, 17:34
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy
Hmm...strange, I've not been bothered with that, but I'll take a look while I'm work with the other tasks... Wink
Post 30 Jan 2004, 18:44
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy
Here's an update (with read-only and debug-line features implemented) ... New update will be uploaded soon (during the day or tomorrow)... Wink


Description: AsmEdit update
Download
Filename: update.zip
Filesize: 32.8 KB
Downloaded: 180 Time(s)

Post 31 Jan 2004, 11:20
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.