Posted: Sun Nov 13, 2016 11:45 pm Post subject: obtain thread id in debugger_onBreakpoint()
Hello! I found that lua engine in CE is very handy when I try to automate my debugging.
Recently I play with a muti-thread application but with a problem. I set a breakpoint on an address that several threads will run through.
debugger_onBreakpoint() get called but I cannot find a way to distinguish between threads (I want to peform some operations depending on thread id).
I found that thread id show on the top of window while I'm debugging manually( as shown in the figure 0).So I think that there should be a lua function like "getCurrentThreadId". I dig through docs and googles but nothing found.
I get stucked and please help me out if any one has any solution. btw It's my first post ever.please be kind if I'm asking a foolish question.
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
Posted: Mon Nov 14, 2016 4:09 am Post subject:
there is currently no option for that, but i'll look into adding it.
an alternate way to distinguish between threads is look at the esp/rsp value during breakpoint as every thread will start their stack at a different position _________________
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
Posted: Thu Nov 17, 2016 8:34 pm Post subject: thanks
Thanks for help. I wrote a plugin in the end. ce-plugin-system is more powerful to suit my needs.
But I still failed to find some functions from exported functions. e.g.,I want to get the stacktrace when a debugEvent occurs. Do I need to implement that function myself(using winapi stackwalk,as I know)?
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