| Summary: | Don't strip debug symbols from SWT | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Krzysztof Daniel <krzysztof.daniel> | ||||
| Component: | SWT | Assignee: | Matthias Mailänder <matthias.mailaender> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | akurtakov, arunkumar.thondapu, betelgeuse, ericwill, info, krzysztof.daniel, matthias.mailaender, Silenio_Quarti, sravankumarl | ||||
| Version: | 4.2 | Keywords: | triaged | ||||
| Target Milestone: | 4.9 M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| See Also: |
https://git.eclipse.org/r/124309 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=1df1be7c4bb508960a7308b328f53bdbc9cb769f |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
*** Bug 389862 has been marked as a duplicate of this bug. *** Any chance for this one? hey guys, any chance to get this into kepler? The -s option was added to reduce the size of the binaries. Adding the -g option will increase the size significantly as well. See below. I do not think we should do this for production builds. System libraries like gtk+ do not have symbols either. We could add a debug env var (i.e. SWT_DEBUG) to enable debug (like NO_STRIP), but it would be off by default. How useful would having symbols on the swt libraries given that they just wrap the OS APIs? Do you have a example of a stack with and without symbols? Size without -g and with -s options (as is today): -rw-rw-r-- 1 test test 473504 Jan 29 13:49 libswt-pi-gtk-4319.so Size without -g and without -s options: -rw-rw-r-- 1 test test 689680 Jan 29 13:50 libswt-pi-gtk-4319.so Size with -g and without -s options: -rw-rw-r-- 1 test test 1703776 Jan 29 13:50 libswt-pi-gtk-4319.so (In reply to comment #4) > How useful would having symbols on the swt libraries given that they just > wrap the OS APIs? Do you have a example of a stack with and without symbols? I get usually one report per week about Eclipse crash on Fedora 18 routed from java team with a message like: the problem is originating from swt/launcher. The problem is the root cause is not entirely Eclipse - it may be gtk or other libraries as well. The debugging infrastructure is needed in the first place. There is nothing worse than the message 'backtrace is unusable' due to the missing debug info. I'd go even for the optionally enabled SWT_DEBUG given that I could enable it via environment variable (as a part of maven CBI build). I suggest you make CFLAGS configurable with CFLAGS := CFLAGS [...] instead of overwriting them with hard-coded stuff. This way we can get rid of ugly patches like https://build.opensuse.org/package/view_file/Java:packages/eclipse-swt/libswt-optflags.patch?expand=1 that manually have to hack $(RPM_OPT_FLAGS) in. Linux distributions always want libraries to be compiled with debug symbols and strip them manually so they are stored in -debug packages and installed at users will. (In reply to Matthias Mailänder from comment #6) > I suggest you make CFLAGS configurable with CFLAGS := CFLAGS [...] instead > of overwriting them with hard-coded stuff. This way we can get rid of ugly > patches like > https://build.opensuse.org/package/view_file/Java:packages/eclipse-swt/ > libswt-optflags.patch?expand=1 that manually have to hack $(RPM_OPT_FLAGS) > in. Linux distributions always want libraries to be compiled with debug > symbols and strip them manually so they are stored in -debug packages and > installed at users will. I agree with this Matthias, please provide gerrit patch and once we are open for development again I'll push it. Created attachment 248682 [details] Don't strip by default and don't ignore system CFLAGS/LFLAGS Can't send you a merge request via Gerrit because of Bug 451701 at the moment. (In reply to Matthias Mailaender from comment #8) > Created attachment 248682 [details] > Don't strip by default and don't ignore system CFLAGS/LFLAGS > > Can't send you a merge request via Gerrit because of Bug 451701 at the > moment. Gerrit is open again, please push the patch there and someone will review it in a reasonable time frame. New Gerrit change created: https://git.eclipse.org/r/124309 Gerrit change https://git.eclipse.org/r/124309 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=1df1be7c4bb508960a7308b328f53bdbc9cb769f Thanks for the patch Mathias. *** Bug 165097 has been marked as a duplicate of this bug. *** |
Lack of debug symbols makes it difficult to debug crashes on Linux. Please add -g to CFLAGS --- make_linux.mak~ 2012-11-01 13:51:27.511025877 +0000 +++ make_linux.mak 2012-11-01 15:26:13.182270072 +0000 @@ -106,7 +106,7 @@ WEBKIT_OBJECTS = swt.o webkit.o webkit_structs.o webkit_stats.o GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o -CFLAGS = -O -Wall \ +CFLAGS = -g --O Wall \ -DSWT_VERSION=$(SWT_VERSION) \ $(NATIVE_STATS) \ -DLINUX -DGTK \ Other issue is that debug symbols are removed by using the -s flag in the same file >> -ifndef NO_STRIP >> - AWT_LFLAGS := $(AWT_LFLAGS) -s >> - MOZILLALFLAGS := $(MOZILLALFLAGS) -s >> - LFLAGS := $(LFLAGS) -s >> -endif It would be good to get rid off the whole NO_STRIP section or make it disabled (declare the NO_STRIP) by default.