AsmBB

Power
Login Register

How to debug asmbb?
0

#16022 (ツ) ganuonglachanh
Created 12.03.2020, read: 3423 times

Hi johnfound

My dev setup is Fresh IDE in Linux with WINE, edb debugger installed, asmbb run via docker (should I change to rwasa for debugging?).

I tried debug the engine file but it's not possible

Can you make a tutorial to debug asmbb sourcecode? (step by step for begginer)

Thank you!

#16023 (ツ) johnfound
Created 12.03.2020, read: 3420 times
ganuonglachanh

Hi johnfound

My dev setup is Fresh IDE in Linux with WINE, edb debugger installed, asmbb run via docker (should I change to rwasa for debugging?).

I tried debug the engine file but it's not possible

Can you make a tutorial to debug asmbb sourcecode? (step by step for begginer)

Thank you!

Now, at first, debugging AsmBB in docker is pretty problematic IMHO. It is better to install local server and run directly.

I am using EDB rarely and debugging mainly by including debug prints to the console here and there. There is a library in FreshLib that allows easy switching on/off this debug print.

The option is options.DebugMode that is set at the line 24 of engine.asm file. Unfortunately the debug macros are not well documented, but look for OutputValue, DebugMsg, OutputRegister` in the source.

Anyway, I will try to write a little bit wider manual about debugging AsmBB when I have more spare time.

#16026 (ツ) ganuonglachanh
Last edited: 12.03.2020 by ganuonglachanh , read: 3416 times

Thanks johnfound

I made some progress, I can't debug engine because I forget to copy both ld-musl-i386.so and libsqlite3.so to the www dir.

Step by step:

1. run rwasa server

2. run ./engine

3. run edb and attach to engine process, pause the process

4. set a break point to function need to debug, resume the process

5. read the code (so different from Fresh IDE fasm code and compiled ASM code!! :-P )

Do we have some asm command to auto stop the debugger ? Found it:

insert 'int 3' to anywhere you want to debugger to stop rofl

#16029 (ツ) johnfound
Last edited: 12.03.2020 by johnfound, read: 3412 times
ganuonglachanh

insert 'int 3' to anywhere you want to debugger to stop rofl

Not "int 3" but "int3" - the difference is that int3 is a special one byte command especially for breakpoints. ;)

How to debug asmbb?
0

AsmBB v3.0 (check-in: a316dab8b98d07d9); SQLite v3.42.0 (check-in: 831d0fb2836b71c9);
©2016..2023 John Found; Licensed under EUPL. Powered by Assembly language Created with Fresh IDE