From c447d766aaed7864037d44a9c47d23b5dd3c451c Mon Sep 17 00:00:00 2001 From: nemasu Date: Thu, 24 Jan 2019 13:00:55 +0900 Subject: [PATCH] Custom port. --- bss.asm | 1 + data.asm | 1 - debug.asm | 4 ++++ main.asm | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bss.asm b/bss.asm index 6084a83..a3e9fea 100644 --- a/bss.asm +++ b/bss.asm @@ -18,3 +18,4 @@ listen_socket: resq 1 listen_port: resw 1 one_constant: resq 1 + directory_path: resq 1 diff --git a/data.asm b/data.asm index 69e25d7..77ff882 100644 --- a/data.asm +++ b/data.asm @@ -28,7 +28,6 @@ at sin_addr, dd 0 ;INADDR_ANY iend - directory_path dq 0 request_type dq 0 request_offset dq 0 diff --git a/debug.asm b/debug.asm index 5d2e9a0..322e475 100644 --- a/debug.asm +++ b/debug.asm @@ -15,6 +15,10 @@ ; ;You should have received a copy of the GNU General Public License ;along with asmttpd. If not, see . + +;hint, use these with GDB +;set follow-fork-mode child + section .bss printbuffer: resb 1024;debug diff --git a/main.asm b/main.asm index 67ed408..504c533 100644 --- a/main.asm +++ b/main.asm @@ -58,7 +58,7 @@ _start: mov [listen_port], eax mov rax, [rsp+16] ;Directory (first) parameter - mov [directory_path], rax + mov [directory_path], rax ; Register signal handlers ( just close all other threads by jumping to SYS_EXIT_GROUP ) mov r10, 8 ; sizeof(sigset_t) displays 128, but strace shows 8 ... so 8 it is! -_-