Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #494246 +++ (In reply to Richard Ramos from Bug #494246 comment #13) > I know the status for this Bug is resolved but I just installed eclipse > Neon. I'm running CDT 9.2.1.201703062208 on a MAC and I'm seeing the problem > with the single quotes. I'm running the same version on linux which isn't > experiencing the issue. Richard, can you expand on the failure in this new bug. The regression, AFAIK, was caused when command line handling was updated for Linux in Bug 474648. Bug 474648 had an incorrect assumption that Bash was always the shell used by GDB to launch inferior. That is certainly not the case on Windows, and Bug 494246 was to fix the regression caused on Windows. This bug is to fix the regression caused on Mac. Specifically Richard I need to know the GDB version and how you are installing/using it. Is this cross-compilation or host debug?
Jonah, Because of the gdb issues on the MAC, some time ago I switched to using lldbmi2. I was using version 1.0.114 but found that a commit on May 4, 2016 removed the quotes from the command line so I switched to a 1.0.26 build and I can now debug. So it looks like the quotes are being passed into the debugger and being removed there. I'm not sure what the current state of affairs are regarding gdb on the MAC so I took the path of least resistance (for me) to debugging. Hope this helps.
(In reply to Richard Ramos from comment #1) > Hope this helps. Yes, thank you.
This bug (or something closely related) is causing us grief with Neon 4.6.3 / CDT 9.2.1.201703062208 under Windows 10: 295,828 (gdb) 395,334 56-break-insert --thread-group i1 -f C:\\Users\\donkey\\workspace_me04\\EVK_Demo\\main.c:142\ 395,343 &"No source file named C:\\\\Users\\\\donkey\\\\workspace_me04\\\\EVK_Demo\\\\main.c.\n" 395,344 56^done,bkpt={number="7",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending=\ "C:\\\\Users\\\\donkey\\\\workspace_me04\\\\EVK_Demo\\\\main.c:142",times="0",original-location="C:\\ \\\Users\\\\donkey\\\\workspace_me04\\\\EVK_Demo\\\\main.c:142"} 395,344 (gdb) It appears that something escaped the first backslash, and then another something escaped each of the two backslashes again.
Disregard the comment on this bug. I was in the wrong tab. :-( I will comment on bug #507569, instead.
I also found this bug while I'm debugging with some arguments option. I'm using gdb 7.12.1, Eclipse Neon 4.6.3, macOS Sierra 10.12.5 It passed the single quotes with my arguments. For example, in Arguments tab, I put: arg1 arg2 but when debugging, it looks like: 'arg1' 'arg2' My workaround is trying to set the arguments in .gdbinit file instead, just put the line like: ------------------- set args arg1 arg2 ------------------- And then, it works fine!
It's still broken in Oxygen.1A Build id 20171005-1200 macOS 10.12.6 (Sierra) the CDT Features are version 9.3.2.201709131603 gdb version 8.0.1 The symptom is very simple. When a C project/program with command line arguments is run from the Run button with a Run Configuration, all of the command line arguments are as specified in the Arguments tab of the Run Configuration, everything is normal. However, when the same C project/program is run from the Bug button with the same command line arguments in the Debug Configuration, then each argument that is passed in the argv array to main() is enclosed in single quote characters. I grok why nobody else is reporting this bug - going through the certificate assignment process for gdb to make it work in macOS Sierra is a major pain. My workaround is to add ugly code to the argv processing to check for the single quotes and remove them if they exist (which precludes using single quoted arguments, but that's not an issue for me).
I can confirm that it is still broken... Version: Oxygen.2 Release (4.7.2) Build id: 20171218-0600 Eclipse CDT Version: 9.4.0.201712051550 macOS 10.12.6 (Sierra) gdb version 8.0.1
I can confirm that this is still a problem. After fighting through the mac issues after apple stopped supporting gdb (certificate creation, code signing, etc.) I was able to kick off a gdb session and found that I'm still seeing the arguments enclosed in single quotes. I'm running macOS Mojave (version 10.14.5). I'm running gdb 8.3 installed (as ggdb) via macports. I'm running eclipse Version: 2019-03 (4.11.0) Build id: 20190314-1200 and CDT Version: 9.7.2.201904300035. I'm building natively (not cross-compiling) and debugging on the mac.
I confirm that this still is a problem with CDT 9.9.0. I am seeing the arguments enclosed in single quotes with the following setup: - macOS Mojave (10.14.6) - gdb 8.3 installed via Homebrew - Eclipse 2019-09 R (4.13.0) - Build id 20190917-1200 - CDT 9.9.0.201909091956
still present on CDT 2020.3 MacOS Catalina gdb 9.3 Eclipse CDT Eclipse C/C++ Development Tools 9.11.0.202003091030 org.eclipse.cdt