mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-10 06:01:52 +00:00
ro: skeleton ro:dmnt
This commit is contained in:
parent
6004b7479e
commit
4ac8f2745b
3 changed files with 64 additions and 2 deletions
26
stratosphere/ro/source/ro_debug_monitor.cpp
Normal file
26
stratosphere/ro/source/ro_debug_monitor.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019 Atmosphère-NX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include <cstdio>
|
||||
#include <algorithm>
|
||||
#include <stratosphere.hpp>
|
||||
#include "ro_debug_monitor.hpp"
|
||||
|
||||
Result DebugMonitorService::GetProcessModuleInfo(Out<u32> count, OutBuffer<LoaderModuleInfo> out_infos, u64 pid) {
|
||||
/* TODO: Implement. */
|
||||
return ResultKernelConnectionClosed;
|
||||
}
|
33
stratosphere/ro/source/ro_debug_monitor.hpp
Normal file
33
stratosphere/ro/source/ro_debug_monitor.hpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019 Atmosphère-NX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <switch.h>
|
||||
#include <stratosphere.hpp>
|
||||
|
||||
enum DebugMonitorServiceCmd {
|
||||
Dmnt_Cmd_GetProcessModuleInfo = 0
|
||||
};
|
||||
|
||||
class DebugMonitorService final : public IServiceObject {
|
||||
private:
|
||||
/* Actual commands. */
|
||||
Result GetProcessModuleInfo(Out<u32> count, OutBuffer<LoaderModuleInfo> out_infos, u64 pid);
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MakeServiceCommandMeta<Dmnt_Cmd_GetProcessModuleInfo, &DebugMonitorService::GetProcessModuleInfo>(),
|
||||
};
|
||||
};
|
|
@ -23,6 +23,8 @@
|
|||
#include <atmosphere.h>
|
||||
#include <stratosphere.hpp>
|
||||
|
||||
#include "ro_debug_monitor.hpp"
|
||||
|
||||
extern "C" {
|
||||
extern u32 __start__;
|
||||
|
||||
|
@ -104,12 +106,13 @@ void __appExit(void) {
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
/* Static server manager. */
|
||||
static auto g_server_manager = WaitableManager(1);
|
||||
static auto s_server_manager = WaitableManager(1);
|
||||
|
||||
/* TODO: Create services. */
|
||||
s_server_manager.AddWaitable(new ServiceServer<DebugMonitorService>("ro:dmnt", 1));
|
||||
|
||||
/* Loop forever, servicing our services. */
|
||||
g_server_manager.Process();
|
||||
s_server_manager.Process();
|
||||
|
||||
/* Cleanup */
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue