WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: live2play on April 28, 2010, 04:15:44 AM

Title: Log Steps - Log Location
Post by: live2play on April 28, 2010, 04:15:44 AM
When you select Log Steps in the Breakpoint dialog of WiiRD, to where is the log written?
Title: Re: Log Steps - Log Location
Post by: wiiztec on April 28, 2010, 05:15:30 AM
In a text file called steplog.txt in the folder that you have WiiRd in
Title: Re: Log Steps - Log Location
Post by: live2play on April 28, 2010, 05:17:31 AM
I looked.  There's no such file there.  Any other ideas?

Does the log get deleted whenever you exit WiiRD or do you specifically have to select Clear log to clear it?

Actually, I think I'm misunderstanding the use of the log.  It probably only contains the instructions that are processed when I'm selecting Step, right?  I have a breakpoint in the main program loop that triggers immediately.  I set a condition for a register so that it only triggers at the point in which I'm insterested.  However, I want to look at the instructions skipped so that I can see what it is doing prior to my condition being met.  I thought that the log would contain that information.  Is there any way to get what I'm speaking of?
Title: Re: Log Steps - Log Location
Post by: wiiztec on April 28, 2010, 05:36:47 AM
No but if your breakpoint is triggered and  then you set a breakpoint condition and press step WiiRd will automaticly step through the ASM untill the condition is met and the step log will log that
Title: Re: Log Steps - Log Location
Post by: live2play on April 28, 2010, 05:54:30 AM
Ok, so you're saying don't enable my additional condition (e.g. r11=########) until after the BP immediately hits when I select Set Breakpoint and then use Step until the breakpoint hits again?
Title: Re: Log Steps - Log Location
Post by: wiiztec on April 28, 2010, 06:06:37 AM
You could but it's not really the same thing as It won't necessarily break on the address of your original breakpoint and if it was an excute breakpoint then it definitely won't
Title: Re: Log Steps - Log Location
Post by: live2play on April 28, 2010, 05:05:19 PM
If you can explain your comment below in more detail, I would appreciate it.  How would I accompplish this?  Given that my breakpoint doesn't trigger unless I have additional conditions (e.g. r11=########), there isn't a way for me to waituntil it's triggered and then set another condition.

Quote from: wiiztec on April 28, 2010, 05:36:47 AM
No but if your breakpoint is triggered and  then you set a breakpoint condition and press step WiiRd will automaticly step through the ASM untill the condition is met and the step log will log that
Title: Re: Log Steps - Log Location
Post by: wiiztec on April 28, 2010, 06:17:55 PM
The best way to understand it is to try it, and I'm pretty sure what you want it to do is not possible, If you want to know what ASM routine lead to your breakpoint being triggered you'll have to follow it back manually using dcx2's guide http://gshi.org/faqs/Wii_FCAAWTS.html once you find the begining of the routine you can set a breakpoint on it and then set a breakpoint condition SRRO = (the address your original breakpoint broke on) and press step and it will step through untill it gets to your original breakpoint
Title: Re: Log Steps - Log Location
Post by: dcx2 on April 28, 2010, 08:09:50 PM
When I get my laptop running again, and I re-install Visual Studio C# Express, I'll go back to developing Gecko.NET.  I do plan on adding logging capabilities, much like the ones live2play requests...eventually.

Unfortunately, the laptop is giving me a humongous headache because it's an old Windows XP Media Center Edition laptop, with a Host Protected Area that fubar'd my attempt to clone with Acronis.  And I'm getting ready to move to a new apartment, which will further reduce my free time.
Title: Re: Log Steps - Log Location
Post by: live2play on April 28, 2010, 08:56:42 PM
wiiztec and dcx2, thanks for the help.  As always, greatly appreciated!
Title: Re: Log Steps - Log Location
Post by: live2play on April 30, 2010, 11:19:54 PM
The comment about SRRO is interesting.  What exactly does that register hold?

Quote from: wiiztec on April 28, 2010, 06:17:55 PM
If you want to know what ASM routine lead to your breakpoint being triggered you'll have to follow it back manually ...once you find the begining of the routine you can set a breakpoint on it and then set a breakpoint condition SRRO = (the address your original breakpoint broke on) and press step and it will step through untill it gets to your original breakpoint
Title: Re: Log Steps - Log Location
Post by: dcx2 on April 30, 2010, 11:22:52 PM
SRR0 is like the Instruction Pointer or Program Counter.  It holds the address of the current instruction.
Title: Re: Log Steps - Log Location
Post by: live2play on April 30, 2010, 11:33:42 PM
Do you only use it in the way wiiztec suggested or are there other ways you use it as well?
Title: Re: Log Steps - Log Location
Post by: dcx2 on April 30, 2010, 11:39:07 PM
It can be used to prevent breaking on a certain instruction, by using one or more SRR0 != tests.  It can also be used to force breaking on a particular instruction with a single SRR0 == test.
Title: Re: Log Steps - Log Location
Post by: live2play on April 30, 2010, 11:54:34 PM
Actually, this brings up a good point.  I haven't yet, but I will start using Gecko.NET.  Does it have an option to allow multiple breakpoint criteria?  For instance, let's say you want a breakpoint at address A but only if X and Y are true.
Title: Re: Log Steps - Log Location
Post by: dcx2 on May 01, 2010, 12:08:21 AM
Both WiiRDGUI and Gecko.NET support multiple breakpoint conditions, but they are logically ANDed together.  Every condition must be true in order to satisfy the condition.

--

I would like to add Condition Groups to Gecko.NET, when I find some free time.  All of the Conditions in a particular Condition Group would need to be satisfied, and only one Condition Group would need satisfied.

For instance, let's say you have a write breakpoint.  It stops at instruction XX, and it's stw R0 somewhere, and you want to stop when it's writing YY somewhere.  Alas, instruction ZZ also traps the write breakpoint, but that instruction is stw R3 instead of R0.  You can't currently set a condition for this.

With Condition Groups, you would make one group like so

SRR0 == XX AND R0 == YY

The other group would be like this

SRR0 == ZZ AND R3 == YY