Poster | Thread |
Hans
|  |
GCC debugging Posted on 15-Nov-2007 19:01:01
| | [ #1 ] |
|
|
 |
Elite Member  |
Joined: 27-Dec-2003 Posts: 5118
From: New Zealand | | |
|
| I removed the debugging symbols from the MiniGL binaries to make them smaller. However, if someone sends me a crashlog, I can't use it to lookup the line number that it crashed in. Does GCC support a system in which debugging information is put into a separate file so that I can still use addr2line with stripped binaries? That would be preferable to distributing versions with debugging information still present (which are several times larger).
Hans
_________________ Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner. https://keasigmadelta.com/ - see more of my work |
|
Status: Offline |
|
|
corto
|  |
Re: GCC debugging Posted on 15-Nov-2007 19:15:56
| | [ #2 ] |
|
|
 |
Regular Member  |
Joined: 24-Apr-2004 Posts: 342
From: Grenoble (France) | | |
|
| @Hans
I don't know if it's possible to use debugging information from a separate file ... maybe you could provide both versions with optimization and debugging stuff. So people can use the efficient version and if a problem happens, it is possible to use the debug version to send a report.
The best is to have a report that explains what was done and how the bug can be reproduced.
Ooops, I forgot to thank you for this effort on MiniGL !
Last edited by corto on 15-Nov-2007 at 07:16 PM.
|
|
Status: Offline |
|
|
Hans
|  |
Re: GCC debugging Posted on 15-Nov-2007 19:23:51
| | [ #3 ] |
|
|
 |
Elite Member  |
Joined: 27-Dec-2003 Posts: 5118
From: New Zealand | | |
|
| @corto
Visual studio writes the debug information (i.e., which line corresponds to where) to a separate file. The question is, does GCC. If it does, I'd prefer to use that method. Sometimes bugs disappear in the debug version, or are really hard to reproduce. Being able to use crashlogs from release versions would be a great help.
Hans
_________________ Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner. https://keasigmadelta.com/ - see more of my work |
|
Status: Offline |
|
|
Hans
|  |
Re: GCC debugging Posted on 15-Nov-2007 19:35:20
| | [ #4 ] |
|
|
 |
Elite Member  |
Joined: 27-Dec-2003 Posts: 5118
From: New Zealand | | |
|
| I may have found the answer to my own question. this link gives details on exactly what I'm looking for. So long as this works with the current SDK, I'm happy.
Hans
_________________ Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner. https://keasigmadelta.com/ - see more of my work |
|
Status: Offline |
|
|
TetiSoft
|  |
Re: GCC debugging Posted on 15-Nov-2007 19:35:49
| | [ #5 ] |
|
|
 |
Cult Member  |
Joined: 3-Mar-2005 Posts: 585
From: Germany | | |
|
| @Hans
$(NAME): $(OBJS) @echo "Linking $@" $(CC) -o $@.debug $(CFLAGS) $(LFLAGS) -nostartfiles -nostdlib $(OBJS) $(LIBS) -Wl,--cref,-M,-Map=$@.map $(STRIP) -R.comment -R.dstart -R.dend -R.data -R.sdata -R.sdata2 -R.bss -R.sbss $@.debug -o $@ protect $@ -e
Thats from a makefile for a library which doesnt contain any writable segment, you may need to adjust it. The basic idea is to create both MyProg.debug and MyProg and to keep the debug version for usage with addr2line and to distribute the stripped version.
|
|
Status: Offline |
|
|