| Summary: | CDT issues "auto-solib-add on" command to gdb with invalid syntax | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Andras Varga <andras> | ||||||
| Component: | cdt-debug-cdi-gdb | Assignee: | Nobody - feel free to take it <nobody> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Elena Laskavaia <elaskavaia.cdt> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cdtdoug, daniel_megert, eleazar4291, marc.khouzam, nobody, pawel.1.piech, praveen.bahl, vivkong | ||||||
| Version: | 8.0 | Flags: | nobody:
iplog-
|
||||||
| Target Milestone: | 8.1.2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Andras Varga
The error only appears if "GDB command set" is "CygWin". Bug refers to the "Standard Process Launcher" (only that one has the "GDB command set" combo box). Any plan to fix this as one of our client has reported similar issue Undefined command: "auto-solib-add". Try "help". At the time when this code was written there was no support for shared libraries on Windows. The message you see in the console is the result of a (rather clumsy) way to suppress 'set auto-solib-add'. It doesn't affect the debugging and should be ignored. Enabling 'set auto-solib-add' is simple but it would open a whole can of worms. We simply don't have enough resources to do this work and are focused on DSF/GDB which I would recommend. Hi Mikhail, can we suppress the message this way for Cygwin?
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
index f923654..f62b788 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 QNX Software Systems and others.
+ * Copyright (c) 2000, 2012 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -45,6 +45,7 @@
import org.eclipse.cdt.debug.mi.core.command.MIGDBShow;
import org.eclipse.cdt.debug.mi.core.command.MIGDBShowSolibSearchPath;
import org.eclipse.cdt.debug.mi.core.command.MIInfoSharedLibrary;
+import org.eclipse.cdt.debug.mi.core.command.factories.win32.CygwinCommandFactory;
import org.eclipse.cdt.debug.mi.core.event.MIBreakpointCreatedEvent;
import org.eclipse.cdt.debug.mi.core.event.MIEvent;
import org.eclipse.cdt.debug.mi.core.event.MISharedLibChangedEvent;
@@ -273,6 +274,9 @@
public void setAutoLoadSymbols(Target target, boolean set) throws CDIException {
MISession mi = target.getMISession();
CommandFactory factory = mi.getCommandFactory();
+ if (factory instanceof CygwinCommandFactory) {
+ return;
+ }
MIGDBSetAutoSolib solib = factory.createMIGDBSetAutoSolib(set);
try {
mi.postCommand(solib);
Created attachment 221792 [details]
Proposed fix.
Hi Vivien, the attached patch should suppress the error message. I don't have environment to test it properly. Can you give it a try and commit it if it works?
Thanks
(In reply to comment #6) > Created attachment 221792 [details] > Proposed fix. > > Hi Vivien, the attached patch should suppress the error message. I don't > have environment to test it properly. Can you give it a try and commit it if > it works? > Thanks Thanks a lot Mikhail. I don't see that error message anymore. I'll commit this. (In reply to comment #7) > Thanks a lot Mikhail. I don't see that error message anymore. I'll commit > this. Actually my company policy does not allow me to commit code from other companies. Can you please commit this to cdt_8_1 and master please? Thanks! Created attachment 221845 [details]
Fix without API changes
The patch is modified to avoid API changes and committed to master and cdt_8_1. Vivian, please try it and let me know if something is wrong. (In reply to comment #10) > The patch is modified to avoid API changes and committed to master and > cdt_8_1. Vivian, please try it and let me know if something is wrong. Thanks Mikhail. Everything looks good. How I can get this patch ? Can someone provide me the details ? *** cdt git genie on behalf of Mikhail Khodjaiants ***
Bug 363688 - CDT issues "auto-solib-add on" command to gdb with invalid
syntax
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=afda71bc567c7da5dbabce59d8182385d923d0c2
*** cdt git genie on behalf of Mikhail Khodjaiants ***
Bug 363688 - CDT issues "auto-solib-add on" command to gdb with invalid
syntax
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=c14712793d0702fb9ddd0f719cd1994e6917a0b0
*** cdt git genie on behalf of Mikhail Khodjaiants ***
Bug 363688 - CDT issues "auto-solib-add on" command to gdb with invalid
syntax - backport to cdt_7_0
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=2e9b12047437c06d8119c95cce9d61a7b919d325
|