Home » Language IDEs » C / C++ IDE (CDT) » CDT2.1: Execution is suspended because of error
CDT2.1: Execution is suspended because of error [message #133872] |
Fri, 07 January 2005 11:42  |
Eclipse User |
|
|
|
Hi,
I just switch to CDT2.1 but I can't launch a debug session.
I have the following message box:
"Execution is suspended because of error"
"The program is not being run"
This plugin works fine with CDT2.0.2.
Has someone got any idea ?
Thanks
Jerome
|
|
| |
Re: CDT2.1: Execution is suspended because of error [message #134161 is a reply to message #133946] |
Mon, 10 January 2005 08:38   |
Eclipse User |
|
|
|
Below is an extract of the backtrace.
The problem seems to be due to the command "13-exec-continue".
With CDT 2.0.2, it wasn't an exec-continue but an "exec-run" that was sent.
The exec-run download the code, but not the exec-continue, so gdb can't
continue because the program isn't downloaded.
[1,105,363,619,172] D:\SX_Tool_Set_1_0_0_Beta\bin.win\sxgdb.exe
--target=default --cd=D:\BETA-Eclipse-3.0.1-SDK\workspace\hanoi
--command=.gdbinit -q -nw -i mi1
D:\BETA-Eclipse-3.0.1-SDK\workspace\han\oi\Debug\hanoi.out
[1,105,363,623,281] 1-gdb-set confirm off
[1,105,363,623,297] 1^done
[1,105,363,623,297] 2-gdb-set width 0
[1,105,363,623,297] (gdb)
[1,105,363,623,328] 2^done
[1,105,363,623,328] (gdb)
[1,105,363,623,328] 3-gdb-set height 0
[1,105,363,623,328] 3^done
[1,105,363,623,328] (gdb)
[1,105,363,623,328] 4-interpreter-exec console echo
[1,105,363,623,328] 4^done
[1,105,363,623,328] (gdb)
[1,105,363,623,343] 5-gdb-show prompt
[1,105,363,623,343] 5^done,value="(sxgdb) "
[1,105,363,623,343] (gdb)
[1,105,363,623,343] 6-stack-list-frames
[1,105,363,623,343]
6^done,stack=[frame={level="0",addr="0x00400000",func="_start "}]
[1,105,363,623,343] (gdb)
[1,105,363,623,343] 7 info program
[1,105,363,623,343] &"info program\n"
[1,105,363,623,343] ~"\tPath to gdb: 'D:/SX_Tool_Set_1_0_0_Beta/bin.win'\n"
[1,105,363,623,359] ~"\tAttached to stgdi using target default\n"
[1,105,363,623,359] ~"\tRunning program
D:/BETA-Eclipse-3.0.1-SDK/workspace/hanoi/Debug/hanoi.out\n"
[1,105,363,623,359] ~"Program stopped at 0x0.\n"
[1,105,363,623,359] ~"Type \"info stack\" or \"info registers\" for more
information.\n"
[1,105,363,623,359] 7^done
[1,105,363,623,359] (gdb)
[1,105,363,623,515] 8-gdb-set auto-solib-add on
[1,105,363,623,515] &"No symbol table is loaded. Use the \"file\"
command.\n"
[1,105,363,623,515] 8^error,msg="No symbol table is loaded. Use the
\"file\" command."
[1,105,363,623,515] (gdb)
[1,105,363,623,609] 9-environment-cd
D:\BETA-Eclipse-3.0.1-SDK\workspace\hanoi
[1,105,363,623,640] 9^done
[1,105,363,623,640] (gdb)
[1,105,363,623,828] 10 info threads
[1,105,363,623,828] &"info threads\n"
[1,105,363,623,843] ~"* 1 context 0 (Context 0, priviledge, running) "
[1,105,363,623,859] &"warning: Couldn't restore frame in current thread,
at frame 0\n"
[1,105,363,623,859]
10^done,frame={addr="0x00400000",func="_start",args=[]},frame={addr= "0x00400000",func="_start",args=[]}
[1,105,363,623,875] (gdb)
[1,105,363,624,109] 11-break-insert -t main
[1,105,363,624,156]
11^done,bkpt={number="1",type="breakpoint",disp="del",enabled= "y",addr="0x0040015c",at="<main>",times="0"}
[1,105,363,624,172] (gdb)
[1,105,363,624,172] 12-break-insert hanoi.s:49
[1,105,363,624,172] &"No symbol table is loaded. Use the \"file\"
command.\n"
[1,105,363,624,172] 12^error,msg="No symbol table is loaded. Use the
\"file\" command."
[1,105,363,624,172] (gdb)
[1,105,363,624,172] 13-exec-continue
[1,105,363,624,172] 13^running
[1,105,363,624,172] (gdb)
[1,105,363,624,187] &"The program is not being run.\n"
[1,105,363,624,187] 13^error,msg="The program is not being run."
[1,105,363,624,203] (gdb)
alain wrote:
> jerome correnoz wrote:
>> Hi,
>> I just switch to CDT2.1 but I can't launch a debug session.
>> I have the following message box:
>> "Execution is suspended because of error"
>> "The program is not being run"
>> This plugin works fine with CDT2.0.2.
>> Has someone got any idea ?
> Do yo have a .log file handy to examine the error,
> or at least a backtrace
> Thanks.
|
|
|
Re: CDT2.1: Execution is suspended because of error [message #134238 is a reply to message #134161] |
Mon, 10 January 2005 12:38   |
Eclipse User |
|
|
|
Originally posted by: alain.nowhere.ca
jerome correnoz wrote:
> Below is an extract of the backtrace.
> The problem seems to be due to the command "13-exec-continue".
> With CDT 2.0.2, it wasn't an exec-continue but an "exec-run" that was sent.
> The exec-run download the code, but not the exec-continue, so gdb can't
> continue because the program isn't downloaded.
Bizarre, it seems to get the state wrong. Can you try a few
things for me:
- could add this line in a ".gdbinit" file something like
-gdb-set prompt (gdb)
I think this :
> [1,105,363,623,343] 5-gdb-show prompt
> [1,105,363,623,343] 5^done,value="(sxgdb) "
may confuse the parser.
I am assuming your launch is a normal debug run.
And lets make a PR of this so we can track it down and
we could make sure it will be fix for the next release.
Thanks
> [1,105,363,619,172] D:SX_Tool_Set_1_0_0_Betabin.winsxgdb.exe
> --target=default --cd=D:BETA-Eclipse-3.0.1-SDKworkspacehanoi
> --command=.gdbinit -q -nw -i mi1
> D:BETA-Eclipse-3.0.1-SDKworkspacehanoiDebughanoi.out
> [1,105,363,623,281] 1-gdb-set confirm off
> [1,105,363,623,297] 1^done
> [1,105,363,623,297] 2-gdb-set width 0
> [1,105,363,623,297] (gdb)
> [1,105,363,623,328] 2^done
> [1,105,363,623,328] (gdb)
> [1,105,363,623,328] 3-gdb-set height 0
> [1,105,363,623,328] 3^done
> [1,105,363,623,328] (gdb)
> [1,105,363,623,328] 4-interpreter-exec console echo
> [1,105,363,623,328] 4^done
> [1,105,363,623,328] (gdb)
> [1,105,363,623,343] 5-gdb-show prompt
> [1,105,363,623,343] 5^done,value="(sxgdb) "
> [1,105,363,623,343] (gdb)
> [1,105,363,623,343] 6-stack-list-frames
> [1,105,363,623,343]
> 6^done,stack=[frame={level="0",addr="0x00400000",func="_start "}]
> [1,105,363,623,343] (gdb)
> [1,105,363,623,343] 7 info program
> [1,105,363,623,343] &"info programn"
> [1,105,363,623,343] ~"tPath to gdb: 'D:/SX_Tool_Set_1_0_0_Beta/bin.win'n"
> [1,105,363,623,359] ~"tAttached to stgdi using target defaultn"
> [1,105,363,623,359] ~"tRunning program
> D:/BETA-Eclipse-3.0.1-SDK/workspace/hanoi/Debug/hanoi.outn"
> [1,105,363,623,359] ~"Program stopped at 0x0.n"
> [1,105,363,623,359] ~"Type "info stack" or "info registers" for more
> information.n"
> [1,105,363,623,359] 7^done
> [1,105,363,623,359] (gdb)
> [1,105,363,623,515] 8-gdb-set auto-solib-add on
> [1,105,363,623,515] &"No symbol table is loaded. Use the "file"
> command.n"
> [1,105,363,623,515] 8^error,msg="No symbol table is loaded. Use the
> "file" command."
> [1,105,363,623,515] (gdb)
> [1,105,363,623,609] 9-environment-cd
> D:BETA-Eclipse-3.0.1-SDKworkspacehanoi
> [1,105,363,623,640] 9^done
> [1,105,363,623,640] (gdb)
> [1,105,363,623,828] 10 info threads
> [1,105,363,623,828] &"info threadsn"
> [1,105,363,623,843] ~"* 1 context 0 (Context 0, priviledge, running) "
> [1,105,363,623,859] &"warning: Couldn't restore frame in current thread,
> at frame 0n"
> [1,105,363,623,859]
>
10^done,frame={addr="0x00400000",func="_start",args=[]},frame={addr= "0x00400000",func="_start",args=[]}
> [1,105,363,623,875] (gdb)
> [1,105,363,624,109] 11-break-insert -t main
> [1,105,363,624,156]
>
11^done,bkpt={number="1",type="breakpoint",disp="del",enabled= "y",addr="0x0040015c",at="<main>",times="0"}
> [1,105,363,624,172] (gdb)
> [1,105,363,624,172] 12-break-insert hanoi.s:49
> [1,105,363,624,172] &"No symbol table is loaded. Use the "file"
> command.n"
> [1,105,363,624,172] 12^error,msg="No symbol table is loaded. Use the
> "file" command."
> [1,105,363,624,172] (gdb)
> [1,105,363,624,172] 13-exec-continue
> [1,105,363,624,172] 13^running
> [1,105,363,624,172] (gdb)
> [1,105,363,624,187] &"The program is not being run.n"
> [1,105,363,624,187] 13^error,msg="The program is not being run."
> [1,105,363,624,203] (gdb)
> alain wrote:
>> jerome correnoz wrote:
>>> Hi,
>>> I just switch to CDT2.1 but I can't launch a debug session.
>>> I have the following message box:
>>> "Execution is suspended because of error"
>>> "The program is not being run"
>>> This plugin works fine with CDT2.0.2.
>>> Has someone got any idea ?
>> Do yo have a .log file handy to examine the error,
>> or at least a backtrace
>> Thanks.
|
|
|
Re: CDT2.1: Execution is suspended because of error [message #134277 is a reply to message #134161] |
Mon, 10 January 2005 15:59   |
Eclipse User |
|
|
|
Originally posted by: alain.nowhere.ca
jerome correnoz wrote:
> Below is an extract of the backtrace.
> The problem seems to be due to the command "13-exec-continue".
> With CDT 2.0.2, it wasn't an exec-continue but an "exec-run" that was sent.
> The exec-run download the code, but not the exec-continue, so gdb can't
> continue because the program isn't downloaded.
Looking again at the trace, it looks like it is a program
that you are tryin to attach to:
[1,105,363,623,343] 7 info program
[1,105,363,623,343] &"info program\n"
[1,105,363,623,343] ~"\tPath to gdb: 'D:/SX_Tool_Set_1_0_0_Beta/bin.win'\n"
[1,105,363,623,359] ~"\tAttached to stgdi using target default\n"
[1,105,363,623,359] ~"\tRunning program
D:/BETA-Eclipse-3.0.1-SDK/workspace/hanoi/Debug/hanoi.out\n"
[1,105,363,623,359] ~"Program stopped at 0x0.\n"
[1,105,363,623,359] ~"Type \"info stack\" or \"info registers\" for more
information.\n"
[1,105,363,623,359] 7^done
[1,105,363,623,359] (gdb)
Meaning according to the trace here the application hanoi.out
was already loaded ("Program stopped at 0x0").
CDT see this and will not do the "run" command
but rather the "continue".
Try to use a different launch, do you something in your ".gdbinit"
doing some attach or other commands ?
> [1,105,363,619,172] D:SX_Tool_Set_1_0_0_Betabin.winsxgdb.exe
> --target=default --cd=D:BETA-Eclipse-3.0.1-SDKworkspacehanoi
> --command=.gdbinit -q -nw -i mi1
> D:BETA-Eclipse-3.0.1-SDKworkspacehanoiDebughanoi.out
> [1,105,363,623,281] 1-gdb-set confirm off
> [1,105,363,623,297] 1^done
> [1,105,363,623,297] 2-gdb-set width 0
> [1,105,363,623,297] (gdb)
> [1,105,363,623,328] 2^done
> [1,105,363,623,328] (gdb)
> [1,105,363,623,328] 3-gdb-set height 0
> [1,105,363,623,328] 3^done
> [1,105,363,623,328] (gdb)
> [1,105,363,623,328] 4-interpreter-exec console echo
> [1,105,363,623,328] 4^done
> [1,105,363,623,328] (gdb)
> [1,105,363,623,343] 5-gdb-show prompt
> [1,105,363,623,343] 5^done,value="(sxgdb) "
> [1,105,363,623,343] (gdb)
> [1,105,363,623,343] 6-stack-list-frames
> [1,105,363,623,343]
> 6^done,stack=[frame={level="0",addr="0x00400000",func="_start "}]
> [1,105,363,623,343] (gdb)
> [1,105,363,623,343] 7 info program
> [1,105,363,623,343] &"info programn"
> [1,105,363,623,343] ~"tPath to gdb: 'D:/SX_Tool_Set_1_0_0_Beta/bin.win'n"
> [1,105,363,623,359] ~"tAttached to stgdi using target defaultn"
> [1,105,363,623,359] ~"tRunning program
> D:/BETA-Eclipse-3.0.1-SDK/workspace/hanoi/Debug/hanoi.outn"
> [1,105,363,623,359] ~"Program stopped at 0x0.n"
> [1,105,363,623,359] ~"Type "info stack" or "info registers" for more
> information.n"
> [1,105,363,623,359] 7^done
> [1,105,363,623,359] (gdb)
> [1,105,363,623,515] 8-gdb-set auto-solib-add on
> [1,105,363,623,515] &"No symbol table is loaded. Use the "file"
> command.n"
> [1,105,363,623,515] 8^error,msg="No symbol table is loaded. Use the
> "file" command."
> [1,105,363,623,515] (gdb)
> [1,105,363,623,609] 9-environment-cd
> D:BETA-Eclipse-3.0.1-SDKworkspacehanoi
> [1,105,363,623,640] 9^done
> [1,105,363,623,640] (gdb)
> [1,105,363,623,828] 10 info threads
> [1,105,363,623,828] &"info threadsn"
> [1,105,363,623,843] ~"* 1 context 0 (Context 0, priviledge, running) "
> [1,105,363,623,859] &"warning: Couldn't restore frame in current thread,
> at frame 0n"
> [1,105,363,623,859]
>
10^done,frame={addr="0x00400000",func="_start",args=[]},frame={addr= "0x00400000",func="_start",args=[]}
> [1,105,363,623,875] (gdb)
> [1,105,363,624,109] 11-break-insert -t main
> [1,105,363,624,156]
>
11^done,bkpt={number="1",type="breakpoint",disp="del",enabled= "y",addr="0x0040015c",at="<main>",times="0"}
> [1,105,363,624,172] (gdb)
> [1,105,363,624,172] 12-break-insert hanoi.s:49
> [1,105,363,624,172] &"No symbol table is loaded. Use the "file"
> command.n"
> [1,105,363,624,172] 12^error,msg="No symbol table is loaded. Use the
> "file" command."
> [1,105,363,624,172] (gdb)
> [1,105,363,624,172] 13-exec-continue
> [1,105,363,624,172] 13^running
> [1,105,363,624,172] (gdb)
> [1,105,363,624,187] &"The program is not being run.n"
> [1,105,363,624,187] 13^error,msg="The program is not being run."
> [1,105,363,624,203] (gdb)
|
|
|
Re: CDT2.1: Execution is suspended because of error [message #134316 is a reply to message #134277] |
Tue, 11 January 2005 03:12   |
Eclipse User |
|
|
|
I've found what the problem is.
Actually, in MIPlugin.java, createCSession method, there is a test to
detect if we have been attach/connected and set the state to be suspended.
To do this test, you send to gdb the command: "-stack-list-frames" instead
of
"info remote-process" as previously done with CDT 2.0.2.
- With CDT 2.0.2, the test command returns an error, so the next
'resume' command will be "exec-run".
- With CDT 2.1, the test command returns something because with our
debugger, we are connected but the program is not yet downloaded (it will
be downloaded with first run), so the state is set to SUSPENDED and the
next 'resume' will be "exec-continue".
I've resolved my problem by replacing the test command with the CDT2.0.2
one (info remote-process). Now, it works fine.
In conclusion, with some debuggers like ours, the used test detect command
(-stack-list-frames) may return something even if program is not yet
downloaded. Maybe, another command could be used instead of this one.
alain wrote:
> jerome correnoz wrote:
>> Below is an extract of the backtrace.
>> The problem seems to be due to the command "13-exec-continue".
>> With CDT 2.0.2, it wasn't an exec-continue but an "exec-run" that was sent.
>> The exec-run download the code, but not the exec-continue, so gdb can't
>> continue because the program isn't downloaded.
> Looking again at the trace, it looks like it is a program
> that you are tryin to attach to:
> [1,105,363,623,343] 7 info program
> [1,105,363,623,343] &"info programn"
> [1,105,363,623,343] ~"tPath to gdb: 'D:/SX_Tool_Set_1_0_0_Beta/bin.win'n"
> [1,105,363,623,359] ~"tAttached to stgdi using target defaultn"
> [1,105,363,623,359] ~"tRunning program
> D:/BETA-Eclipse-3.0.1-SDK/workspace/hanoi/Debug/hanoi.outn"
> [1,105,363,623,359] ~"Program stopped at 0x0.n"
> [1,105,363,623,359] ~"Type "info stack" or "info registers" for more
> information.n"
> [1,105,363,623,359] 7^done
> [1,105,363,623,359] (gdb)
> Meaning according to the trace here the application hanoi.out
> was already loaded ("Program stopped at 0x0").
> CDT see this and will not do the "run" command
> but rather the "continue".
> Try to use a different launch, do you something in your ".gdbinit"
> doing some attach or other commands ?
>> [1,105,363,619,172] D:SX_Tool_Set_1_0_0_Betabin.winsxgdb.exe
>> --target=default --cd=D:BETA-Eclipse-3.0.1-SDKworkspacehanoi
>> --command=.gdbinit -q -nw -i mi1
>> D:BETA-Eclipse-3.0.1-SDKworkspacehanoiDebughanoi.out
>> [1,105,363,623,281] 1-gdb-set confirm off
>> [1,105,363,623,297] 1^done
>> [1,105,363,623,297] 2-gdb-set width 0
>> [1,105,363,623,297] (gdb)
>> [1,105,363,623,328] 2^done
>> [1,105,363,623,328] (gdb)
>> [1,105,363,623,328] 3-gdb-set height 0
>> [1,105,363,623,328] 3^done
>> [1,105,363,623,328] (gdb)
>> [1,105,363,623,328] 4-interpreter-exec console echo
>> [1,105,363,623,328] 4^done
>> [1,105,363,623,328] (gdb)
>> [1,105,363,623,343] 5-gdb-show prompt
>> [1,105,363,623,343] 5^done,value="(sxgdb) "
>> [1,105,363,623,343] (gdb)
>> [1,105,363,623,343] 6-stack-list-frames
>> [1,105,363,623,343]
>> 6^done,stack=[frame={level="0",addr="0x00400000",func="_start "}]
>> [1,105,363,623,343] (gdb)
>> [1,105,363,623,343] 7 info program
>> [1,105,363,623,343] &"info programn"
>> [1,105,363,623,343] ~"tPath to gdb: 'D:/SX_Tool_Set_1_0_0_Beta/bin.win'n"
>> [1,105,363,623,359] ~"tAttached to stgdi using target defaultn"
>> [1,105,363,623,359] ~"tRunning program
>> D:/BETA-Eclipse-3.0.1-SDK/workspace/hanoi/Debug/hanoi.outn"
>> [1,105,363,623,359] ~"Program stopped at 0x0.n"
>> [1,105,363,623,359] ~"Type "info stack" or "info registers" for more
>> information.n"
>> [1,105,363,623,359] 7^done
>> [1,105,363,623,359] (gdb)
>> [1,105,363,623,515] 8-gdb-set auto-solib-add on
>> [1,105,363,623,515] &"No symbol table is loaded. Use the "file"
>> command.n"
>> [1,105,363,623,515] 8^error,msg="No symbol table is loaded. Use the
>> "file" command."
>> [1,105,363,623,515] (gdb)
>> [1,105,363,623,609] 9-environment-cd
>> D:BETA-Eclipse-3.0.1-SDKworkspacehanoi
>> [1,105,363,623,640] 9^done
>> [1,105,363,623,640] (gdb)
>> [1,105,363,623,828] 10 info threads
>> [1,105,363,623,828] &"info threadsn"
>> [1,105,363,623,843] ~"* 1 context 0 (Context 0, priviledge, running) "
>> [1,105,363,623,859] &"warning: Couldn't restore frame in current thread,
>> at frame 0n"
>> [1,105,363,623,859]
>>
>
10^done,frame={addr="0x00400000",func="_start",args=[]},frame={addr= "0x00400000",func="_start",args=[]}
>> [1,105,363,623,875] (gdb)
>> [1,105,363,624,109] 11-break-insert -t main
>> [1,105,363,624,156]
>>
>
11^done,bkpt={number="1",type="breakpoint",disp="del",enabled= "y",addr="0x0040015c",at="<main>",times="0"}
>> [1,105,363,624,172] (gdb)
>> [1,105,363,624,172] 12-break-insert hanoi.s:49
>> [1,105,363,624,172] &"No symbol table is loaded. Use the "file"
>> command.n"
>> [1,105,363,624,172] 12^error,msg="No symbol table is loaded. Use the
>> "file" command."
>> [1,105,363,624,172] (gdb)
>> [1,105,363,624,172] 13-exec-continue
>> [1,105,363,624,172] 13^running
>> [1,105,363,624,172] (gdb)
>> [1,105,363,624,187] &"The program is not being run.n"
>> [1,105,363,624,187] 13^error,msg="The program is not being run."
>> [1,105,363,624,203] (gdb)
|
|
|
Re: CDT2.1: Execution is suspended because of error [message #134468 is a reply to message #134316] |
Tue, 11 January 2005 17:01  |
Eclipse User |
|
|
|
Originally posted by: alain.nowhere.ca
jerome correnoz wrote:
> I've found what the problem is.
> Actually, in MIPlugin.java, createCSession method, there is a test to
> detect if we have been attach/connected and set the state to be suspended.
> To do this test, you send to gdb the command: "-stack-list-frames" instead
> of
> "info remote-process" as previously done with CDT 2.0.2.
> - With CDT 2.0.2, the test command returns an error, so the next
> 'resume' command will be "exec-run".
> - With CDT 2.1, the test command returns something because with our
> debugger, we are connected but the program is not yet downloaded (it will
> be downloaded with first run), so the state is set to SUSPENDED and the
> next 'resume' will be "exec-continue".
> I've resolved my problem by replacing the test command with the CDT2.0.2
> one (info remote-process). Now, it works fine.
> In conclusion, with some debuggers like ours, the used test detect command
> (-stack-list-frames) may return something even if program is not yet
> downloaded. Maybe, another command could be used instead of this one.
Sigh ... I'm open to suggestions, we change this ... because of the
problem you are reporting and the "info program" did not work
for some version of gdb. It was clear when the changes were done
it was the simplest solution, if you could list stackframes ... then
obviously the program was loaded in memory and the nex instruction
should be "continue" instead of "run".
So lets make a PR and so we can hammer or heads together to find
a viable solution for all in the next CDT-3.0 ...
|
|
|
Goto Forum:
Current Time: Thu May 08 14:49:43 EDT 2025
Powered by FUDForum. Page generated in 0.09979 seconds
|