#275 mount does not work with a Sun Studio-built binary

0.65
open
nobody
5
2012-09-07
2006-10-15
laurent
No

Using a Sun Studio 11 built binary on Solaris 10 x86,
dosbox starts, but the mounting of drive letters does
not work.

Specifically, the two following commands are put in
.dosboxrc:

mount c /opt/games/data/DOS_oldgames
mount d /cdrom/cdrom0 -t cdrom -usecd 0 -ioctl

In dosbox, they are run, with no error displayed,
either from the .dosboxrc file or typed directly.
But then, when typing either c: or d:, I get the message:
Drive C does not exist!
You must mount it first. etc...

The exact same commands do work when built with GCC.
Any way to debug that?

Discussion

  • c2woody
    c2woody
    2006-10-18

    Logged In: YES
    user_id=1304940

    MOUNT::Run might be a good place to start, see if the
    localDrive object is created correctly.

    Is the SunStudio compiler gcc-compatible?

     
  • laurent
    laurent
    2006-10-18

    Logged In: YES
    user_id=1447460

    Thanks for the pointer, I'll try to look at that class, I
    hope I know enough of C and Java to do some C++ debugging!
    At least I can add a few perror(), I guess.

    As for compatibility, I was surprised to discover that yes,
    it's gcc-compatible. Whatever that means, since I was not
    aware that GCC had any kind of standardization, or even
    compatibility to itself between versions :-)

    "Multi-platform support, compatible with gcc, Visual C++,
    C99, OpenMP, and Fortran 2003."
    http://developers.sun.com/sunstudio/index.jsp

     
  • c2woody
    c2woody
    2006-10-18

    Logged In: YES
    user_id=1304940

    That statement is just about their ide (assuming you don't
    use gcc with the ide), not the special sparc compiler.
    A compiler being compatible with gcc and visualc++ would
    be contradiction.
    I'm not sure how far you'd get with a non-gcc compatible
    compiler, there might be several places (OS access, libs)
    where the compiler differences matter.

     
  • laurent
    laurent
    2006-10-18

    Logged In: YES
    user_id=1447460

    Compatibility issues I know about is a binary
    incompatibility with C++ (not possible to link Studio-built
    C++ libs to GCC objects, and the other way around).
    But here, the libs are in C, so it should be ok.

    I'm tracking down the problem, but I'm a bit confused by all
    the pointers and wrappers to functions.

    Anyway, I can say for sure that, for some reason,
    PROGRAMS_Handler() is not called when built with Studio.
    Virtual_Drive::FileOpen() is.
    I'm trying to understand what is between them.

     
  • Peter Veenstra
    Peter Veenstra
    2006-10-23

    Logged In: YES
    user_id=535630

    Programs_handler is the callback code. It gives some pointer
    on where it goes wrong.
    (it elimates a lot of code afterwards).
    It basicly means that the C++ code of mount isn't run.
    Now we need to detect wether mount itself is run inside the
    emulator.

    Try checking: src/dos/dos_execute.cpp:DOS_Execute to see
    wether mount is actually being executed (this isn't running
    though).
    It's probably easiest to add logging message to there.