flat assembler
Message board for the users of flat assembler.
Index
> Main > debugging techniques? |
Author |
|
revolution 02 Jul 2023, 14:22
int3 works fine for me.
|
|||
02 Jul 2023, 14:22 |
|
Furs 02 Jul 2023, 14:29
If you just want to "identify" the code section you can add some dummy "markers" you can search for in debugger, like:
Code: jmp @f rdtsc ; this is your "marker" @@: Code: @@:
jmp @b |
|||
02 Jul 2023, 14:29 |
|
int0x50 03 Jul 2023, 02:57
in case if we want to find out the values of all the registers (eax, ebx, ecx, edx, esi, edi) ... what kind of tricks you use to find out the values to debug?
i use " invoke, printf "%x", eax is there a better way? |
|||
03 Jul 2023, 02:57 |
|
macgub 03 Jul 2023, 06:24
It depends what you want to achive..
Think about: Code: pushad vmovups ymm0,[esp] add esp,32 If your debugger supports it you could view general registers in ymm0 in format you want.. 64/32 bit floats, dword /word integers.. Of course I assume in this case - you hold integers in general registers... |
|||
03 Jul 2023, 06:24 |
|
AsmGuru62 03 Jul 2023, 13:14
I think the debugger is a better way to find out the register values.
Just use INT3 opcode at some point and the debugger will 'break' there and show you the values. |
|||
03 Jul 2023, 13:14 |
|
bitRAKE 03 Jul 2023, 16:28
int0x50 wrote: in case if we want to find out the values of all the registers (eax, ebx, ecx, edx, esi, edi) ... what kind of tricks you use to find out the values to debug? My personal strategy is to jump into a good debugger. I like looking at instructions - something similar to the code I'm writing. Modern debuggers offer so many features to accelerate navigation, restart a line of discovery, document research, and automate strategies. The best approach often depends on the complexity of the code, the tools available, and the nature of the bug. Some issues might be more easily solved by looking at log files, while others require the detailed inspection capabilities of a debugger. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
03 Jul 2023, 16:28 |
|
bitRAKE 13 Aug 2023, 17:18
In fasmg we have some super simple debug techniques:
Code: macro ○ line& OutputDebugStringA <_A `line> line end macro Code: ○ GlobalUnlock rbx ○ SetClipboardData CF_TEXT, rbx ; clipboard owner now owns global memory ○ CloseClipboard Of course, it's possible to prepend __FILE__, __LINE__ to the debug message of this macro. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
13 Aug 2023, 17:18 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.