How do I do a build without stripping the executable?

Discuss the future of Warzone 2100 with us.
nobby
Rookie
Rookie
Posts: 31
Joined: 09 Jul 2009, 23:26

How do I do a build without stripping the executable?

Post by nobby »

How does one do a MinGW build without stripping the executable - The only thing I could find was a 'strip' in the makefiles; removing it doesen't seem to have helped as the .rpt file doesn't have the symbols on the call stack -

Code: Select all

-------------------

Error occured on Sunday, July 26, 2009 at 15:24:57.

Program: E:\Dev\Warzone2100\trunk\Warzone2100.exe(warzone2100)
Command line: "E:\Dev\Warzone2100\trunk\Warzone2100.exe" 
Version: Version TRUNK r0 - Built Jul 26 2009 - DEBUG
Distributor: UNKNOWN
Compiled on: Jul 25 2009 20:46:30
Compiled by: GCC 3.4.5 (mingw-vista special r3)
Executed on: Sun Jul 26 12:41:30 2009

Pointers: 32bit

Compiled against PhysicsFS version: 1.0.1
Running with PhysicsFS version: 1.0.1

Misc Data:
[12:41:30]OpenGL Vendor : NVIDIA Corporation
[12:41:30]OpenGL Renderer : Quadro FX 1400/PCI/SSE2/3DNOW!
[12:41:30]OpenGL Version : 2.1.2
[12:41:31]OpenAL Vendor: Creative Labs Inc.
[12:41:31]OpenAL Version: 1.1
[12:41:31]OpenAL Renderer: Software
[12:41:31]Using language: System locale
[12:42:04]Current Level/map is Sk-cockate-T3


E:\Dev\Warzone2100\trunk\Warzone2100.exe caused a Breakpoint at location 77c35b61 in module C:\WINDOWS\system32\msvcrt.dll.

Log message: warning |12:41:45: [mapLoad] tileset not loaded, using arizona (map preview?)
Log message: error   |03:24:47: [gridRemoveObject] Grid out of sync at (0,11):14 removing Combat Engineer(185176)
Log message: error   |03:24:47: [gridRemoveObject] Assert in Warzone: mapgrid.c:236 (0), last script event: 'N/A'

Registers:
eax=00000004 ebx=00000003 ecx=00005a12 edx=00280000 esi=77c12d25 edi=00000001
eip=77c35b61 esp=0022f558 ebp=0022f898 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00200246

Call stack:
77C35B61  C:\WINDOWS\system32\msvcrt.dll:77C35B61  _assert
004AC492  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004AC492
0043FC97  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0043FC97
0054B701  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0054B701
004DE32D  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004DE32D
0044072A  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0044072A
004A2C5C  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004A2C5C
004A54EE  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004A54EE
004A58CF  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004A58CF
004A605E  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004A605E
0063E75A  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0063E75A
0063E942  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0063E942
0063E218  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0063E218
0040124B  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0040124B
004012B8  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004012B8
7C817077  C:\WINDOWS\system32\kernel32.dll:7C817077  RegisterWaitForInputIdle

Nigel.
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: How do I do a build without stripping the executable?

Post by Buginator »

nobby wrote:How does one do a MinGW build without stripping the executable - The only thing I could find was a 'strip' in the makefiles; removing it doesen't seem to have helped as the .rpt file doesn't have the symbols on the call stack -

Code: Select all

-------------------

Error occured on Sunday, July 26, 2009 at 15:24:57.

Program: E:\Dev\Warzone2100\trunk\Warzone2100.exe(warzone2100)
Command line: "E:\Dev\Warzone2100\trunk\Warzone2100.exe" 
Version: Version TRUNK r0 - Built Jul 26 2009 - DEBUG
Distributor: UNKNOWN
Compiled on: Jul 25 2009 20:46:30
Compiled by: GCC 3.4.5 (mingw-vista special r3)
Executed on: Sun Jul 26 12:41:30 2009

Pointers: 32bit

Compiled against PhysicsFS version: 1.0.1
Running with PhysicsFS version: 1.0.1

Misc Data:
[12:41:30]OpenGL Vendor : NVIDIA Corporation
[12:41:30]OpenGL Renderer : Quadro FX 1400/PCI/SSE2/3DNOW!
[12:41:30]OpenGL Version : 2.1.2
[12:41:31]OpenAL Vendor: Creative Labs Inc.
[12:41:31]OpenAL Version: 1.1
[12:41:31]OpenAL Renderer: Software
[12:41:31]Using language: System locale
[12:42:04]Current Level/map is Sk-cockate-T3


E:\Dev\Warzone2100\trunk\Warzone2100.exe caused a Breakpoint at location 77c35b61 in module C:\WINDOWS\system32\msvcrt.dll.

Log message: warning |12:41:45: [mapLoad] tileset not loaded, using arizona (map preview?)
Log message: error   |03:24:47: [gridRemoveObject] Grid out of sync at (0,11):14 removing Combat Engineer(185176)
Log message: error   |03:24:47: [gridRemoveObject] Assert in Warzone: mapgrid.c:236 (0), last script event: 'N/A'

Registers:
eax=00000004 ebx=00000003 ecx=00005a12 edx=00280000 esi=77c12d25 edi=00000001
eip=77c35b61 esp=0022f558 ebp=0022f898 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00200246

Call stack:
77C35B61  C:\WINDOWS\system32\msvcrt.dll:77C35B61  _assert
004AC492  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004AC492
0043FC97  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0043FC97
0054B701  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0054B701
004DE32D  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004DE32D
0044072A  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0044072A
004A2C5C  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004A2C5C
004A54EE  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004A54EE
004A58CF  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004A58CF
004A605E  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004A605E
0063E75A  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0063E75A
0063E942  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0063E942
0063E218  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0063E218
0040124B  E:\Dev\Warzone2100\trunk\Warzone2100.exe:0040124B
004012B8  E:\Dev\Warzone2100\trunk\Warzone2100.exe:004012B8
7C817077  C:\WINDOWS\system32\kernel32.dll:7C817077  RegisterWaitForInputIdle

Nigel.
AFAIK, don't use the strip utility, and use the -g flag to keep debug info. (for gcc)

Test by running the application with --crash command line option.
and it ends here.
nobby
Rookie
Rookie
Posts: 31
Joined: 09 Jul 2009, 23:26

Re: How do I do a build without stripping the executable?

Post by nobby »

If the binary did have symbols, I presume the stack trace would actually have symbol info in it.

I think what I'm building has symbols in it. If I add -s to WZ_LDFLAGS the binary goes from 14MB to 6MB. Should the stack trace in the rpt file have symbol info like:

Code: Select all

Call stack:
0042F6A8  e:\Dev\Warzone2100\trunk\Warzone2100.exe:foo
0043AC4D  e:\Dev\Warzone2100\trunk\Warzone2100.exe:bar
004A35D2  e:\Dev\Warzone2100\trunk\Warzone2100.exe:wibble
as opposed to the addresses:

Code: Select all

Call stack:
0042F6A8  e:\Dev\Warzone2100\trunk\Warzone2100.exe:0042F6A8
0043AC4D  e:\Dev\Warzone2100\trunk\Warzone2100.exe:0043AC4D
004A35D2  e:\Dev\Warzone2100\trunk\Warzone2100.exe:004A35D2