It is currently 19 Apr 2024, 21:26
   
Text Size

Debugging the DLL with gdb

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

Debugging the DLL with gdb

Postby FastEddie » 25 Jul 2020, 17:42

Attached is a paper describing how to debug ManalinkEh.dll with gdb, the GNU debugger. Debugging works solely through the command line. I will post a separate paper on graohical user interfaces (there aren't so many under Windows for these tools...).

Summary and quick start
This document explains how to use gdb (as part of MinGW64) to debug the ManalinkEh.dll using the built-in command line. Graphical user interfaces will be discussed in a separate paper.

If you have MinGW64 installed copy the ManalinkEh.dbg file in the folder containing Magic.exe, open a command prompt (cmd), run gdb and enter the following commands (assuming Magic.exe resides in F:\Program files (x86)\Manalink\Manalink_Unstable).

    cd f:
    cd Program files (x86)
    cd Manalink /Manalink_Unstable
    file ManalinkEh.dll
    symbol-file ManalinkEh.dbg
    exec-file Magic.exe
    break card_arcbound_ravager
    run
Now Magic.exe runs and you can interact as usual. If an Arcbound Ravager is on the battlefield or someone's hand the debugger stops. You can list the code with the list command, step through the code with step or next, print variables like player or event with print player or print event, continue execution with continue and finally quit Magic.exe with kill and gdb with quit.

Edit: removed a typo in the pdf pointing to the wrong exec-file and added Open topics.
Attachments
Debugging with gdb.pdf
(191.59 KiB) Downloaded 226 times
---
Argivian Archaeologist in the Library of Leng studying the Spells of the Ancients
User avatar
FastEddie
 
Posts: 246
Joined: 24 Dec 2019, 10:59
Has thanked: 15 times
Been thanked: 19 times

Return to Development

Who is online

Users browsing this forum: No registered users and 30 guests


Who is online

In total there are 30 users online :: 0 registered, 0 hidden and 30 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 30 guests

Login Form