Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
188 user(s) are online (172 user(s) are browsing Forums)

Members: 0
Guests: 188

more...

Support us!

Headlines

 
  Register To Post  

« 1 (2)
Re: A way to test if running the DEBUG kernel?
Home away from home
Home away from home


See User information
@Marko

Quote:

Quote:

Quote:
Write a small command line tool whch creates a list, adds a node, removes the node, then chacks the value of ln_Succ in the node. If debug kernel is running this will be munged to 0xFFFFFFFF, if not it will be unchanged. Freeup resources and return WARN (5) for debug 0 for standard.


Yep, something like this, I tried it, it might work..

But I got stuck on reading the DAR value from the cpu special register :/


Not sure why you want to read the DAR to achieve the above?

Quote:

I tried reading it from C via asm but it turned out that this value is only readable in super-visor mode :S (if I understood it correctly, and the code did not work)

A way to read the DAR value in user-mode, or some other way, would help...


But given that you want to read the DAR for some other reason, check out IDebug->ReadTaskStatus()

(in exec autodoc as "debug" is an alternate interface in exec.library ).

caveat: i've not messed with this api much, so that may not be the function you need. I just scanned the autodocs.


Go to top
Re: A way to test if running the DEBUG kernel?
Quite a regular
Quite a regular


See User information
@broadblues

Quote:
Not sure why you want to read the DAR to achieve the above?

I got the DAR from http://wiki.amigaos.net/wiki/Debug_Kernel

Quote:
But given that you want to read the DAR for some other reason, check out IDebug->ReadTaskStatus()

(in exec autodoc as "debug" is an alternate interface in exec.library ).

caveat: i've not messed with this api much, so that may not be the function you need. I just scanned the autodocs.

Nice, I'm gonna see little later, thanks

AmigaOS 4.1 FE Update 2 on Sam440ep-flex, 800Mhz, 1GB RAM, Radeon 9250 Resized Image
A1200/040, 2+4MB, external 3.5''HDD / A1200 (spare) / A500+ (sold) / C128 (sold)
http://m4rko.com/AMIGA
Go to top
Re: A way to test if running the DEBUG kernel?
Just can't stay away
Just can't stay away


See User information
When I was following this thread, it made me think of a little tool I have been using for years to tell me which Kickstart config I have booted.

Problem was, it was only released inside the OS4 beta tester group, so I couldn't recommend it here as a solution.

So I contacted the author, Alex Carmona, and he allowed me to release it publically for him, while suggesting I rewrote his original doc file.

I have done so, and it is now sitting in the upload queue of OS4Depot.

The archive name is GetKickConf.lha, and it should end up in utility/shell shortly.

There are detailed instructions in the readme inside the archive, but basically, it allows you to set an environment variable with a name that you give to each of your Kickstart configs, so that you can e.g. display it in the WB title bar. Or you could use it to control a script to start your test tools when booting your debug config, etc. etc.

Maybe it can be useful to solve Marko's problem?

P.S. Thanks to AlexC for allowing its release.

Best regards,

Niels

Go to top
Re: A way to test if running the DEBUG kernel?
Quite a regular
Quite a regular


See User information
@Niels & AlexC

Ah, very nice thank you :) I will download it in a moment and take a look :P...

AmigaOS 4.1 FE Update 2 on Sam440ep-flex, 800Mhz, 1GB RAM, Radeon 9250 Resized Image
A1200/040, 2+4MB, external 3.5''HDD / A1200 (spare) / A500+ (sold) / C128 (sold)
http://m4rko.com/AMIGA
Go to top
Re: A way to test if running the DEBUG kernel?
Quite a regular
Quite a regular


See User information
I've been able to read the DAR register some days ago now, with IDebug->ReadTaskContext()

However when making something "illegal" (like described in AmigaOS wiki "Debug Kernel") the Grim Reaper pops up before I can track the DAR value from my code, so that way didn't work...

But maybe GetKickConf will help here, gonna check :P...

AmigaOS 4.1 FE Update 2 on Sam440ep-flex, 800Mhz, 1GB RAM, Radeon 9250 Resized Image
A1200/040, 2+4MB, external 3.5''HDD / A1200 (spare) / A500+ (sold) / C128 (sold)
http://m4rko.com/AMIGA
Go to top
Re: A way to test if running the DEBUG kernel?
Just can't stay away
Just can't stay away


See User information
@Marko

You're welcome - hope it helps

@all:

It is now available here:

http://os4depot.net/index.php?functio ... ity/shell/getkickconf.lha

Best regards,

Niels

Go to top
Re: A way to test if running the DEBUG kernel?
Home away from home
Home away from home


See User information
@Marko,
Quote:

I've been able to read the DAR register some days ago now, with IDebug->ReadTaskContext()

However when making something "illegal" (like described in AmigaOS wiki "Debug Kernel") the Grim Reaper pops up before I can track the DAR value from my code, so that way didn't work...


Your not supposed to dereference the illegal pointer just check it's value!.

pseudo code:

Create List
Create Node
Add Node to list
check and save ln_succ ans ln_pred values
Remove node from list (using IExec->Remove())
check and compare ln_Succ and ln_Pred with saved values.

If different then debugkernel in use.

cleanup



Go to top
Re: A way to test if running the DEBUG kernel?
Quite a regular
Quite a regular


See User information
@Niels & AlexC

Yes, It works pefect, thanks again

I got it just how I like it (the behavior) now in my User-Startup script:

GetKickConf BootConfigName
If "$BootConfigNameMatches "OS4 debug kernel"
    
Run Sashimi
EndIf


PS: Problem solved, sort of :)

AmigaOS 4.1 FE Update 2 on Sam440ep-flex, 800Mhz, 1GB RAM, Radeon 9250 Resized Image
A1200/040, 2+4MB, external 3.5''HDD / A1200 (spare) / A500+ (sold) / C128 (sold)
http://m4rko.com/AMIGA
Go to top
Re: A way to test if running the DEBUG kernel?
Quite a regular
Quite a regular


See User information
@broadblues

Quote:
Your not supposed to dereference the illegal pointer just check it's value!.

pseudo code:

Create List
Create Node
Add Node to list
check and save ln_succ ans ln_pred values
Remove node from list (using IExec->Remove())
check and compare ln_Succ and ln_Pred with saved values.

If different then debugkernel in use.

cleanup


Ok, gonna try this little later, thans :)

AmigaOS 4.1 FE Update 2 on Sam440ep-flex, 800Mhz, 1GB RAM, Radeon 9250 Resized Image
A1200/040, 2+4MB, external 3.5''HDD / A1200 (spare) / A500+ (sold) / C128 (sold)
http://m4rko.com/AMIGA
Go to top
Re: A way to test if running the DEBUG kernel?
Just can't stay away
Just can't stay away


See User information
@Marko

Quote:
I got it just how I like it (the behavior) now in my User-Startup script:

GetKickConf BootConfigName 
If 
"$BootConfigName" Matches "OS4 debug kernel" 
    Run Sashimi 
EndIf
Yep, looks good. Minor detail: I'd probably just use "EQ" instead of "Matches", since you compare the variable to a literal string, not an AmigaDOS wildcard pattern.

But I guess it works either way

Best regards,

Niels

Go to top
Re: A way to test if running the DEBUG kernel?
Quite a regular
Quite a regular


See User information
@nbache

Ok, thanks :)

AmigaOS 4.1 FE Update 2 on Sam440ep-flex, 800Mhz, 1GB RAM, Radeon 9250 Resized Image
A1200/040, 2+4MB, external 3.5''HDD / A1200 (spare) / A500+ (sold) / C128 (sold)
http://m4rko.com/AMIGA
Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project