Port-macppc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: installing graphviz from pkgsrc on NetBSD/macppc 9.1
> It turns out that pcre has configure code to explicitly remove
> any user-supplied "-g" option, which makes debugging more
> difficult. Getting a "-g" through to the copiler turns out to
> not exactly be straight-forward (I've tried tweaking configure to
> do so, so far unsuccessfully), so I'm stuck there at the moment.
I managed to force pcre to build with the "-g" option. However,
that also didn't really reveal the problem; the program crashes
on an instruction where there is no debug info.
After some assistance from fellow NetBSD developers, it turns out
it's crashing in
00000000 <.text.startup>:
0: 94 21 ff e0 stwu r1,-32(r1)
4: 7c 08 02 a6 mflr r0
8: 42 9f 00 05 bcl 20,4*cr7+so,c <.text.startup+0xc>
c: 93 c1 00 18 stw r30,24(r1)
10: 7f c8 02 a6 mflr r30
14: 3f de 00 00 addis r30,r30,0
16: R_PPC_REL16_HA .got2+0x800a
18: 90 01 00 24 stw r0,36(r1)
1c: 3b de 00 00 addi r30,r30,0
1e: R_PPC_REL16_LO .got2+0x8012
20: 80 9e 80 04 lwz r4,-32764(r30)
>>24: 89 24 00 00 lbz r9,0(r4)
28: 2f 89 00 00 cmpwi cr7,r9,0
2c: 40 9e 00 58 bne cr7,84 <.text.startup+0x84>
30: 81 3e 80 08 lwz r9,-32760(r30)
34: 39 40 00 01 li r10,1
38: 93 a1 00 14 stw r29,20(r1)
3c: 2f 89 00 00 cmpwi cr7,r9,0
40: 93 e1 00 1c stw r31,28(r1)
44: 99 44 00 00 stb r10,0(r4)
48: 41 9e 00 10 beq cr7,58 <.text.startup+0x58>
(this is "objdump -dr" of /usr/lib/crtbgeginS.o).
This code comes from /usr/src/lib/csu/common/crtbegin.c, the
function __do_global_ctors_aux(), and it appears that it's trying
to load the static variable __initialized; the store of 1 into it
is happening via the instructions at 34 and 44.
Now, it's evident from the debugger that r4 ends up as 0, causing
a null pointer de-reference and a SEGV.
I have not yet been able to figure out exactly *why* this code
fails in this manner, though.
Regards,
- Håvard
Home |
Main Index |
Thread Index |
Old Index