View previous topic :: View next topic |
Author |
Message |
justa_dude Grandmaster Cheater Reputation: 23
Joined: 29 Jun 2010 Posts: 891
|
Posted: Sun May 25, 2014 9:52 am Post subject: Debug window? |
|
|
Hi guys,
In starting to fool around w/ the CE source a little bit, I find that it would be handy to dump stuff to a log. I see OutputDebugString being used, but it isn't obvious to me how one might view the output - I can't exactly attach a debugger to CE, can I? Is there maybe some way to easily cause CE to output strings to the Lua console? Sorry if it's obvious, but I'm still trying to find my way around the code (and Lazarus, and Pascal for that matter).
Thanks,
JD
edit: n/m, LUA_DoScript('print "Hello, world!"'); works if LuaHandler is available. I would like to know how to access the debug strings, though...
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on... |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun May 25, 2014 11:18 am Post subject: |
|
|
dbgview by sysinternals can show debug string
also, when debugging with lazarus the debug messages show in view->debug windows->event log
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
justa_dude Grandmaster Cheater Reputation: 23
Joined: 29 Jun 2010 Posts: 891
|
Posted: Sun May 25, 2014 11:32 am Post subject: |
|
|
Dark Byte wrote: | dbgview by sysinternals can show debug string
also, when debugging with lazarus the debug messages show in view->debug windows->event log |
Ah, sweet. Thanks, DB. re: debugging with Lazarus - is that possible? I assumed that there was some kind of fatal paradox with debugging a debugger. When I try to set a breakpoint and hit f9, I get an error
Code: |
The GDB command:
"-exec-run"
returned the error:
",msg="Error creating process C:/Develop/CE/cheat-engine-read-only/Cheat Engine/bin/cheatengine-x86_64.exe, (error 740).""
|
Do I need to be running Lazarus as root or something?
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on... |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun May 25, 2014 12:03 pm Post subject: |
|
|
it's recommended to run lazarus as administrator yes
but yes, there is no problem with debugging CE as long as CE doesn't debug lazarus
also, if you have installed the 32-bit lazarus/fpc you most likely have the 32-bit gdb as well. the 32-bit gdb can't debug the 64-bit CE (the 64-bit gdb can't debug the 32-bit CE either for some reason)
So get the 64-bit gdb from somewhere (other lazarus install, or get the 64 bit build environment)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
justa_dude Grandmaster Cheater Reputation: 23
Joined: 29 Jun 2010 Posts: 891
|
Posted: Sun May 25, 2014 4:20 pm Post subject: |
|
|
Dark Byte wrote: | it's recommended to run lazarus as administrator yes
but yes, there is no problem with debugging CE as long as CE doesn't debug lazarus
also, if you have installed the 32-bit lazarus/fpc you most likely have the 32-bit gdb as well. the 32-bit gdb can't debug the 64-bit CE (the 64-bit gdb can't debug the 32-bit CE either for some reason)
So get the 64-bit gdb from somewhere (other lazarus install, or get the 64 bit build environment) |
hrm... after your earlier suggestion to scrap everything and install /only/ the 64-bit tools, that's what I did (the following is from an elevated command prompt).
Code: |
c:\development\fpcbootstrap>gdb -exec -run "c:\develop\ce\cheat-engine-read-only
\Cheat Engine\bin\cheatengine-x86_64.exe"
GNU gdb (GDB) 7.3.50.20110510-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from c:\develop\ce\cheat-engine-read-only\Cheat Engine\bin\cheat
engine-x86_64.exe...(no debugging symbols found)...done.
(gdb) run
Starting program: c:\develop\ce\cheat-engine-read-only\Cheat Engine\bin\cheateng
ine-x86_64.exe
[New Thread 8188.0x2214]
[New Thread 8188.0x2f98]
warning: Offset of LBR_Count=760
warning: sizeof fxstate = 512
[New Thread 8188.0x5188]
[New Thread 8188.0x3614]
[New Thread 8188.0x2fec]
[New Thread 8188.0x4e14]
warning: symbolloader thread finished
warning: Symbolhandler: sync: Calling finishedloadingsymbols
Program received signal SIGILL, Illegal instruction.
0x00000000005beaeb in ?? () |
The program compiles and runs just fine, but I don't seem to be able to debug it w/ gdb or the Lazarus IDE. Weird.
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on... |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun May 25, 2014 5:44 pm Post subject: |
|
|
you compiled the release build(the SIGILL is the dbvm detection which is only compiled in the release build), it has it's debug symbols stripped
You must build the debug build. I recommend debug-nomt
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
justa_dude Grandmaster Cheater Reputation: 23
Joined: 29 Jun 2010 Posts: 891
|
Posted: Sun May 25, 2014 7:01 pm Post subject: |
|
|
Ahhhhh, that makes sense. Thank you for explaining everything for me!
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on... |
|
Back to top |
|
|
wethecom How do I cheat? Reputation: 0
Joined: 02 Feb 2015 Posts: 6
|
Posted: Sat Apr 04, 2015 9:31 pm Post subject: |
|
|
i just wanted to say that the only issue i had running CheatEngine from lazarus was i needed to run it as admin but once i did.....WOW
ive never seen lazrus befor and it looks nice...
_________________
i have working battle pirates hack..not free..ask me about it... |
|
Back to top |
|
|
|