summaryrefslogtreecommitdiff
path: root/gpsfake
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2018-12-27 13:02:39 -0800
committerFred Wright <fw@fwright.net>2018-12-27 20:35:21 -0800
commite4f2c497ddf858d8a05c916392d8a031f057d850 (patch)
tree87126abfe338f6e7914ad6f74de510d1e353681b /gpsfake
parentadacc2331d51fce112bd5ad4a57d0a24f8adb11d (diff)
downloadgpsd-e4f2c497ddf858d8a05c916392d8a031f057d850.tar.gz
gpsfake: Add option for debugging with lldb.
This adds the -G option, which is like the -g option but using lldb rather than gdb. It's not quite equivalent, since lldb doesn't have the "-tui" option, although some versions of lldb have a gui mode that can be entered via command. TESTED: Verified that -G launches with lldb as expected.
Diffstat (limited to 'gpsfake')
-rwxr-xr-xgpsfake9
1 files changed, 7 insertions, 2 deletions
diff --git a/gpsfake b/gpsfake
index 090e5600..9d613ccd 100755
--- a/gpsfake
+++ b/gpsfake
@@ -140,6 +140,7 @@ if __name__ == '__main__':
[-c cycle] sets the delay between sentences in seconds
[-D debug] passes a -D option to the daemon
[-g] run the gpsd instance within gpsfake under control of gdb
+ [-G] run the gpsd instance within gpsfake under control of lldb
[-h] print a usage message and exit
[-i] single-stepping through logfile
[-l] dump a line or packet number just before each sentence
@@ -162,8 +163,10 @@ if __name__ == '__main__':
raise SystemExit(0)
try:
- (options, arguments) = getopt.getopt(sys.argv[1:],
- "1bc:D:ghilm:no:pP:qr:s:StTuvxVW:")
+ (options, arguments) = getopt.getopt(
+ sys.argv[1:],
+ "1bc:D:gGhilm:no:pP:qr:s:StTuvxVW:"
+ )
except getopt.GetoptError as msg:
print("gpsfake: " + str(msg))
raise SystemExit(1)
@@ -197,6 +200,8 @@ if __name__ == '__main__':
doptions += " -D " + val
elif switch == '-g':
monitor = "xterm -e gdb -tui --args "
+ elif switch == '-G':
+ monitor = "xterm -e lldb -- "
elif switch == '-h':
usage()
elif switch == '-i':