Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Status on DFHack/Therapist memory layouts?  (Read 2976 times)

ShimmerFairy

  • Bay Watcher
    • View Profile
Status on DFHack/Therapist memory layouts?
« 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.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Status on DFHack/Therapist memory layouts?
« Reply #2 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.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Status on DFHack/Therapist memory layouts?
« Reply #3 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.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

ShimmerFairy

  • Bay Watcher
    • View Profile
Re: Status on DFHack/Therapist memory layouts?
« Reply #4 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).
Logged