mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2025-02-05 06:52:50 +00:00
Compare commits
6 commits
042b9b4dd7
...
3e717c1215
Author | SHA1 | Date | |
---|---|---|---|
|
3e717c1215 | ||
|
10c7a39528 | ||
|
cd6d129540 | ||
|
700d811cb7 | ||
|
37a910802f | ||
|
0d4377b43b |
6 changed files with 137 additions and 159 deletions
58
.github/ISSUE_TEMPLATE/bug_report.md
vendored
58
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -1,58 +0,0 @@
|
||||||
---
|
|
||||||
name: Bug Report
|
|
||||||
about: Something doesn't work correctly in Atmosphère.
|
|
||||||
#assignees:
|
|
||||||
---
|
|
||||||
|
|
||||||
## Bug Report
|
|
||||||
|
|
||||||
[ If any section does not apply, replace its contents with "N/A". ]</br>
|
|
||||||
[ Lines between [ ] (square brackets) should be removed before posting. ]</br>
|
|
||||||
|
|
||||||
[ * ]</br>
|
|
||||||
[ Note: If the bug or crash you encountered is related to; ]</br>
|
|
||||||
[ - software used to make "backups", ]</br>
|
|
||||||
[ - software explicitly distributed for piracy, etc ]</br>
|
|
||||||
[ then contributors will not provide support for your issue and your issue will be closed. ]</br>
|
|
||||||
|
|
||||||
### What's the issue you encountered?
|
|
||||||
|
|
||||||
[ Describe the issue in detail and what you were doing beforehand. ]</br>
|
|
||||||
[ Did you make any changes related to Atmosphère itself? ]</br>
|
|
||||||
[ If so, make sure to include details relating to what exactly you changed. ]</br>
|
|
||||||
|
|
||||||
### How can the issue be reproduced?
|
|
||||||
|
|
||||||
[ * ]</br>
|
|
||||||
[ Include a detailed step by step process for recreating your issue. ]</br>
|
|
||||||
|
|
||||||
### Crash Report
|
|
||||||
|
|
||||||
[ Crash reports can be found under ``/atmosphere/crash_reports``. ]</br>
|
|
||||||
[ If your issue caused Atmosphère to crash, include the crash report(s) by creating a [gist](https://gist.github.com/) and pasting the link here. ]</br>
|
|
||||||
[ If you don't include a crash report in instances of crash related issues, we will ask you one to provide one. ]</br>
|
|
||||||
|
|
||||||
### System Firmware Version
|
|
||||||
|
|
||||||
X.X.X</br>
|
|
||||||
[ Replace X's with system firmware version at time of crash. ]</br>
|
|
||||||
[ You can find your firmware version in the Settings -> System, under "System Update". ]</br>
|
|
||||||
[ If it says "Update Pending", you can clear the pending update by rebooting to Maintenance Mode. ]</br>
|
|
||||||
|
|
||||||
### Environment?
|
|
||||||
|
|
||||||
- What bootloader (fusèe, hekate, etc) was Atmosphère launched by:
|
|
||||||
- Official release or unofficial build:
|
|
||||||
- [ Official release version x.x.x (or) unofficial build ]
|
|
||||||
- [ If using an unofficial build, include details on where/how you acquired the build. ]
|
|
||||||
- [ Ex: Self-compilation ]
|
|
||||||
- [ Ex: Kosmos' distribution of Atmosphère ]
|
|
||||||
- Do you have additional kips or sysmodules you're loading:
|
|
||||||
- Homebrew software installed: [ * ]
|
|
||||||
- EmuMMC or SysNAND:
|
|
||||||
- [ If using an EmuMMC, include whether it's partition-based or file-based. ]
|
|
||||||
|
|
||||||
### Additional context?
|
|
||||||
|
|
||||||
- Additional info about your environment:
|
|
||||||
- [ Any other information relevant to your issue. ]
|
|
67
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
67
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
name: Bug Report
|
||||||
|
description: Something doesn't work correctly in Atmosphère.
|
||||||
|
title: "[BUG] "
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Note: If the bug or crash you encountered is related to
|
||||||
|
- software used to make "backups"
|
||||||
|
- software explicitly distributed for piracy, etc.
|
||||||
|
|
||||||
|
then contributors will not provide support for your issue and your issue will be closed.
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: What's the issue you encountered?
|
||||||
|
description: |
|
||||||
|
Describe the issue in detail and what you were doing beforehand.
|
||||||
|
Did you make any changes related to Atmosphère itself?
|
||||||
|
If so, make sure to include details relating to what exactly you changed.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: How can the issue be reproduced?
|
||||||
|
description: Include a detailed step by step process for recreating your issue.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Crash Report
|
||||||
|
description: |
|
||||||
|
Crash reports can be found under ``/atmosphere/crash_reports``.
|
||||||
|
- If your issue caused Atmosphère to crash, include the crash report(s) by creating a [gist](https://gist.github.com/) and pasting the link here.
|
||||||
|
- If you don't include a crash report in instances of crash related issues, we will ask you one to provide one.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: System Firmware Version
|
||||||
|
description: |
|
||||||
|
Replace X's with system firmware version at time of crash.
|
||||||
|
You can find your firmware version in the Settings -> System, under "System Update".
|
||||||
|
If it says "Update Pending", you can clear the pending update by rebooting to Maintenance Mode.
|
||||||
|
placeholder: X.X.X
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Environment?
|
||||||
|
value: |
|
||||||
|
- What bootloader (fusée, hekate, etc) was Atmosphère launched by:
|
||||||
|
- Official release or unofficial build:
|
||||||
|
- If using an unofficial build, include details on where/how you acquired the build:
|
||||||
|
- Do you have additional kips or sysmodules you're loading:
|
||||||
|
- Homebrew software installed:
|
||||||
|
- EmuMMC or SysMMC:
|
||||||
|
- If using an EmuMMC, include whether it's partition-based or file-based:
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional context?
|
||||||
|
value: |
|
||||||
|
- Additional info about your environment:
|
||||||
|
- Any other information relevant to your issue:
|
||||||
|
validations:
|
||||||
|
required: false
|
48
.github/ISSUE_TEMPLATE/feature_request.md
vendored
48
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -1,48 +0,0 @@
|
||||||
---
|
|
||||||
name: Feature Request
|
|
||||||
about: Suggest a new feature for Atmosphère.
|
|
||||||
#assignees:
|
|
||||||
---
|
|
||||||
|
|
||||||
## Feature Request
|
|
||||||
|
|
||||||
[ If any section does not apply, replace its contents with "N/A". ]</br>
|
|
||||||
[ If you do not have the information needed for a section, replace its contents with "Unknown". ]</br>
|
|
||||||
[ Lines between [ ] (square brackets) are to be removed before posting. ]
|
|
||||||
|
|
||||||
[ Please search for existing [feature requests](https://github.com/Atmosphere-NX/Atmosphere/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22features%2Ffeature-request%22) before you make your own request. ]</br>
|
|
||||||
[ Duplicate requests will be marked as such and you will be referred to the original request. ]
|
|
||||||
|
|
||||||
### What feature are you suggesting?
|
|
||||||
#### Overview:
|
|
||||||
- [ Include the basic, high-level concepts for this feature here. ]</br>
|
|
||||||
|
|
||||||
#### Smaller Details:
|
|
||||||
- [ These may include specific methods of implementation etc. ]</br>
|
|
||||||
|
|
||||||
#### Nature of Request:
|
|
||||||
[ Remove all that do not apply to your request. ]
|
|
||||||
- Addition
|
|
||||||
- [ Ex: Addition of certain original features or features from other community projects. ]
|
|
||||||
- [ If you are suggesting porting features or including features from other projects, include what license they are distributed under and what, if any libraries those project use. ]
|
|
||||||
- Change
|
|
||||||
- Removal
|
|
||||||
- [Ex: Removal of certain features or implementation due to a specific issue/bug or because of low quality code, etc.]
|
|
||||||
|
|
||||||
### What component do you feel this would best fit within?
|
|
||||||
- [Fusée](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
|
|
||||||
- Atmosphère's custom bootloader.</br>
|
|
||||||
- [Exosphère](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
|
|
||||||
- Fully-featured custom secure monitor.</br>
|
|
||||||
- [Stratosphère](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
|
|
||||||
- Custom system modules.</br>
|
|
||||||
- [**Thermosphère**](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
|
|
||||||
- Atmosphère's emuNAND implementation.</br>
|
|
||||||
- [**Troposphère**](https://github.com/Atmosphere-NX/Atmosphere#components)</br>
|
|
||||||
- Application-level patches to the Horizon OS.</br>
|
|
||||||
|
|
||||||
[ Note: **Bolded components are not implemented** or are still at the prototyping phase. ]
|
|
||||||
|
|
||||||
### Why would this feature be useful?
|
|
||||||
[ If this is a feature for an end-user, how does it benefit the end-user? ]</br>
|
|
||||||
[ If this feature is for developers, what does it add to Atmosphère that did not already exist? ]</br>
|
|
44
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
44
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
name: Feature Request
|
||||||
|
description: Suggest a new feature for Atmosphère.
|
||||||
|
title: "[FEATURE REQUEST] "
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Please search for [existing feature requests](https://github.com/Atmosphere-NX/Atmosphere/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22features%2Ffeature-request%22) before you make your own request.
|
||||||
|
Duplicate requests will be marked as such, and you will be referred to the original request.
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: What feature are you suggesting?
|
||||||
|
description: Include the basic concepts for this feature here.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Smaller details
|
||||||
|
description: These may include specific methods of implementation, etc.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Nature of the request
|
||||||
|
description: |
|
||||||
|
Is this request an addition, a change, or a removal?
|
||||||
|
|
||||||
|
If you are suggesting porting features or including features from other projects, include what license they are distributed under, and what (if any) libraries those projects use.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: What component do you feel this would best fit within?
|
||||||
|
description: See [here](https://github.com/Atmosphere-NX/Atmosphere#components) for more information.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Why would this feature be useful?
|
||||||
|
description: |
|
||||||
|
- If this is a feature for an end-user, how does it benefit the end-user?
|
||||||
|
- If this feature is for developers, what does it add to Atmosphère that did not already exist?
|
||||||
|
validations:
|
||||||
|
required: true
|
|
@ -623,11 +623,6 @@ namespace ams::kern::arch::arm64 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the first instruction. */
|
|
||||||
if (!ReadValue(std::addressof(temp_32), process, base_address)) {
|
|
||||||
return PrintAddress(address);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the module name. */
|
/* Get the module name. */
|
||||||
char module_name[0x20];
|
char module_name[0x20];
|
||||||
const bool has_module_name = GetModuleName(module_name, sizeof(module_name), process, base_address);
|
const bool has_module_name = GetModuleName(module_name, sizeof(module_name), process, base_address);
|
||||||
|
@ -637,36 +632,32 @@ namespace ams::kern::arch::arm64 {
|
||||||
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp_32 == 0) {
|
/* Locate .dyn using rocrt::ModuleHeader. */
|
||||||
/* Module is dynamically loaded by rtld. */
|
{
|
||||||
|
/* Determine the ModuleHeader offset. */
|
||||||
u32 mod_offset;
|
u32 mod_offset;
|
||||||
if (!ReadValue(std::addressof(mod_offset), process, base_address + sizeof(u32))) {
|
if (!ReadValue(std::addressof(mod_offset), process, base_address + sizeof(u32))) {
|
||||||
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
||||||
}
|
}
|
||||||
if (!ReadValue(std::addressof(temp_32), process, base_address + mod_offset)) {
|
|
||||||
|
/* Read the signature. */
|
||||||
|
constexpr u32 SignatureFieldOffset = AMS_OFFSETOF(rocrt::ModuleHeader, signature);
|
||||||
|
if (!ReadValue(std::addressof(temp_32), process, base_address + mod_offset + SignatureFieldOffset)) {
|
||||||
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
||||||
}
|
}
|
||||||
if (temp_32 != 0x30444F4D) { /* MOD0 */
|
|
||||||
|
/* Check that the module signature is expected. */
|
||||||
|
if (temp_32 != rocrt::ModuleHeaderVersion) { /* MOD0 */
|
||||||
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
||||||
}
|
}
|
||||||
if (!ReadValue(std::addressof(temp_32), process, base_address + mod_offset + sizeof(u32))) {
|
|
||||||
|
/* Determine the dynamic offset. */
|
||||||
|
constexpr u32 DynamicFieldOffset = AMS_OFFSETOF(rocrt::ModuleHeader, dynamic_offset);
|
||||||
|
if (!ReadValue(std::addressof(temp_32), process, base_address + mod_offset + DynamicFieldOffset)) {
|
||||||
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
||||||
}
|
}
|
||||||
dyn_address = base_address + mod_offset + temp_32;
|
|
||||||
} else if (temp_32 == 0x14000002) {
|
dyn_address = module.start_address + mod_offset + temp_32;
|
||||||
/* Module embeds rtld. */
|
|
||||||
if (!ReadValue(std::addressof(temp_32), process, base_address + 0x5C)) {
|
|
||||||
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
|
||||||
}
|
|
||||||
if (temp_32 != 0x94000002) {
|
|
||||||
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
|
||||||
}
|
|
||||||
if (!ReadValue(std::addressof(temp_32), process, base_address + 0x60)) {
|
|
||||||
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
|
||||||
}
|
|
||||||
dyn_address = base_address + 0x60 + temp_32;
|
|
||||||
} else {
|
|
||||||
return PrintAddressWithModuleName(address, has_module_name, module_name, base_address);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Locate tables inside .dyn. */
|
/* Locate tables inside .dyn. */
|
||||||
|
|
|
@ -282,56 +282,38 @@ namespace ams::creport {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the first instruction of .text. */
|
|
||||||
if (R_FAILED(svc::ReadDebugProcessMemory(reinterpret_cast<uintptr_t>(std::addressof(temp_32)), m_debug_handle, module.start_address, sizeof(temp_32)))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We want to find the symbol table/.dynamic. */
|
/* We want to find the symbol table/.dynamic. */
|
||||||
uintptr_t dyn_address = 0;
|
uintptr_t dyn_address = 0;
|
||||||
uintptr_t sym_tab = 0;
|
uintptr_t sym_tab = 0;
|
||||||
uintptr_t str_tab = 0;
|
uintptr_t str_tab = 0;
|
||||||
size_t num_sym = 0;
|
size_t num_sym = 0;
|
||||||
|
|
||||||
/* Detect module type. */
|
/* Locate .dyn using rocrt::ModuleHeader. */
|
||||||
if (temp_32 == 0) {
|
{
|
||||||
/* Module is dynamically loaded by rtld. */
|
/* Determine the ModuleHeader offset. */
|
||||||
u32 mod_offset;
|
u32 mod_offset;
|
||||||
if (R_FAILED(svc::ReadDebugProcessMemory(reinterpret_cast<uintptr_t>(std::addressof(mod_offset)), m_debug_handle, module.start_address + sizeof(u32), sizeof(u32)))) {
|
if (R_FAILED(svc::ReadDebugProcessMemory(reinterpret_cast<uintptr_t>(std::addressof(mod_offset)), m_debug_handle, module.start_address + sizeof(u32), sizeof(u32)))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (R_FAILED(svc::ReadDebugProcessMemory(reinterpret_cast<uintptr_t>(std::addressof(temp_32)), m_debug_handle, module.start_address + mod_offset, sizeof(u32)))) {
|
/* Read the signature. */
|
||||||
|
constexpr u32 SignatureFieldOffset = AMS_OFFSETOF(rocrt::ModuleHeader, signature);
|
||||||
|
if (R_FAILED(svc::ReadDebugProcessMemory(reinterpret_cast<uintptr_t>(std::addressof(temp_32)), m_debug_handle, module.start_address + mod_offset + SignatureFieldOffset, sizeof(u32)))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check that the module signature is expected. */
|
||||||
if (temp_32 != rocrt::ModuleHeaderVersion) { /* MOD0 */
|
if (temp_32 != rocrt::ModuleHeaderVersion) { /* MOD0 */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (R_FAILED(svc::ReadDebugProcessMemory(reinterpret_cast<uintptr_t>(std::addressof(temp_32)), m_debug_handle, module.start_address + mod_offset + sizeof(u32), sizeof(u32)))) {
|
/* Determine the dynamic offset. */
|
||||||
|
constexpr u32 DynamicFieldOffset = AMS_OFFSETOF(rocrt::ModuleHeader, dynamic_offset);
|
||||||
|
if (R_FAILED(svc::ReadDebugProcessMemory(reinterpret_cast<uintptr_t>(std::addressof(temp_32)), m_debug_handle, module.start_address + mod_offset + DynamicFieldOffset, sizeof(u32)))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dyn_address = module.start_address + mod_offset + temp_32;
|
dyn_address = module.start_address + mod_offset + temp_32;
|
||||||
} else if (temp_32 == 0x14000002) {
|
|
||||||
/* Module embeds rtld. */
|
|
||||||
if (R_FAILED(svc::ReadDebugProcessMemory(reinterpret_cast<uintptr_t>(std::addressof(temp_32)), m_debug_handle, module.start_address + 0x5C, sizeof(u32)))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (temp_32 != 0x94000002) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (R_FAILED(svc::ReadDebugProcessMemory(reinterpret_cast<uintptr_t>(std::addressof(temp_32)), m_debug_handle, module.start_address + 0x60, sizeof(u32)))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
dyn_address = module.start_address + 0x60 + temp_32;
|
|
||||||
} else {
|
|
||||||
/* Module has unknown format. */
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue