Skip to content

Commit

Permalink
new function placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Aug 24, 2020
1 parent 3b88bae commit d5b4890
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 1 deletion.
27 changes: 27 additions & 0 deletions server/source/noexs/.vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"configurations": [
{
"name": "DKP Aarch64",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/include/**",
"F:/devkitPro/devkitA64/include/**",
"F:/devkitPro/devkitA64/aarch64-none-elf/include/**",
"F:/devkitPro/libnx/include/**",
"F:/devkitPro/portlibs/switch/include/**"
],
"defines": [
"DEBUG",
"SWITCH",
"__SWITCH__",
"VERSION_STRING=\"3.1.0\""
],
"compilerPath": "F:/devkitPro/devkitA64/bin/aarch64-none-elf-g++",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64",
"compilerArgs": []
}
],
"version": 4
}
5 changes: 5 additions & 0 deletions server/source/noexs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"functional": "cpp"
}
}
68 changes: 68 additions & 0 deletions server/source/noexs/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "make -j8",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"base": "$gcc",
"fileLocation": "absolute"
}
},
{
"label": "rebuild",
"type": "shell",
"command": "make clean all",
"problemMatcher": {
"base": "$gcc",
"fileLocation": "absolute"
}
},
{
"label": "clean",
"type": "shell",
"command": "make clean",
"problemMatcher": {
"base": "$gcc",
"fileLocation": "absolute"
}
},
{
"label": "deploy",
"type": "shell",
"command": "nxlink",
"args": ["-s","-a","switch.localhost","out\\EdiZon.nro"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "dedicated",
"showReuseMessage": true,
"clear": true
},
"problemMatcher": []
},
{
"label": "addr2line",
"type": "shell",
"command": "${DEVKITPRO}/devkitA64/bin/aarch64-none-elf-addr2line.exe",
"args": [
"-p",
"-fiCr",
"-e",
"${workspaceRoot}/out/EdiZon.elf"
],
"problemMatcher": [],
"presentation": {
"reveal": "always",
"panel": "shared",
"clear": false
}
}
]
}
Binary file modified server/source/noexs/noexs.nso
Binary file not shown.
Binary file modified server/source/noexs/noexs.nsp
Binary file not shown.
46 changes: 45 additions & 1 deletion server/source/noexs/source/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,55 @@ static Result _set_breakpoint(Gecko::Context& ctx){
return ctx.dbg.setBreakpoint(id, flags, addr);
}

//0x15
static Result _freeze_address(Gecko::Context& ctx){
u32 id;
u64 addr;
u64 flags;
READ_CHECKED(ctx, id);
READ_CHECKED(ctx, addr);
READ_CHECKED(ctx, flags);
return ctx.dbg.setBreakpoint(id, flags, addr);
}

//0x16
static Result _search_local(Gecko::Context& ctx){
u32 id;
u64 addr;
u64 flags;
READ_CHECKED(ctx, id);
READ_CHECKED(ctx, addr);
READ_CHECKED(ctx, flags);
return ctx.dbg.setBreakpoint(id, flags, addr);
}

//0x17
static Result _fetch_result(Gecko::Context& ctx){
u32 id;
u64 addr;
u64 flags;
READ_CHECKED(ctx, id);
READ_CHECKED(ctx, addr);
READ_CHECKED(ctx, flags);
return ctx.dbg.setBreakpoint(id, flags, addr);
}

//0x18
static Result _detach_dmnt(Gecko::Context& ctx){
u32 id;
u64 addr;
u64 flags;
READ_CHECKED(ctx, id);
READ_CHECKED(ctx, addr);
READ_CHECKED(ctx, flags);
return ctx.dbg.setBreakpoint(id, flags, addr);
}

Result cmd_decode(Gecko::Context& ctx, int cmd){
static Result (*cmds[255])(Gecko::Context&) = {NULL, _status, _poke8, _poke16, _poke32, _poke64, _readmem,
_writemem, _resume, _pause, _attach, _detatch, _querymem_single,
_querymem_multi, _current_pid, _attached_pid, _list_pids,
_get_titleid, _disconnect, _readmem_multi, _set_breakpoint};
_get_titleid, _disconnect, _readmem_multi, _set_breakpoint, _freeze_address, _search_local, _fetch_result, _detach_dmnt};
Result rc = 0;
if(cmds[cmd]){
rc = cmds[cmd](ctx);
Expand Down

0 comments on commit d5b4890

Please sign in to comment.