Debugger not working

A forum about the Hatari ST/STE emulator - the current version is v1.7

Moderators: simonsunnyboy, thothy, Moderator Team

Debugger not working

Postby Orion_ » Fri Apr 27, 2012 11:54 am

Hello,
I'm using hatari 1.6.1 for falcon emulation and it works great ! (saving time to transfer prg to a real falcon for testing)
But it would be really nice if I could debug my program on hatari (like on steem)
I tried to use the -D flag to start the debugger, but whenever I try to invoke the debugger using altgr-pause or when an exception is caught,
whatever command I type in the debugger result in nothing, nothing get printed on screen, no response, nothing..
The only working command is "quit".
I am missing something ? (My machine is Windows 7 on 64bits processor)

Thank you
`^-._ website - twitter - vimeo - Atari STe 4MB + HxC SD Floppy :: Falcon CT63 @90Mhz 14/128MB + CF2IDE + PS/2 adapter + Hydra Ethernet !
User avatar
Orion_
Captain Atari
Captain Atari
 
Posts: 185
Joined: Sat Jan 10, 2004 12:20 pm
Location: Perpignan

Re: Debugger not working

Postby LaurentS » Fri Apr 27, 2012 9:16 pm

Hi Orion,

I use it everyday or so, without problems.

-D doesn't have anything to do with the debugger.
You just have to press altGr+pause to invoke it.

Do you use the standard windows package or one you compile by yourself ?

if you just press 'd' or 'dd' command for example, does it display anything ?

Laurent
User avatar
LaurentS
Captain Atari
Captain Atari
 
Posts: 174
Joined: Mon Jan 05, 2009 5:41 pm

Re: Debugger not working

Postby Orion_ » Sat Apr 28, 2012 10:44 am

You need to use the -D option to open the console at startup, else the "altgr+pause" have no effect.
when I use 'd' command it shows nothing, when I use "dd" command it shows "DSP disasm 0x51-0x59:" and that's it

I use the standard windows package from the official website
`^-._ website - twitter - vimeo - Atari STe 4MB + HxC SD Floppy :: Falcon CT63 @90Mhz 14/128MB + CF2IDE + PS/2 adapter + Hydra Ethernet !
User avatar
Orion_
Captain Atari
Captain Atari
 
Posts: 185
Joined: Sat Jan 10, 2004 12:20 pm
Location: Perpignan

Re: Debugger not working

Postby Orion_ » Sun May 20, 2012 10:24 am

no one having the same problem ?
`^-._ website - twitter - vimeo - Atari STe 4MB + HxC SD Floppy :: Falcon CT63 @90Mhz 14/128MB + CF2IDE + PS/2 adapter + Hydra Ethernet !
User avatar
Orion_
Captain Atari
Captain Atari
 
Posts: 185
Joined: Sat Jan 10, 2004 12:20 pm
Location: Perpignan

Re: Debugger not working

Postby Cyprian » Sun May 20, 2012 11:02 am

LaurentS same for me, AltGr + Pause doesn't work under Win7 (and as far as I remember under XP). The debugger console is opened If I use switch -D.

Orion_I can't help you much. I never used Hatari's debugger, because of its text mode. As pure GUI user (my first computer was ST and I perceived text mode/console as archaic) I prefer STeem debugger.
But for ST/Falcon/TT cycle emulation I prefer Hatari
TT030 / Falcon030 / Mega STe / 1040 STe / 520 STm / 65 XE / 800XL
CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem
http://260ste.appspot.com/
User avatar
Cyprian
Atari Super Hero
Atari Super Hero
 
Posts: 736
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Debugger not working

Postby Klapauzius » Sun May 20, 2012 11:48 am

Sorry, cant't help you much here, other than saying that AltGr-Pause works fine for me with Hatari 1.50 and 1.60 on Win XP.
All commands in the debugger window are functional.
I'm just using the -D switch on the command line.
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.
User avatar
Klapauzius
The Klaz
The Klaz
 
Posts: 4298
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria

Re: Debugger not working

Postby LaurentS » Sun May 20, 2012 1:17 pm

Hi,

As I'm working mainly under linux, I don't know what your problem is.
Did you try to launch hatari with the comand DOS ? (not by clicking on the icon) ?

Just a stupid though like this

Regards

Laurent
User avatar
LaurentS
Captain Atari
Captain Atari
 
Posts: 174
Joined: Mon Jan 05, 2009 5:41 pm

Re: Debugger not working

Postby Orion_ » Tue May 22, 2012 9:57 am

Cyprian > I love steem debugger too, but Steem doesn't emulate the Falcon :/

I don't have any problem opening the console debugger. (and running from command line won't change anything because it opens a new window for the debugger)

My problem is that, no command entered in the console debugger works.
That makes the debugger useless for windows user :/
`^-._ website - twitter - vimeo - Atari STe 4MB + HxC SD Floppy :: Falcon CT63 @90Mhz 14/128MB + CF2IDE + PS/2 adapter + Hydra Ethernet !
User avatar
Orion_
Captain Atari
Captain Atari
 
Posts: 185
Joined: Sat Jan 10, 2004 12:20 pm
Location: Perpignan

Re: Debugger not working

Postby Eero Tamminen » Fri Jul 20, 2012 5:07 pm

Following source files in Hatari seem to have some Windows specific code:

Code: Select all
hatari$ find src | xargs grep -l WIN32
src/CMakeLists.txt
src/file.c
src/gemdos.c
src/ide.c
src/includes/main.h
src/includes/unzip.h
src/main.c
src/paths.c
src/scandir.c


(+ some files in the WinUAE variant of the Hatari CPU cores.)

Besides Windows linking differences, CMakeLists.txt does just following:

Code: Select all
# When building for Windows, define specific sources for gui and resources
# and set the subsystem of the resulting .exe to "windows GUI" instead of "console"
if(WIN32)
        set(GUIWIN_SOURCES gui-win/opencon.c)
        set(GUIWIN_RES gui-win/hatari-winicon.rc)
        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mwindows")
endif(WIN32)


The added gui-win/opencon.c object has just this:
Code: Select all
void Win_OpenCon(void)
{
        if (!bExceptionDebugging)
                return;

        AllocConsole();
        freopen("CON", "w", stdout);
        freopen("CON", "r", stdin);
        freopen("CON", "wr", stderr);
}


Which seems to be called from the Hatari main():

Code: Select all
#ifdef WIN32
        Win_OpenCon();
#endif


The check for bExceptionDebugging explains why debugger on Windows wrongly needs the -D option. That has the side-effect of enabling debugger also on address, bus and unknown exception handler exceptions which is really annoying as TOS startup triggers also couple of these...

Somebody who uses Windows (none of Hatari developers do[1]) would need to submit a tested[1] patch to fix this so that debugger window is invoked/created e.g. on first debugger invocation by the user.

[1] e.g. I don't know whether the above functionality can on Windows be called after program has been initialized i.e. can the function be called in Debugger invocation shortcut instead, and replace the variable check with a check of some static local variable.
User avatar
Eero Tamminen
Atari Super Hero
Atari Super Hero
 
Posts: 790
Joined: Sun Jul 31, 2011 1:11 pm

Re: Debugger not working

Postby yoyo83 » Sun Mar 31, 2013 7:20 am

Hi all
i have the same problem.
Hatari debugger not working Under Windows 7...but working under Windows xp.

my test :
i have hatari 1.62 Under Windows 7 x64 -> not working.

i used wmware 9.x to create a Windows XP vm running on the same physical machine running win 7 x64.

in the virtual machine (win xp) running Under physical win7 : hatari debugger works
in the physical machine win7 x64 : hatari debugger doesn't work.
yoyo83
Atarian
Atarian
 
Posts: 1
Joined: Sun Mar 31, 2013 7:12 am

Re: Debugger not working

Postby LaurentS » Mon Apr 01, 2013 5:05 pm

Hi,

I think this problem is fixed in the current development version.
Regards

Laurent
User avatar
LaurentS
Captain Atari
Captain Atari
 
Posts: 174
Joined: Mon Jan 05, 2009 5:41 pm


Return to Hatari

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests