@@ -765,18 +765,6 @@ def main():
765
765
security = parser .add_argument_group (title = "security settings" )
766
766
other = parser .add_argument_group (title = "other settings" )
767
767
768
- gdb_group .add_argument (
769
- "cmd" ,
770
- nargs = "*" ,
771
- help = "The binary and arguments to run in gdb. Example: './mybinary myarg -flag1 -flag2'" ,
772
- default = [],
773
- )
774
- gdb_group .add_argument (
775
- "--args" ,
776
- nargs = "+" ,
777
- help = 'Alias for cmd argument above. Example: gdbgui --args "./mybinary myarg -flag1 -flag2"' ,
778
- default = [],
779
- )
780
768
gdb_group .add_argument (
781
769
"-x" , "--gdb_cmd_file" , help = "Execute GDB commands from file."
782
770
)
@@ -858,12 +846,36 @@ def main():
858
846
help = "By default, the browser will open with gdbgui. Pass this flag so the browser does not open." ,
859
847
action = "store_true" ,
860
848
)
849
+ other .add_argument (
850
+ "-b" ,
851
+ "--browser" ,
852
+ help = "Use the given browser executable instead of the system default." ,
853
+ default = None ,
854
+ )
861
855
other .add_argument (
862
856
"--debug" ,
863
857
help = "The debug flag of this Flask application. "
864
858
"Pass this flag when debugging gdbgui itself to automatically reload the server when changes are detected" ,
865
859
action = "store_true" ,
866
860
)
861
+
862
+ gdb_group .add_argument (
863
+ "--args" ,
864
+ nargs = argparse .REMAINDER ,
865
+ help = 'All remaining args are taken as the binary and arguments to run'
866
+ ' in gdb (as with gdb --args).'
867
+ ' Example: gdbgui [...] --args ./mybinary myarg -flag1 -flag2' ,
868
+ default = [],
869
+ )
870
+ gdb_group .add_argument (
871
+ "cmd" ,
872
+ nargs = '?' ,
873
+ help = 'Name of the binary to run in gdb. To pass flags to the binary,'
874
+ ' use --args.'
875
+ ' Example: gdbgui ./mybinary [gdbgui-args...]' ,
876
+ default = [],
877
+ )
878
+
867
879
args = parser .parse_args ()
868
880
869
881
initialize_preferences ()
0 commit comments