Am 2/16/2016 um 9:25 PM schrieb Riccardo Mottola:
Hi,
right now I am trying on OpenBSD + GCC
The configure log says:
configure:10309: checking use of fake-main definition
configure:10353: result: yes
Richard Frith-Macdonald wrote:
Or even, as a first step, look at a full stack dump to see how/where
the code is coming from (eg that might tell you if some method is
being executed before main())
I tried putting a breakpoint in NSPorcessInfo.m line 912 to catch the
printout. According to the ifdef's it woul dbe the "fake main" defined
string.
I get this however:
Breakpoint 2, +[NSProcessInfo initialize] (self=0x25e71c80,
_cmd=0x25ea1448)
at NSProcessInfo.m:949
949 {
Current language: auto; currently minimal
(gdb) bt
#0 +[NSProcessInfo initialize] (self=0x25e71c80, _cmd=0x25ea1448)
at NSProcessInfo.m:949
#1 0x07b776cd in __objc_send_initialize (class=0x25e71c80)
at /usr/obj/ports/gcc-4.9.3/gcc-4.9.3/libobjc/sendmsg.c:524
Segmentation fault (core dumped)
Nice! GDB itself crashed :)
try egdb package, much more stable for objc related debugging (:
I tried putting a breakpoint in line 965 (gnustep_base_user_main) and
I don't get there.
If I put a breakpoint in 999 though, I get there:
#0 main (argc=1, argv=0xcf7d3314, env=0xcf7d331c) at NSProcessInfo.m:999
#1 0x1a6ee018 in _start () from /System/Tools/plparse
#2 0x00000001 in ?? ()
#3 0xcf7d3314 in ?? ()
#4 0xcf7d331c in ?? ()
#5 0x00000020 in ?? ()
#6 0x0000000b in ?? ()
#7 0x00001000 in ?? ()
#8 0x1a6edf9b in _start () from /System/Tools/plparse
#9 0x2aaa807c in ?? () from /usr/libexec/ld.so
#10 0xcf7d3310 in ?? ()
#11 0xcf7d32cc in ?? ()
#12 0x00000000 in ?? ()
And the next step is in line 239, which is apparently correct ?
It appears then to die in line 240, where an NSAutoreleasePool is
alloc'd.
I recompiled with debug symbols and put a breakpoint in line 240:
(gdb) bt
#0 _gnu_process_args (argc=1, argv=0xcf7e1c74, env=0xcf7e1c7c)
at NSProcessInfo.m:240
#1 0x02ab253d in main (argc=1, argv=0xcf7e1c74, env=0xcf7e1c7c)
at NSProcessInfo.m:999
#2 0x15a7d058 in _start () from /System/Tools/plparse
#3 0x00000001 in ?? ()
#4 0xcf7e1c74 in ?? ()
#5 0xcf7e1c7c in ?? ()
#6 0x00000020 in ?? ()
#7 0x0000000b in ?? ()
#8 0x00001000 in ?? ()
#9 0x15a7cfdb in _start () from /System/Tools/plparse
#10 0x2ca3107c in ?? () from /usr/libexec/ld.so
#11 0xcf7e1c70 in ?? ()
#12 0xcf7e1c2c in ?? ()
#13 0x00000000 in ?? ()
"stepping" rough is not of much use:
448 in /usr/obj/ports/gcc-4.9.3/gcc-4.9.3/libobjc/sendmsg.c
(gdb)
176 sarray.h: No such file or directory.
in sarray.h
(gdb)
448 /usr/obj/ports/gcc-4.9.3/gcc-4.9.3/libobjc/sendmsg.c: No such
file or directory.
in /usr/obj/ports/gcc-4.9.3/gcc-4.9.3/libobjc/sendmsg.c
(gdb)
176 sarray.h: No such file or directory.
in sarray.h
(gdb)
237 in sarray.h
(gdb)
Segmentation fault (core dumped)
Is this sparse information of use?
Riccardo
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev