Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2000 15:03:43 +0000
From:      mirko.viviani@rccr.cremona.it
To:        freebsd-hackers@FreeBSD.org
Subject:   gdb 4.18 strangeness...
Message-ID:  <200004061303.PAA04614@rccr1.rccr.cremona.it>

next in thread | raw e-mail | index | archive | help
Ciao!

I have problems debugging ObjC programs... it seems that gdb has problems
stepping through the objc function.

See:


rey:~/Sources/gnustep/core/base/Testing> gdb
shared_obj/ix86/freebsdelf3.4/gnu-gnu-gnu-xgps/invocation
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
(gdb) b gnustep_base_user_main
Breakpoint 1 at 0x8049dd3: file invocation.m, line 34.
(gdb) r
Starting program:
/usr/home/mirko/Sources/gnustep/core/base/Testing/shared_obj/ix86/freebsdelf3.4/gnu-gnu-gnu-xgps/invocation


Breakpoint 1, gnustep_base_user_main () at invocation.m:34
34        NSAutoreleasePool     *arp = [NSAutoreleasePool new];
Current language:  auto; currently objective-c
(gdb) l
29        id obj;
30        id inv;
31        id array;
32        int i;
33        BOOL b;
34        NSAutoreleasePool     *arp = [NSAutoreleasePool new];
35
36        /* Create a simple invocation, and get it's return value. */
37        obj = [NSObject new];
38        inv = [[MethodInvocation alloc] 
(gdb) n
0x8049848 in _init ()
(gdb) l
39                initWithTarget: obj selector: @selector(isInstance)];
40        [inv invoke];
41        [inv getReturnValue: &b];
42        printf ("object is instance %d\n", (int)b);
43        [inv release];
44
45        /* Do a simple invocation on all the contents of a collection. */
46        array = [Array new];
47        for (i = 0; i < 5; i++)
48          [array addObject: [NSNumber numberWithInt: i]];
(gdb) n
Single stepping until exit from function _init, 
which has no line number information.

Program received signal SIGSEGV, Segmentation fault.
0x8053196 in objc_msg_lookup ()
(gdb) 


This happens with the system gdb 4.18 and the patched (with ObjC support)
version.

Any hints ?

Thanks.

--
Bye,
Mirko  <mirko.viviani@rccr.cremona.it>  (NeXTmail, MIME)




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004061303.PAA04614>