Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Debug window?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source
View previous topic :: View next topic  
Author Message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Sun May 25, 2014 9:52 am    Post subject: Debug window? Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun May 25, 2014 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Sun May 25, 2014 11:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun May 25, 2014 12:03 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Sun May 25, 2014 4:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun May 25, 2014 5:44 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Sun May 25, 2014 7:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
wethecom
How do I cheat?
Reputation: 0

Joined: 02 Feb 2015
Posts: 6

PostPosted: Sat Apr 04, 2015 9:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites