Bay 12 Games Forum

Dwarf Fortress => DF Modding => Utilities and 3rd Party Applications => Topic started by: ShimmerFairy on July 12, 2016, 07:14:49 pm

Title: Status on DFHack/Therapist memory layouts?
Post by: ShimmerFairy on July 12, 2016, 07:14:49 pm
I've tried finding any information on how it's going in figuring out memory locations for DFHack and Dwarf Therapist, but it's impossible to find any. It'd be nice if there was some kind of status or progress report somewhere, so I can know what to expect.

I'd even be willing to help out. I'm on 64-bit Gentoo Linux, so I'd be most helpful dissecting the 64-bit Linux version. Unfortunately I couldn't find any good DF-specific resources on how to go about that either. I'll look into how to generally poke at a process's memory though.

So basically, I'd like to know what the status is on those memory layouts, and if/how I can help out.
Title: Re: Status on DFHack/Therapist memory layouts?
Post by: mifki on July 12, 2016, 09:07:10 pm
You'd better join #dfhack on freenode to follow current development.
Title: Re: Status on DFHack/Therapist memory layouts?
Post by: Max™ on July 12, 2016, 10:59:12 pm
The tool I found most handy looking on Linux (Arch here, I bow to your superior wizardry) was Evan's DeBugger or EDB for short. I was able to use it to pull up dwarf fortress, set breakpoints, watch memory values, and so forth, but it didn't like the hacked together version of KDE/Plasma Next that I've been trying to migrate over to Wayland very much.
Title: Re: Status on DFHack/Therapist memory layouts?
Post by: Bumber on July 12, 2016, 10:59:41 pm
There's a guide for finding memory layouts here: https://dfhack.readthedocs.io/en/latest/library/xml/how-to-update.html

I'm not sure it still applies for 64-bit.
Title: Re: Status on DFHack/Therapist memory layouts?
Post by: ShimmerFairy on July 13, 2016, 12:22:01 am
There's a guide for finding memory layouts here: https://dfhack.readthedocs.io/en/latest/library/xml/how-to-update.html

I'm not sure it still applies for 64-bit.
That's the one thing I found, but it doesn't seem applicable that much to a whole new number of bits/compiler/etc., nor does it seem that... good, really.

It's probably just me not having a grip on the memory-layouts repository yet, but when I looked at it, it seemed a bit too disorganized/cluttered for my liking (the fact that there are a number of disjoint scripts written in different languages for no discernible reason except perhaps historical happens to bug me quite a bit).

I'll be sure to check out #dfhack, and in the meantime mess around with the /proc filesystem and stuff in a little C++ program of my own, if for no other reason than I haven't done linux-specific code before  :) . And if making my own utility isn't good enough, I'd probably end up trying to use gdb in some way (I came across mentions of it while learning about linux memory today, so it might do the job).