Previous instruction trace/disassembly?

Started by cuby, April 26, 2020, 03:58:05 PM

Previous topic - Next topic

cuby

Hi,

I'm trying to (net)boot Plan9 under Previous (and also to recompile the Plan9 sources, this is already looking quite good for a cross-compile of the kernel on OS X, just the linker complains about something). Netbooting using the built-in slirp bootp support works well.

The first thing that had to be patched in Previous to avoid a Plan9 kernel panic was the address for SCR2, Plan9 accesses this at 0x0200d700 instead of 0x0200d000 (probably a mirrored address region). After that, the Plan9 kernel now hangs after accessing the floppy controller.

Here, it would be useful to have a CPU instruction trace/disassembly. There seems to be a "--trace" command-line option in Hatari, but I can't get this to work. Any hints are welcome...

I'm currently working with the sources from branch_mmu on sf, I suppose this isn't the current one?

-- Michael
 

gilles

I didn't touch the emulator for years but yes there is a full debugger in console mode. Maybe it's a compile option. What is your run platform ?

cuby

Quote from: gilles on April 27, 2020, 04:32:41 AMI didn't touch the emulator for years but yes there is a full debugger in console mode.

Thanks - I managed to get it to work by abusing the Command-Backspace (NMI) keyboard shortcut and calling Debug() from there... now I know the Plan9 kernel is hanging in a loop. So I have to create a disassembly of the Plan9 kernel (which is linked at a 68k Mach-O file, getting symbols is a bit difficult since I'm cross-compiling using Plan9 tools) to figure out where exactly... unfortunately, otool on OS X doesn't support 68k binaries any longer.

Quote from: undefinedMaybe it's a compile option. What is your run platform ?

OS X 10.14 - it seems that the Objective C GUI startup code that then executes SDL_main ignores all command line options.

gilles

I will try when I can but I'm not sure to have something that can run macosX 10.14 . Debugger from hatari could be used under linux. Also I'm nearly sure that I could start a maxosX binary with flags on another project sharing some elements with Previous (SDL + hatari gui) but maybe it was prior to the SDL2 migration.

gilles

ok it seems init was removed by someone (maybe for a macos issue)

in main.c

#if 0 /* FIXME: This sometimes causes exits when starting from application bundles */
   /* Check for any passed parameters */
   if (!Opt_ParseParameters(argc, (const char * const *)argv))
   {
      return 1;
   }
#endif

I suppose it's safe to re-enable for a local compile.