mbbsemu:development:module_debugging
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mbbsemu:development:module_debugging [2020/11/14 21:02] – tuday | mbbsemu:development:module_debugging [2023/10/06 23:41] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Module Debugging Walkthrough ====== | ||
< | < | ||
On this Wiki Article we'll dive into the topic of debugging a MajorBBS/ | On this Wiki Article we'll dive into the topic of debugging a MajorBBS/ | ||
Line 4: | Line 5: | ||
This tutorial assumes you should have a basic understanding of x86 Assembly and C# | This tutorial assumes you should have a basic understanding of x86 Assembly and C# | ||
- | # Tools | + | ## Tools |
While the tutorial on this page is fairly basic and will only use a couple of the tools listed, to be able to fully debug and work with modules in MBBSEmu, an exhaustive list of tools is provided below: | While the tutorial on this page is fairly basic and will only use a couple of the tools listed, to be able to fully debug and work with modules in MBBSEmu, an exhaustive list of tools is provided below: | ||
Line 19: | Line 20: | ||
* `Wireshark` ([Link](https:// | * `Wireshark` ([Link](https:// | ||
- | # Exercise | + | ## Exercise |
For tutorial we're going to be taking a look at the Character Interceptor Routine registered by `GSBL-> | For tutorial we're going to be taking a look at the Character Interceptor Routine registered by `GSBL-> | ||
- | # Starting | + | ## Starting |
The majority of Debug messaging within MBBSEmu is wrapped in a `#if DEBUG` preprocessor directive. This is done to maximize the performance of MBBSEmu when compiled in `Release` configuration. In order to be able to debug MBBSEmu, you must run it in `Debug` configuration to see all available debug messages. | The majority of Debug messaging within MBBSEmu is wrapped in a `#if DEBUG` preprocessor directive. This is done to maximize the performance of MBBSEmu when compiled in `Release` configuration. In order to be able to debug MBBSEmu, you must run it in `Debug` configuration to see all available debug messages. | ||
Line 49: | Line 50: | ||
The routine being registered to `GSBL.btuchi()` is `0002: | The routine being registered to `GSBL.btuchi()` is `0002: | ||
- | # Capturing Debug | + | ## Capturing Debug |
We'll want to setup debugging within the x86 Emulator to output not only the decoded x86 Assembly but also the Register values. | We'll want to setup debugging within the x86 Emulator to output not only the decoded x86 Assembly but also the Register values. | ||
Line 67: | Line 68: | ||
{{: | {{: | ||
< | < | ||
- | # Analyzing Debug | + | ## Analyzing Debug |
After starting the module and entering it, after the first screen where the `btuchi()` function is registered, we'll hit `ENTER` and our breakpoint in `CpuCore.Tick()` will be hit. | After starting the module and entering it, after the first screen where the `btuchi()` function is registered, we'll hit `ENTER` and our breakpoint in `CpuCore.Tick()` will be hit. | ||
Line 240: | Line 241: | ||
``` | ``` | ||
- | # Result | + | ## Result |
The result from the registered `btuchi()` function in LORD is: | The result from the registered `btuchi()` function in LORD is: |
mbbsemu/development/module_debugging.1605387768.txt · Last modified: 2023/10/06 23:40 (external edit)