• Welcome to PowerBasic Museum 2020-A.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

zTrace 1.52 (debugging utility)

Started by Patrice Terrier, April 05, 2009, 12:43:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

John Aadnoey

That was the first code i ported to 64-bit, because i couldn't develop anymore without it  :)
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Norbert Spoerl

Hello Patrice,

yesterday I made a download for your zTrace 1.52.

Now a question. Can I use that inside a PB-DLL-Code?

Inside a PB-Exe-Sourcecode, it was okay. In a DLL I got an axception error.


Patrice Terrier

#32
To be used from inside DLL(s) was the main purpose of it  :)

But perhaps you are using it within a critical section.
And without seeing the code it is hard to say.
Also the PB version uses ASCIIZ (char), while the C++ 32/64-bit uses UNICODE (wchar).
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Norbert Spoerl

Hi Patric,

I think the reason for the error by using zTrace inside DLL-code was the point, that the EXE is not native code. The EXE goes with a runtime library. With an PB-EXE the error is not repeatable.

So far I have used a solution of MCM -> STDOUT to a console window. Understand I zTrace right, that it is practically the same, only with more comfort?

Patrice Terrier

#34
Quotethe EXE is not native code. The EXE goes with a runtime library

I do not understand, what runtime are you speaking about  ::)
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Norbert Spoerl

This is an EXE that was build with a programming language named PROFAN. A part of the PROFAN EXE is a runtime.
http://xprofan.de/start.htm

John Aadnoey

Quote from: Patrice Terrier on October 29, 2013, 04:48:46 AM
John Aadnoey

That was the first code i ported to 64-bit, because i couldn't develop anymore without it  :)

I can understand why.

On the PB version; why is it using aschiiz and not string? any advantage to asciiz over string?

Patrice Terrier

QuoteOn the PB version; why is it using asciiz and not string? any advantage to asciiz over string?

The answer is obvious: i am using this 32-bit version with several languages, not just PB  :)
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

José Roca

Use BYCOPY, i.e. zTrace(BYCOPY DumpInfo), instead of zTrace(DumpInfo).

Patrice Terrier

#39
or like this zTrace((PBstring))
that is a short cut for BYCOPY.
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

José Roca

#40
I prefer to use the verbose way. It adds clarity. I even use BYREF in the parameters of my declares to be sure that this is what it's intended and not an omission.

Patrice Terrier

I remember that Bob Zale had the project to remove the () short cut, but since his passing it is safe to use it.
Because i can't see who could change this :)
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

John Aadnoey

#42
I'm with Jose on the bycopy rather than (()) and byref over undefined. Way easier for us newbies to understand.
Anyway, I load up zTrace from a DLL in my program. And when my program ends, the zTrace DLL is still running, thereby crashing the VB6 IDE. (I Run it inside the IDE rather than compiling it).
My DLL is written in Powerbasic.
Any idea why?

Patrice Terrier

#43
I am not a VB6 user, thus i can't say.

zTrace has been designed to work from a DLL, not to be embedded in your source code.

However if the source code of zTrace doesn't match your level of expectations, feel free to edit it, to let it work the way you want, using basic string rather than ASCIIZ.

You can also write a helper function, just like what i did for the C++ version, to use wstring rather than WCHAR.
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

John Aadnoey

#44
Its not embedded in my code. I let my DLL load it.
To me it looks like zTrace is waiting for VB6 to shutdown, not the DLL. (because shutting down the VB6 IDE kills it)

"However if the source code of zTrace doesn't match your level of expectations"

Its definitely up to my expectations. have no doubt about that, I'm just trying to find out why the DLL ain't closing