Show GDB server stderr/stdout output when startup times out#634
Show GDB server stderr/stdout output when startup times out#634SnowyTulip wants to merge 1 commit intoeclipse-embed-cdt:developfrom
Conversation
laomaolaile
left a comment
There was a problem hiding this comment.
I have considered similar approaches, but the best solution would be to display these error messages directly in the Console. This approach would align well with the overall design and user experience of Embedded CDT (embed-cdt).
Can we do both? I mean always display these messages in the console in that peculiar condition, and also show them in the message box when the Details button is pressed? It might look redundant, but the OpenOCD console might not be on top to be easily visible and some users might have difficulties to open it, therefore the graphical solution is pretty convenient. |
|
Both will be great, if it is possible. |
Regarding displaying the error in the console:Below is how ((Launch) launch).initializeServerConsole(monitor); is used to attach a console. However, in the OpenOCD timeout detection task, using DebugPlugin.newProcess() as a way to output to the console is not appropriate — because we don’t intend to keep this process alive (in fact, it will be killed immediately by the timeout detection task 😂). Therefore, I think we should consider using Eclipse’s console-related APIs to create a temporary console and display the final message to the user. The downside is that creating a temporary console would introduce some code that looks somewhat redundant, and it would require importing the org.eclipse.console package, which feels quite out of place. |
|
I have difficulties to follow the details, things seem to get very complicated. :-( |
|
@ilg-ul |
Can we initialize the console earlier, and, when the exception is identified, retrieve the console output and print it? |
|
Hi, @ilg-ul
Solutions:
So far, I’m not sure how to resolve this issue. I’ll spend some time later thinking about whether there’s a more elegant solution. |




Issue: #630
Comparing with the develop branch:
outBufferanderrBufferto member variablesfStartupErrBufferandfStartupOutBuffer.getStartupOutput()method: This method combines and returns the strings fromfStartupErrBufferandfStartupOutBuffer.In the timeout check task, rm now outputs them.
Tested with: Eclipse Embedded CDT (2024-12) and Java 11 SE.