Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] How to input a string as arg of MI command?

You should use the "org.eclipse.cdt.debug.core.CDebugger" extension point to
provide your own implementation of "exec-run".
Openning an input dialog is not a good idea. If you need to pass additional
parameters to your debug session you should use the launch configuration
dialog. CDT provides the "org.eclipse.cdt.debug.ui.CDebuggerPage" extension
point that allows users to customize the "Debugger" page of the launch
configuration dialog.

----- Original Message ----- 
From: "Felix Yuan" <bigbrain_cn@xxxxxxx>
To: <cdt-debug-dev@xxxxxxxxxxx>
Sent: Tuesday, March 23, 2004 8:13 AM
Subject: [cdt-debug-dev] How to input a string as arg of MI command?


> Hi,
>
> The MI interface of My debugger is similar to the one of gdb, so I can use
> my debugger to replace gdb.
>
> But there are something different. One is that my -exec-run has a
argument.
> So I want to use an InputDialog to get a string from user. I noticed that
> when Target.restart() was called, a MIExecRun was created and posted to
> MISession. I inserted some code to get a string via an InputDialog before
> the command was created.
> The source is:
>
> try {
>     Shell shell = new Shell();
>     InputDialog dialog = new InputDialog(shell, "Label Dialog:", "Enter
the
> Label to start", null, null);
>     dialog.open();
>     String startLabel = dialog.getValue();
> }
> catch(Exception e){
>     e.printStackTrace();
> }
>
> But when I ran Run-time Workbench, the following error was displayed:
> Exception occurred during launch
> Reason:
>  Error within Debug UI:
>
> I set a breakpoint before my code, but it seemed that it was not
encountered
> before the error occurred.
>
> Please tell me how to use InputDialog in cdt.debug. Or is there another
good
> way to get a string from user when debugging?
>
> Thanks in advance.
>
> Sincerely yours,
>
> Felix
>
> _______________________________________________
> cdt-debug-dev mailing list
> cdt-debug-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>



Back to the top