ok, back to my 'figuring out what the FUCK this C++ program is doing because EVERY piece of logic is implemented through spooky fucking action at a distance'

@alexandria

A quantum entangled C++ program?

...run it and see whether or not history changes as a result.

@ccc I mean it feels like that constantly. All of the state is initialized in object definitions. except when it's not.

all the control flow is done through signals, except... when it's not.

I can't even figure out how this fucking loop runs aaaaaaaaaaaaaaa

@alexandria

Is this a situation akin to the Story of Mel, or just poorly written code?

@alexandria

Then you have my sympathies.

...my first step when dealing with poorly written C code is to run it through some sort of autoindenter. Makes it _way_ easier to figure out what's up.

Second step generally involves cautious use of text output statements (printf or cout, either will do) to check on values of the variables mid-run.

@ccc I mean, I have a lot of the in-function logic down, it's just almost all function calls in this are mediated through signals, except I can't find a signal to do X when I need to replicate how to do X lol
Follow

@alexandria

...do you know which variables need to be changed to do X?

Then a text search for that variable name might reveal the function that does X.

And a text search for that function's name through the signal handling bit might reveal which signal triggers it.

...maybe?

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.