Skip to content

Commit

Permalink
Version v0.2.0 with new versioning strategy.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanrhu committed Oct 11, 2020
1 parent fbd397c commit e53b869
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion gdbfrontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
23 changes: 14 additions & 9 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import json
import base64
import subprocess
import time

import config
config.init()
Expand Down Expand Up @@ -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.)")
Expand All @@ -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],
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion statics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Licensed under GNU/GPLv3
# Copyright (C) 2019, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) <rohanrhu2@gmail.com>

VERSION = [0, 1, 4, "beta"]
VERSION = [0, 2, 0, "beta"]
VERSION_STRING = "v"+".".join([str(i) for i in VERSION[:-1]])+"-"+VERSION[-1]

"""
Expand Down

0 comments on commit e53b869

Please sign in to comment.