flat assembler
Message board for the users of flat assembler.

Index > Windows > adding windows debug info into .obj file generated fasm

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



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 07 Mar 2009, 14:09
Hi strap89!
I have tested your PECVT.EXE and it runs perfectly so I can debug MDIRichEdit.exe in source mode with the WinDbg

Thank you very much on this amazing tool

Now FASM is "Numero uno"

Best regards

Very Happy

_________________
down under
Post 07 Mar 2009, 14:09
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 07 Mar 2009, 14:16
revolution wrote:
I think this thread should be made sticky.

It is already linked to by the sticky general debug info thread.
Post 07 Mar 2009, 14:16
View user's profile Send private message Visit poster's website Reply with quote
strap89



Joined: 15 Feb 2009
Posts: 23
Location: Russia
strap89 15 Mar 2009, 04:51
Added in-macro debugging ability. See new version in top post.
I'm like write big, complex macros, so i need debugging inside macro code. I'm try realize that ability.
Post 15 Mar 2009, 04:51
View user's profile Send private message Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 15 Mar 2009, 09:01
Hi strap89,

Very nice, I already tested it and it works, but it skips beginning of the macro and starts debugging at the end of it
for example:
Code:
macro m2m   M1, M2{
      push     M2
         pop      M1
         }
    

debugger starts on pop M1

is that how it suppose to work?

best regards

_________________
down under
Post 15 Mar 2009, 09:01
View user's profile Send private message Reply with quote
strap89



Joined: 15 Feb 2009
Posts: 23
Location: Russia
strap89 15 Mar 2009, 14:27
Yes, it right. Because macros is not a function but inline insertion - i need mark as breakable point place where macros invoked, but place of first macro line also mapped on this row in code. It's possible to do breakable first line of macro, but in this case when you run program step by step you will jump in macro before you come to place where this macro invoked. I can make later variant with selectable type of macro expansion.

I'm write this variant (it simpler than i think). Look at top post. Use -m2 option. In howto.txt i'm try describe difference of methodic.
Post 15 Mar 2009, 14:27
View user's profile Send private message Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 15 Mar 2009, 22:18
I tested it and it does the same, but that is probably the way that macros work. The debugger goes only through these lines that are actually used

best regards
Post 15 Mar 2009, 22:18
View user's profile Send private message Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 16 Mar 2009, 04:10
Hi strap89,

I tried to build your source code with VS2005 but I could not because precompiled header is missing, I've got this error:
Code:
Error    1       fatal error C1083: Cannot open precompiled header file: 'Debug\pecvt.pch': No such file or directory     
    


best regards

_________________
down under
Post 16 Mar 2009, 04:10
View user's profile Send private message Reply with quote
strap89



Joined: 15 Feb 2009
Posts: 23
Location: Russia
strap89 16 Mar 2009, 04:15
Hi habran,
Compile without precompiled header (project property\c/c++\precompiled header\first option).
Post 16 Mar 2009, 04:15
View user's profile Send private message Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 16 Mar 2009, 14:16
Thank you for that information, but I had after that error :
cl : Command line error D8045 : cannot compile C file '..\..\..\..\pecvt\utils.cpp' with the /clr option

so I created another project from existing code and got this message:

Error 1 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRTD.lib

It looks like I am doing something wrong (or maybe everything)

best regards

_________________
down under
Post 16 Mar 2009, 14:16
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 16 Mar 2009, 14:55
Are you setting the compiler flags for console application or GUI? IIRC WinMain is for a GUI app. It's been a while since I did the C compiler thing so I could be completely wrong of course.

Hehe, now I am reminded why I like SSSO.
Post 16 Mar 2009, 14:55
View user's profile Send private message Visit poster's website Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 17 Mar 2009, 04:06
Thank you revolution, you were right
revolution:
Quote:
It's been a while since I did the C compiler thing


Same here. I hate damn C compilers because they never build properly, you spend more time in trying to compile successfully, than in writing the hole application, that's why I love Assembler

So, now I have another question for you, and if you answer it correctly, than I shell admire you even more

The question is: why do I always have this message:
Code:
Error     1       Error spawning 'cmd.exe'.    

although exe is build correctly
("although" was misspelled with "aldo", corrected by the "author")

best regards

_________________
down under


Last edited by habran on 17 Mar 2009, 06:41; edited 2 times in total
Post 17 Mar 2009, 04:06
View user's profile Send private message Reply with quote
strap89



Joined: 15 Feb 2009
Posts: 23
Location: Russia
strap89 17 Mar 2009, 04:08
Simplest way - make new project, named pecvt type Win32 console app,
in wizard clear precompiled header. Later In project options in General select in using unicode - use multibyte, if in you compiler by default CLR turned ON (in VS2005 not so) - turn it off. After copy all source file from archive into project dir (src subdir no needed), pecvt.cpp will be overwritten, "add existing filles..." into project (all cpp files except pecvt.cpp) in source of project and all *.h files in headers of project.
That all.
Post 17 Mar 2009, 04:08
View user's profile Send private message Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 17 Mar 2009, 04:17
Thanks strap89,
I have succeeded already to build it and now I can enjoy to step through it
with the debugger
I appreciate your program and think that PECVT.EXE is a big step forward for FASM assembler
best regards
Post 17 Mar 2009, 04:17
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 17 Mar 2009, 04:39
habran wrote:
The question is: why do I always have this message:
Code:
Error   1       Error spawning 'cmd.exe'.    
I don't know (I guess that mean you will not be able to admire me, oh well). What program is producing this error?
habran wrote:
aldo exe is build correctly
Okay. Who is aldo?
strap89 wrote:
Simplest way - make new project, named pecvt type Win32 console app,
in wizard clear precompiled header. Later In project options in General select in using unicode - use multibyte, if in you compiler by default CLR turned ON (in VS2005 not so) - turn it off. After copy all source file from archive into project dir (src subdir no needed), pecvt.cpp will be overwritten, "add existing filles..." into project (all cpp files except pecvt.cpp) in source of project and all *.h files in headers of project.
That all.
Oh, and that is the simplest way? Hehe, sounds like a lot of work just to get out a small proggy from C.
habran wrote:
I appreciate your program and think that PECVT.EXE is a big step forward for FASM assembler
Agree. I just wish I had time to test it. Maybe in a few weeks I will be free to switch back to x86. I am keen to give it a run through.

strap89: Any chance of an asm version of PECVT? Wink Or indeed anyone feel the desire to do a asm port?
Post 17 Mar 2009, 04:39
View user's profile Send private message Visit poster's website Reply with quote
strap89



Joined: 15 Feb 2009
Posts: 23
Location: Russia
strap89 17 Mar 2009, 04:48
revolution: simplest way in this situation. But i agree: project too hard for realized task. About asm version - not from me. I'm use asm too rarely, my experience too small.
Post 17 Mar 2009, 04:48
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 17 Mar 2009, 05:46
Quote:

Who is aldo?

look at the keyboard helps to reveal most typos Razz
Post 17 Mar 2009, 05:46
View user's profile Send private message Visit poster's website Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 17 Mar 2009, 06:34
"aldo" was supposed to be word "although" and I misspelled it Embarassed
English language is not my mother tongue so sometimes (read: often) It happens that I make mistakes.
In my language we speak as we write and write as we speak and I would write that word like this: "oldou"
I apologize for misspelling

revolution, I do admire you, but not as much as I would if you new the answer
You asked strap89 the same question I wanted to ask: "PECVT.ASM"???

Maybe one of us should roll the sleeves and transfer it to FASM source code?
What do you think, strap89?

regards

_________________
down under
Post 17 Mar 2009, 06:34
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 17 Mar 2009, 06:40
Hey, typos are okay, no need to apologise. My fault for not recognising it. I didn't mean to make you look bad.

Anyhow, PECVT.ASM? I haven't seen the c source yet so I don't know what is involved. Is it likely to be a big task to convert?
Post 17 Mar 2009, 06:40
View user's profile Send private message Visit poster's website Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 17 Mar 2009, 06:45
I don't think so, because we can debug it and see it written in asm codes and C++ codes,
only we need actually is to replace variables with their names
Post 17 Mar 2009, 06:45
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 17 Mar 2009, 08:01
That is not really the type of conversion I was thinking of. That is just using a disassembler to create source from a binary. Not a nice solution. Not a readable solution.
Post 17 Mar 2009, 08:01
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.