ErrDisp: Difference between revisions

Guiand (talk | contribs)
Added preliminary information about errinfo format
Sorunome (talk | contribs)
Add missing category
 
(12 intermediate revisions by 4 users not shown)
Line 3: Line 3:
The register dump/fatal error info can also be written to [[nandrw/sys/native.log]]. On retail consoles, the system does not notify ErrDisp that any user-land exceptions occurred, ErrDisp is only notified for this on dev/debug units. Therefore, on retail consoles native.log only contains info from fatal errors. Starting with [[5.0.0-11]] ErrDisp no longer writes logs to native.log, except when the error-type is value 5 and when other checks with the errorinfo structure are successful (normally processes using this port never use error-type 5).
The register dump/fatal error info can also be written to [[nandrw/sys/native.log]]. On retail consoles, the system does not notify ErrDisp that any user-land exceptions occurred, ErrDisp is only notified for this on dev/debug units. Therefore, on retail consoles native.log only contains info from fatal errors. Starting with [[5.0.0-11]] ErrDisp no longer writes logs to native.log, except when the error-type is value 5 and when other checks with the errorinfo structure are successful (normally processes using this port never use error-type 5).


The bottom screen displays the error screen like "error has occurred", even with a development 3DS. The top screen can display the development error info, this is only displayed when [[Configuration_Memory|UNITINFO]] bit0 is clear, for a development 3DS.
The bottom screen displays the error screen like "error has occurred", even with a development 3DS. The top screen can display the development error info, this is only displayed when [[Configuration_Memory#ENVINFO|ENVINFO]] bit0 is clear, for a development 3DS.


ErrDisp handles "returning" to Home Menu via [[NSS:RebootSystem]], which triggers a hardware system reboot.
ErrDisp handles "returning" to Home Menu via [[NSS:RebootSystem]], which triggers a hardware system reboot.
Line 14: Line 14:
|-
|-
| 0x00010800
| 0x00010800
| ThrowFatalError(0x80-byte errorinfo)
| [[ERR:Throw|Throw]]
|-
|-
| 0x00020042
| 0x00020042
| (size, <nowiki>(size<<14) | 2</nowiki>, errorinfoptr) This is similar to cmd1, except with this the input buffer is copied to final output errorinfo+0x80 instead of +0x0, via the ARM11 kernel. Max size is 0x100. ErrDisp doesn't do anything in the cmd-handler for this command at all, besides checking the command header and buffer header.
| [[ERR:SetUserString|SetUserString]]
|}
 
= errinfo =
Note: the following data is still only partly reliable
{| class="wikitable" border="1"
|-
! Type
! Name
! Info
|-
| 1 byte
| ?
| unknown
|-
| 1 byte
| ?
| unknown
|-
| 2 bytes
|
| The type of error info struct (??)
|-
| 4 bytes
|
| The return code of the errored function (?? - Inconsistent)
|-
| 4 bytes
| caller_ptr
| The contents of the LR register - where the error was called from
|-
| 4 bytes
| process_id
| The ID/Handle of the running process
|}
|}
[[Category:Services]]