SYSREC a tool to record system calls of an application

All about the serious stuff.

Moderators: Mug UK, Zorro 2, Moderator Team

Moulinaie
Captain Atari
Captain Atari
Posts: 241
Joined: Wed Feb 01, 2012 9:34 pm

SYSREC a tool to record system calls of an application

Postby Moulinaie » Sat Dec 29, 2018 3:19 pm

Hi,

I have upgraded SYREC and wrote a page about it so you can discover its features.
This little tool (less than 9KB) allows you to spy and record every system call of an application and get a text file with all informations.

sroffset.gif


You can visit my page and download it (documentation in french and english)

http://gtello.pagesperso-orange.fr/sysrec.htm

Guillaume.
You do not have the required permissions to view the files attached to this post.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2422
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: SYSREC a tool to record system calls of an application

Postby lp » Sat Dec 29, 2018 3:37 pm

Sounds interesting. Something like sysmon. I'm curious if your SYSREC work under MiNT?

FYI, there is a typo on the page "the function umber is displayed both in decimal and hexadecimal"
Missing "n" on "number" ;)

Moulinaie
Captain Atari
Captain Atari
Posts: 241
Joined: Wed Feb 01, 2012 9:34 pm

Re: SYSREC a tool to record system calls of an application

Postby Moulinaie » Sat Dec 29, 2018 4:00 pm

lp wrote:Sounds interesting. Something like sysmon. I'm curious if your SYSREC work under MiNT?

FYI, there is a typo on the page "the function umber is displayed both in decimal and hexadecimal"
Missing "n" on "number" ;)


Typo fixed, thanks !

I don't know if it works under Mint... !!!!

I will try... That could be interesting, for sure.

Guillaume.

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1649
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: SYSREC a tool to record system calls of an application

Postby Cyprian » Sat Dec 29, 2018 11:49 pm

quite nice appliocation
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

czietz
Hardware Guru
Hardware Guru
Posts: 939
Joined: Tue May 24, 2016 6:47 pm

Re: SYSREC a tool to record system calls of an application

Postby czietz » Sun Dec 30, 2018 10:08 am

Thank you. This will for sure be helpful to me when I have to trace OS calls on real hardware.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2422
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: SYSREC a tool to record system calls of an application

Postby lp » Sun Dec 30, 2018 3:27 pm

SysMon is favorite tool since it dumps all the parameters going in and the call results. You can see exactly what is going on. However, it doesn't cope with MiNT at all which limits it's use. I tried to track down the author without success.

User avatar
Ektus
Captain Atari
Captain Atari
Posts: 245
Joined: Mon May 24, 2010 2:58 am
Location: Germany
Contact:

Re: SYSREC a tool to record system calls of an application

Postby Ektus » Sun Dec 30, 2018 3:35 pm

Isn't manitor also suited for this task, and also for multitasking? http://www.atariuptodate.de/en/1939/manitor
Schneider CPC464 (long retired), Atari Mega ST4 (retired), Falcon+CT2A, Falcon+CT63+CTPCI+Radeon 9250, Milan040+SCSI+Rage

arf
Captain Atari
Captain Atari
Posts: 201
Joined: Thu May 17, 2012 9:56 pm
Location: Germany

Re: SYSREC a tool to record system calls of an application

Postby arf » Sun Dec 30, 2018 6:03 pm

Moulinaie wrote:I have upgraded SYREC and wrote a page about it so you can discover its features.
This little tool (less than 9KB) allows you to spy and record every system call of an application and get a text file with all informations.


Looks like cool stuff! Any chance that the parameters handed over to the functions are recorded, too?

Moulinaie
Captain Atari
Captain Atari
Posts: 241
Joined: Wed Feb 01, 2012 9:34 pm

Re: SYSREC a tool to record system calls of an application

Postby Moulinaie » Sun Dec 30, 2018 6:08 pm

lp wrote:Sounds interesting. Something like sysmon. I'm curious if your SYSREC work under MiNT?



I tried under Mint, SYSREC runs the program but it freezes at some point.

I tried under Magic : ok, it runs!

Guillaume.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1937
Joined: Sun Jul 31, 2011 1:11 pm

Re: SYSREC a tool to record system calls of an application

Postby Eero Tamminen » Sun Dec 30, 2018 9:04 pm

In what setup Sysrec should work?

For me it crashes to address error when selecting the "Sauver" option in the dialog after it has run the test program. It happens when it tries to write SYSREC.TXT file.

Hatari (--trace gemdos,xbios) output with latest EmuTOS v0.9.10 512k version, on monochrome 4MB ST:

Code: Select all

GEMDOS 0x4B Pexec(0, "A:\SYSREC.PRG", [0]"", 0x13508) at PC 0xE4EC06
GEMDOS 0x4A Mshrink(0x15FE8, 0x3E6E) at PC 0x1610E
GEMDOS 0x3D Fopen("SYSREC.INF", read-only) at PC=0x16518
GEMDOS 0x3F Fread(6, 2048, 0x184d6) at PC 0x16532
GEMDOS 0x3E Fclose(6) at PC 0x16540
GEMDOS 0x9 Cconws(0x16AE0) at PC 0x16200

         *****   SysRec  *****
         System calls recorder
 (c)2011-2018 guillaume.tello@orange.fr
GEMDOS 0x48 Malloc(0x2800) at PC 0x16124
GEMDOS 0x4B Pexec(3, "TSTSCR_F.PRG", [0]"", 0x16cdb) at PC 0x16152
XBIOS 0x26 Supexec(0x163C8) at PC 0x1617E
GEMDOS 0x4B Pexec(6, 0x16cdb, 0x1c65c, 0x16cdb) at PC 0x161AA
GEMDOS 0x4A Mshrink(0x1C65C, 0x1422) at PC 0x1C77E
XBIOS 0x04 Getrez() at PC 0x1C7A4
GEMDOS 0x48 Malloc(0x134) at PC 0xE3A038
GEMDOS 0x3C Fcreate("1_bit.txt", 0x0) at PC 0x1CD9A
GEMDOS 0x40 Fwrite(6, 93, 0x1d358) at PC 0x1CDB2
GEMDOS 0x3E Fclose(6) at PC 0x1CDBE
GEMDOS 0x49 Mfree(0x1DA80) at PC 0xE3A038
GEMDOS 0x00 Pterm0() at PC 0x1C8F4
XBIOS 0x26 Supexec(0x164A0) at PC 0x161BE
GEMDOS 0x3C Fcreate("SYSREC.LOG", 0x0) at PC 0x166AE
GEMDOS 0x40 Fwrite(6, 90, 0x19e58) at PC 0x166D4
GEMDOS 0x3E Fclose(6) at PC 0x166E0
GEMDOS 0x3C Fcreate("SYSREC.TXT", 0x0) at PC 0x166F2
WARN : Address Error reading at address $1728d, PC=$16744 addr_e3=16744 op_e3=2159

Panic: Address Error
misc=2151 opcode=2159
addr=0001728d sr=0300 pc=00016744

D0-3: 00000010 00000098 00000022 00000004
D4-7: 00000016 00000000 00037f4c 00000006
A0-3: 00016d68 0001728d 00000000 00019e5a
A4-7: 00019eb2 00016ad2 00016ad5 00006ebe
 USP: 00019e52

basepage=00015fe8
text=000160e8 data=00016ad2 bss=000182fa
Crash at text+0000065c

*** Press any key to continue ***
GEMDOS 0x4C Pterm(-1) at PC 0xE0CC52


Same happens with TOS v1.04 and when using disk image, so it's not EmuTOS or Hatari GEMDOS HD emulation issue.

Moulinaie
Captain Atari
Captain Atari
Posts: 241
Joined: Wed Feb 01, 2012 9:34 pm

Re: SYSREC a tool to record system calls of an application

Postby Moulinaie » Mon Dec 31, 2018 7:04 am

Eero Tamminen wrote:In what setup Sysrec should work?

For me it crashes to address error when selecting the "Sauver" option in the dialog after it has run the test program. It happens when it tries to write SYSREC.TXT file.


WARN : Address Error reading at address $1728d, PC=$16744 addr_e3=16744 op_e3=2159

[/code]

Same happens with TOS v1.04 and when using disk image, so it's not EmuTOS or Hatari GEMDOS HD emulation issue.


Argh !

Looks like my program reads a LONG or a WORD at an odd address. This is not an error with the 68030, so I didn't see it.
I will try on the MegaSTE.

Thanks for reporting.

Guillaume.

Moulinaie
Captain Atari
Captain Atari
Posts: 241
Joined: Wed Feb 01, 2012 9:34 pm

Re: SYSREC a tool to record system calls of an application

Postby Moulinaie » Mon Dec 31, 2018 3:13 pm

Eero Tamminen wrote:In what setup Sysrec should work?

For me it crashes to address error when selecting the "Sauver" option in the dialog after it has run the test program. It happens when it tries to write SYSREC.TXT file.



It's now fixed !
A problem with an odd address that doesn't hang the 68030 but crashes the 68000.

A little byte to pad the data, and that's it.

Thanks a lot !

Guillaume.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1937
Joined: Sun Jul 31, 2011 1:11 pm

Re: SYSREC a tool to record system calls of an application

Postby Eero Tamminen » Mon Dec 31, 2018 5:53 pm

Verified, works fine now, also with EmuTOS. Interesting little program. :-)

(Although unaligned accesses work on some processors, they're normally slower than aligned accesses, regardless of whether it's m68k or e.g. x86.)

Moulinaie
Captain Atari
Captain Atari
Posts: 241
Joined: Wed Feb 01, 2012 9:34 pm

Re: SYSREC a tool to record system calls of an application

Postby Moulinaie » Mon Dec 31, 2018 9:52 pm

Eero Tamminen wrote:Verified, works fine now, also with EmuTOS. Interesting little program. :-)

(Although unaligned accesses work on some processors, they're normally slower than aligned accesses, regardless of whether it's m68k or e.g. x86.)


Thanks for the test!

You're right with the timing of unaligned addresses.

Guillaume.


Social Media

     

Return to “Applications”

Who is online

Users browsing this forum: No registered users and 3 guests