flat assembler
Message board for the users of flat assembler.

Index > Windows > How write simple debugger thread ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1148
Roman
I want write simple debugger for one thread.

My idea run and stop thread for execute one asm instruction.
And get registers status.

Whear is looking examples do this ?
Post 01 Jan 2021, 20:04
View user's profile Send private message Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 526
Ali.Z
if its only 1 asm instruction, then you can use SEH x86; just place an int3 after your instruction.

unless you want to write a fully featured debugger, then you may want to check msdn/docs for windows debugging mechanism.

_________________
Asm For Wise Humans
Post 01 Jan 2021, 20:43
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1148
Roman
No.
I dont want write big debugger.

I want writed my small debugger.
For debugging string search\replace small asm code.

Idea print string and show different colors whear is text position now and new changed text copy.

I press key (for example F8 ) and my debugger run one asm command.
And show whear is text position now and new changed text copy.

Because not easy modifi code (after few months) and remember how work logic this asm code in 40 asm lines.
Post 02 Jan 2021, 06:46
View user's profile Send private message Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 526
Ali.Z
in this case you need a disassembler, a debugger is just a tiny program that can pause/continue execution of debugee's threads.

replacing and/or stepping assembly instructions cant be done by the debugger itself, you need a disassembler.

disassembler is the one that tells the debugger how many bytes is the next instruction to execute and pause the thread.

so you better off using debuggers like olly because it comes with a disassembler.

_________________
Asm For Wise Humans
Post 02 Jan 2021, 07:48
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.