discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to compile in debug mode? (I'm on WIndows)


From: Lloyd Dupont
Subject: Re: how to compile in debug mode? (I'm on WIndows)
Date: Thu, 23 Jun 2005 11:06:06 +1000

yep, I finally found that out.

mhh.. quite difficult. depending on my running context (from VS.NET debugger, from gdb, from the console line (without debugging), with or without debug library) the problem don't happen at the same time :(


I tend to believe there is a pointer error in gnustep-base, but where...??...


- case:
   - mini sample:
       - run fine on the command line with install lib
- bug with VS.NET & gdb with install lib (while just LoadLibrary("gnustep-base.dll")) (gdb tells SIGSEGV in malloc()
       - run finw in both VS.NET/gdb/command line with the debug dll
   - the big application:
- bug on the command line and with VS.NET when I do I make a specific call
       - with gdb I can't launch the program:
Error: dll starting at 0x2dd1000 not found.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c901231 in ntdll!DbgUiConnectToDbg () from ntdll.dll
(gdb) warning: HEAP[NovaMindViewer.exe]:
warning: Invalid Address specified to RtlFreeHeap( 00140000, 6DE8BA35 )

a 'backtrace' looks like that:
#0  0x7c901231 in ntdll!DbgUiConnectToDbg () from ntdll.dll
#1  0x7c96c943 in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#2  0x0012ee1c in ?? ()
#3  0x7c96cd80 in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#4 0x6de8ba2d in _OBJC_CLASS_NAME_0 () at ../Headers/Foundation/NSZone.h:276
#5  0x00140000 in ?? ()
#6 0x6de8ba35 in _OBJC_CLASS_NAME_0 () at ../Headers/Foundation/NSZone.h:276
#7  0x0012ee90 in ?? ()
#8  0x7c96df66 in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#9  0x00140000 in ?? ()
#10 0x6de8ba2d in _OBJC_CLASS_NAME_0 () at ../Headers/Foundation/NSZone.h:276
#11 0x7c96e11c in ntdll!RtlpNtMakeTemporaryKey () from ntdll.dll
#12 0x00140000 in ?? ()
#13 0x6de8ba35 in _OBJC_CLASS_NAME_0 () at ../Headers/Foundation/NSZone.h:276
#14 0x40000060 in ?? ()


in NSZone.h: 276 there is
GS_ZONE_SCOPE NSZone* NSDefaultMallocZone (void)
{
 return __nszone_private_hidden_default_zone;
}

which, admitedly, seems to work fine.....

I have no idea.. it's very hard to debug...


Anyway.. did anyone had strange memory error on windows?


----- Original Message ----- From: "Nicola Pero" <nicola@brainstorm.co.uk>
To: "Lloyd Dupont" <lloyd@nova-mind.com>
Cc: "GNUstep Discussion" <discuss-gnustep@gnu.org>
Sent: Thursday, June 23, 2005 10:15 AM
Subject: Re: how to compile in debug mode? (I'm on WIndows)



I have a memory access exception while using GNUstep.
In fact I have a .NET binding to ObjectiveC and, in some situation, when I write this simple statement:
LoadLibrary("gnustep-base.dll")
I get SIGSEGV on malloc()

I was able to use gdb on my .NET program ;) and backtrace up to GNUstep code, but of course there are no method name...
I would like to recompile them with debug info!

Fortunately there is a source version which just happen to work on
windows (you type 'make' and it works!), what parameter should I pass to
make to have a debug version?

make debug=yes

Warning: if you compile libraries sometimes with debug, and sometime
without, you might confuse the system, particularly if you are
absent-minded or if you are not 100% sure of what you're doing ... (it
often happens to me for example when I mix the two types of libraries).

So the main suggestion is ... either build everything without debug, or
build everything with debug, but try avoiding mixing the two types of
builds. :-)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]