a really daft question, -but well, I am allowed at least one a week! Although I reckon on that score I've exhausted my quota for the next 10 years or so!
Am I correct in saying that, for example, with the statement
Hm, you may be disappointed. I wrote a one-liner: Debug WindowFromPoint_(100,100), compiled it to an exe and pulled the exe up in FileViewer. 'WindowFromPoint' does show up in the exe, which it wouldn't if it were dumped.
Well, it's nothing about wishing to mask any embarrassing debug comments as such.
I am working on a hugely complex and speed-critical routine which can fail for a number of reasons which are outside of the control of the library (closed source dll) of which the routine is a part. To help the user in these circumstances I wish to create a log file, except that such a file will slow down the routine in question and that is something I wish to avoid at all costs. My options are a separate 'debug build' of the library which can be achieved through conditional compilation without impacting my work and which can provide the user with a log-file, or, alternatively, a simple bunch of 'Debug's which leave the onus of investigating any problems with myself (rather than the user of the library) but remove the need for a separate debug build providing the Debug statements do not impact the final dll.
Now common sense suggests that I go for the debug build method, but my naturally inquisitive mind has subsequently wondered about the Debug statements!
I am sure it is a question with an obvious answer, but I have simply not thought about this at all - until now.
I may look like a mule, but I'm not a complete ass.
netmaestro wrote:Hm, you may be disappointed. I wrote a one-liner: Debug WindowFromPoint_(100,100), compiled it to an exe and pulled the exe up in FileViewer. 'WindowFromPoint' does show up in the exe, which it wouldn't if it were dumped.
Ah, yes, a good idea indeed!
However, has the debug info simply been tagged into a debug section of the exe which is nevertheless never executed? It is obviously inflating the size of the exe and I wonder if the resulting code section(s) have the ubiquitous NOPs inserted ready for the debugger? Must admit that I have very little knoweldge of debugging!
I may look like a mule, but I'm not a complete ass.
@netmaestro: Yes, that is weird. Fred has always said that Debug commands
are not included, and even the manual says that. Oh well, I guess they're in
there for a reason.
Here is a workaround for now that truly doesn't include them:
Actually, this should be classed as a bug because the manual specifically says
that the commands after the Debug are NOT compiled, but evidently they are.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Will the import be stripped, then? I guess Fred has to answer that? Otherwise
I'll have to switch to using my macro in future as I wasn't aware of the imports
adding unused data to my final exes.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.