dosbox breaks with MIPSpro, works with gcc
#3
RE: dosbox breaks with MIPSpro, works with gcc
(03-15-2019, 02:10 AM)gijoe77 Wrote:  I've been digging a bit more into this, I'm putting "printf's" into places to see what's going on, and here is what I seem to think is going on.

It seems there is logic that checks if there are any strings/characters after the mount command, if not - just print what's currently mounted, otherwise do other stuff.  It seems no matter what I type after issuing the "mount" command, dosbox never see's any string of characters after the mount command.

That makes me wonder if there's a bug in the MIPSPro optimizer that's over-optimizing a function call right out of existence, thus returning a constant 0 instead of the actual number of arguments.  It looks like you've been compiling with -O2.  Have you tried lowering your optimization settings?

(03-15-2019, 02:10 AM)gijoe77 Wrote:  I've been trying to figure out how to troubleshoot/debug 

Code:
cmd->GetCount()

and

Code:
 cmd->FindString()

that are also in the dos_programs.cpp file but I'm having a hard time, if anyone has any ideas let me know!

While those functions are called from dos_programs.cpp, they're actually implemented in src/misc/setup.cpp, so you might try adding some printfs there for debugging.  It would be particularly interesting to see the value of cmds.size() in the GetCount function of setup.cpp.

SGI:  Indigo, Indigo2, Octane, Origin 300
Sun:  SPARCstation 20 (x4), Ultra 2, Blade 2500, T5240
HP:  9000/380, 425e, C8000
Digital: DECstation 5000/125, PWS 600au
jpstewart
Developer

Trade Count: (1)
Posts: 444
Threads: 6
Joined: May 2018
Location: SW Ontario, CA
Find Reply
03-16-2019, 07:15 PM


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)