From e53b869dcc09fe46b6951636e20b8ae5e0fa13e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuzhan=20Ero=C4=9Flu?= Date: Sun, 11 Oct 2020 19:58:56 +0300 Subject: [PATCH] Version v0.2.0 with new versioning strategy. --- README.md | 12 +++++++++++- gdbfrontend.py | 1 - run.py | 23 ++++++++++++++--------- statics.py | 2 +- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d361687..ee89aba 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Options: --credentials=USER:PASS, -c USER:PASS: Specifies username and password for accessing to debugger (Browser asks it for two times).) --host=IP, -H IP: Specifies current host address that you can access via for HTTP and WS servers. --listen=IP, -l IP: Specifies listen address for HTTP and WS servers. - --port=PORT, -p PORT: Specifies port range for three ports to (Gotty: PORT, HTTP: PORT+1, WS: PORT+2 or 0 for random ports). + --port=PORT, -p PORT: Specifies port range for three ports to (Gotty: PORT, HTTP: PORT+1 or 0 for random ports). --http-port=PORT: Specifies HTTP server port. --gotty-port=PORT: Specifies Gotty server port. --readonly, -r: Makes code editor readonly. (Notice: This option is not related to security.) @@ -223,6 +223,16 @@ You can use gdb-frontend on WSL (Windows Subsystem for Linux). ### Issues about WSL * Random port option is not usable on WSL becasue `/proc/net/tcp` interface is not working on WSL. +## Versioning +Since v0.2.0-beta, GDBFrontend switched to a new versioning strategy. + +### Reading Versions +In `vX.Y.Z-STABILITY`: +* `X` is **major** versions, changes long term with major features and enhancements. +* `Y` is **main** versions that include new features and enhancements. +* `Z` is **bugfix** releases of main versions. +* `STABILITY` is stability level of the release. (`alpha`, `beta`, `rcN`, `stable`) + ## Documentation Documentation is TODO yet. diff --git a/gdbfrontend.py b/gdbfrontend.py index af1e040..ab1db38 100644 --- a/gdbfrontend.py +++ b/gdbfrontend.py @@ -67,6 +67,5 @@ mmapBuff = mmap.mmap(fd, mmap.PAGESIZE, mmap.MAP_SHARED, mmap.PROT_WRITE) http_port = ctypes.c_uint16.from_buffer(mmapBuff, 0) - server_port = ctypes.c_uint16.from_buffer(mmapBuff, 2) http_port.value = api.globalvars.httpServer.server_port \ No newline at end of file diff --git a/run.py b/run.py index 0581b3e..817fcc6 100644 --- a/run.py +++ b/run.py @@ -14,6 +14,7 @@ import json import base64 import subprocess +import time import config config.init() @@ -132,7 +133,7 @@ def argHandler_help(): print(" --credentials=USER:PASS, -c USER:PASS:\tSpecifies username and password for accessing to debugger (Browser asks it for two times).)") print(" --host=IP, -H IP:\t\t\t\tSpecifies current host address that you can access via for HTTP and WS servers.") print(" --listen=IP, -l IP:\t\t\t\tSpecifies listen address for HTTP and WS servers.") - print(" --port=PORT, -p PORT:\t\t\t\tSpecifies port range for three ports to (Gotty: PORT, HTTP: PORT+1, WS: PORT+2 or 0 for random ports).") + print(" --port=PORT, -p PORT:\t\t\t\tSpecifies port range for three ports to (Gotty: PORT, HTTP: PORT+1 or 0 for random ports).") print(" --http-port=PORT:\t\t\t\tSpecifies HTTP server port.") print(" --gotty-port=PORT:\t\t\t\tSpecifies Gotty server port.") print(" --readonly, -r:\t\t\t\tMakes code editor readonly. (Notice: This option is not related to security.)") @@ -157,11 +158,18 @@ def quit_tmux_gdb(): global tmux_executable global terminal_id - os.system( - tmux_executable + - " -f tmux.conf send-keys -t " + terminal_id + - " C-c C-c C-d C-d ENTER " - ) + for i in range(5): + subprocess.Popen([ + tmux_executable, + "-f", + "tmux.conf", + "send-keys", + "-t", + terminal_id, + "C-c", "C-c", "C-d", "C-d", "ENTER" + ], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait() + + time.sleep(0.1) args = [ ["--verbose", "-V", argHandler_verbose, False], @@ -304,7 +312,6 @@ def quit_tmux_gdb(): gotty.wait() - quit_tmux_gdb() quit_tmux_gdb() subprocess.Popen([tmux_executable, "kill-session", "-t", terminal_id], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait() @@ -343,7 +350,6 @@ def quit_tmux_gdb(): gotty.wait() gotty.kill() - quit_tmux_gdb() quit_tmux_gdb() subprocess.Popen([tmux_executable, "kill-session", "-t", terminal_id], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait() @@ -352,7 +358,6 @@ def quit_tmux_gdb(): gotty.kill() - quit_tmux_gdb() quit_tmux_gdb() subprocess.Popen([tmux_executable, "kill-session", "-t", terminal_id], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait() diff --git a/statics.py b/statics.py index a95febc..619fa35 100644 --- a/statics.py +++ b/statics.py @@ -8,7 +8,7 @@ # Licensed under GNU/GPLv3 # Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) -VERSION = [0, 1, 4, "beta"] +VERSION = [0, 2, 0, "beta"] VERSION_STRING = "v"+".".join([str(i) for i in VERSION[:-1]])+"-"+VERSION[-1] """