Because of our build environment we need to jump through some odd hoops to use GDB in slickedit.
Attaching to a running process works well, but we are working on ways to start the debugger and automatically attach (rather than adding code, for instance, to stall a short lived processes long enough to attach).
We have a _command debug_myprogram() that calls debug_executable() with the correct arguments.
We also have a shell script that looks like this:
/opt/slickedit/bin/vs +new -r debug-myprogram $1 $2
The above works, but always invokes a new instance of SE.
Reading the documentation for Invocation Options it looks like we should be able to send this to the already running instance of SE.
+ or -new
Indicates whether a new instance of the editor should be created or if the existing instance should process the command line parameters. +new creates a new instance. Default is -new.
Execute command with arguments given and remain resident. No other options or file names can be specified after this option since the rest of the command line is assumed to be the program name and space-delimited arguments for this option.
When I read these togeather it sounds like removing the "+new" (or even an explicit "-new") should give us what we want:
/opt/slickedit/bin/vs -new -r debug-myprogram $1 $2
instead, this opens 3 new buffers in the current instance of SE "debug-myprogram" "arg1" "arg2" and immediately exits.
Any ideas on how to do what I want?
Are the options "-new" and "-r" mutually exclusive?