axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] RE: gcl-2.6.8pre on MAC OSX 10.2


From: Bill Page
Subject: [Axiom-developer] RE: gcl-2.6.8pre on MAC OSX 10.2
Date: Mon, 30 Oct 2006 22:27:08 -0500

Camm,

Here is the gdb output for the MAC OSX plt issue.

I think the result is fairly definitive. See this section below:

Breakpoint 2, pltcomp (v1=0xbffaade0, v2=0x123ad4) at plt.c:25
25        const Plt *p1=v1,*p2=v2;
(gdb) n
27        return strcmp(stn(p1->n),stn(p2->n));
(gdb) p p2->n
$8 = 0x11574c "__srget"
(gdb) p p1->n
$9 = 0x5742d1 "___srget"
(gdb) n
29      }
(gdb) n
0x9000f8c8 in bsearch ()
(gdb) n
Single stepping until exit from function bsearch, 
which has no line number information.
my_plt (s=0x5742d1 "___srget", v=0xbffff668) at plt.c:185
185       return -1;
(gdb) n
187     }

--------

It seems as if pltcomp is not respecting the leading underscore
for the comparison.

Can you suggest fix?

Regards,
Bill Page.

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2006.10.30 21:24:00
=~=~=~=~=~=~=~=~=~=~=~=
ppc-osx3:~/osx/new/gcl-2.6.8pre/unixport $ gdb raw_pre_gcl
GNU gdb 5.3-20021014 (Apple version gdb-250) (Sat Dec  7 02:14:27 GMT 2002)
Copyright 2002 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 "powerpc-apple-macos10".
Reading symbols for shared libraries .. done
(gdb) b sfasli.c:65
Breakpoint 1 at 0xb1b54: file sfasli.c, line 65.
(gdb) r ./
Starting program:
/private/automount/home/users/b/bi/billpage/osx/new/gcl-2.6.8pre/unixport/ra
w_pre_gcl ./
[Switching to process 17648 thread 0xb03]
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
DBEGIN:          0x122000
mach_mapstart:   0x548000
heap_end:        0x548000
core_end:        0x548000
mach_brkpt:      0x548000
mach_maplimit: 0x20122000
--- List of All Regions ---
   address       size prot maxp zone_name
         0     0x1000 none none (no zone)
    0x1000     0x1000 r x  rwx  (no zone)
    0x2000    0xaf000 r x  rwx  (no zone)
   0xb1000     0x1000 r x  rwx  (no zone)
   0xb2000    0x70000 r x  rwx  (no zone)
  0x122000     0x6000 rw   rwx  (no zone)
  0x128000   0x420000 rw   rwx  (no zone)
  0x548000   0x2dd000 r    rwx  (no zone)
  0x825000    0x40000 rw   rwx  DefaultMallocZone
  0x865000    0x20000 rw   rwx  DefaultMallocZone
--- List of Regions to be Dumped ---
   address       size prot maxp zone_name
         0     0x1000 none none (no zone)
    0x1000   0x121000 r x  rwx  (no zone)
  0x122000   0x426000 rw   rwx  (no zone)
  0x548000   0x2dd000 r    rwx  (no zone)
  0x825000    0x60000 rw   rwx  DefaultMallocZone
--- Header Information ---
Magic      = 0xfeedface
CPUType    = 18
CPUSubType = 0
FileType   = 0x2
NCmds      = 10
SizeOfCmds = 1620
Flags      = 0x00000085
Highest address of load commands in input file:     0x825000
Lowest offset of all sections in __TEXT segment:      0xb18
--- List of Load Commands in Input File ---
no cmd                 cmdsize name                address       size
 0 LC_SEGMENT             0x38 __PAGEZERO                0     0x1000
 1 LC_SEGMENT            0x258 __TEXT               0x1000   0x121000
                               __text               0x1b18   0x10a410
                               __picsymbol_stub   0x10bf28     0x18e4
                               __symbol_stub      0x10d80c          0
                               __cstring          0x10d80c    0x12714
                               __literal4         0x11ff20       0x18
                               __literal8         0x11ff38       0xc8
                               __const            0x120000     0x1f9c
                               __eh_frame         0x121f9c       0x60
 2 LC_SEGMENT            0x214 __DATA             0x122000   0x426000
                               __data             0x122000     0x25b0
                               __la_symbol_ptr    0x1245b0      0x2c4
                               __nl_symbol_ptr    0x124874      0x8fc
                               __dyld             0x125170       0x1c
                               __const            0x12518c     0x2748
                               __bss              0x1278d8     0x8f28
                               __common           0x130800   0x416d68
 3 LC_SEGMENT             0x38 __LINKEDIT         0x548000   0x2dd000
 4 LC_LOAD_DYLINKER       0x1c
 5 LC_LOAD_DYLIB          0x34
 6 LC_SYMTAB              0x18
 7 LC_DYSYMTAB            0x50
 8 LC_TWOLEVEL_HINTS      0x10
 9 LC_UNIXTHREAD          0xb0
--- Load Commands written to Output File ---
Writing segment __PAGEZERO       at          0 -          0 (sz:          0)
Writing segment __TEXT           at          0 -   0x121000 (sz:   0x121000)
Writing segment __DATA           at   0x121000 -   0x127000 (sz:     0x6000)
        section __data           at   0x121000 -   0x1235b0 (sz:     0x25b0)
        section __la_symbol_ptr  at   0x1235b0 -   0x123874 (sz:      0x2c4)
        section __nl_symbol_ptr  at   0x123874 -   0x124170 (sz:      0x8fc)
        section __dyld           at   0x124170 -   0x12418c (sz:       0x1c)
        section __const          at   0x12418c -   0x1268d4 (sz:     0x2748)
        section __bss            at   0x1268d8 -   0x12f800 (sz:     0x8f28)
        section __common         at   0x12f800 -   0x546568 (sz:   0x416d68)
Writing segment __DATA           at   0x547000 -   0x547000 (sz:          0)
Writing segment __LINKEDIT       at   0x547000 -   0x823df4 (sz:   0x2dcdf4)
Writing LC_LOAD_DYLINKER  command
Writing LC_LOAD_DYLIB     command
Writing LC_SYMTAB         command
Fixed up 17/17 external relocation entries in data segment.
Writing LC_DYSYMTAB       command
Writing LC_TWOLEVEL_HINTS command
Writing LC_UNIXTHREAD     command
1068 unused bytes follow Mach-O header

Program received signal SIGTRAP, Trace/breakpoint trap.
0x8fe19090 in __dyld__dyld_start ()
(gdb) cond 1 (int) strstr(q[u]->name,"srget")
(gdb) c
Continuing.
GCL (GNU Common Lisp)  April 1994  131072 pages
Building symbol table for
/private/automount/home/users/b/bi/billpage/osx/new/gcl-2.6.8pre/unixport/ra
w_pre_gcl.tmp ..

Breakpoint 1, build_symbol_table_bfd () at sfasli.c:65
65          if (strncmp(q[u]->section->name,"*UND*",5) && !(q[u]->flags &
BSF_WEAK))
(gdb) n
68          if ((c=(char *)strstr(q[u]->name,"@@"))) {
(gdb) n
73          } else if 
(gdb) n
78          if (h->type!=bfd_link_hash_defined) {
(gdb) n
79            if (!q[u]->section)
(gdb) n
81            if (!my_plt(q[u]->name,&pa)) {
(gdb) s
my_plt (s=0x5742d1 "___srget", v=0xbffff668) at plt.c:167
167       Plt *p=mplt,*pe=p+sizeof(mplt)/sizeof(*mplt),tp;
(gdb) n
170       if (sSAplt_tableA->s.s_dbind && 
(gdb) p mplt
$1 = {{
    n = 0x11574c "__srget", 
    ad = 2415981216
  }, {
    n = 0x115754 "__swbuf", 
    ad = 2416038784
  }, {
    n = 0x11575c "acos", 
    ad = 2416205440
  }, {
    n = 0x115764 "acosh", 
    ad = 2416569920
  }, {
    n = 0x11576c "asin", 
    ad = 2416570304
  }, {
    n = 0x115774 "asinh", 
    ad = 2416569588
  }, {
    n = 0x11577c "atan", 
    ad = 2416568404
  }, {
    n = 0x115784 "atanh", 
    ad = 2416569296
  }, {
    n = 0x11578c "cos", 
    ad = 2416185248
  }, {
    n = 0x115790 "cosh", 
    ad = 2416590880
  }, {
    n = 0x115798 "exp", 
    ad = 2416186144
  }, {
    n = 0x11579c "log", 
    ad = 2416181504
  }, {
    n = 0x1157a0 "setjmp", 
    ad = 2416214272
  }, {
    n = 0x1157a8 "sin", 
    ad = 2416179488
  }, {
    n = 0x1157ac "sinh", 
    ad = 2416590620
  }, {
    n = 0x1157b4 "tan", 
    ad = 2416183744
  }, {
    n = 0x1157b8 "tanh", 
    ad = 2416591016
  }}
(gdb) n
179       tp.n=s;
(gdb) b pltcomp
Breakpoint 2 at 0xbe75c: file plt.c, line 25.
(gdb) n
180       if ((p=bsearch(&tp,p,pe-p,sizeof(*p),pltcomp))) {
(gdb) n

Breakpoint 2, pltcomp (v1=0xbffaade0, v2=0x123b14) at plt.c:25
25        const Plt *p1=v1,*p2=v2;
(gdb) n
27        return strcmp(stn(p1->n),stn(p2->n));
(gdb) p p1->n
$2 = 0x5742d1 "___srget"
(gdb) p p2->n
$3 = 0x11578c "cos"
(gdb) n
29      }
(gdb) n
0x9000f8c8 in bsearch ()
(gdb) n
Single stepping until exit from function bsearch, 
which has no line number information.

Breakpoint 2, pltcomp (v1=0xbffaade0, v2=0x123af4) at plt.c:25
25        const Plt *p1=v1,*p2=v2;
(gdb) n
27        return strcmp(stn(p1->n),stn(p2->n));
(gdb) p p1->n
$5 = 0x5742d1 "___srget"
(gdb) n
29      }
(gdb) n
0x9000f8c8 in bsearch ()
(gdb) n
Single stepping until exit from function bsearch, 
which has no line number information.

Breakpoint 2, pltcomp (v1=0xbffaade0, v2=0x123ae4) at plt.c:25
25        const Plt *p1=v1,*p2=v2;
(gdb) p p2->n
$6 = 0x11576c "asin"
(gdb) n
27        return strcmp(stn(p1->n),stn(p2->n));
(gdb) n
29      }
(gdb) n
0x9000f8c8 in bsearch ()
(gdb) n
Single stepping until exit from function bsearch, 
which has no line number information.

Breakpoint 2, pltcomp (v1=0xbffaade0, v2=0x123adc) at plt.c:25
25        const Plt *p1=v1,*p2=v2;
(gdb) n
27        return strcmp(stn(p1->n),stn(p2->n));
(gdb) p p2->n
$7 = 0x115754 "__swbuf"
(gdb) n
29      }
(gdb) n
0x9000f8c8 in bsearch ()
(gdb) n
Single stepping until exit from function bsearch, 
which has no line number information.

Breakpoint 2, pltcomp (v1=0xbffaade0, v2=0x123ad4) at plt.c:25
25        const Plt *p1=v1,*p2=v2;
(gdb) n
27        return strcmp(stn(p1->n),stn(p2->n));
(gdb) p p2->n
$8 = 0x11574c "__srget"
(gdb) p p1->n
$9 = 0x5742d1 "___srget"
(gdb) n
29      }
(gdb) n
0x9000f8c8 in bsearch ()
(gdb) n
Single stepping until exit from function bsearch, 
which has no line number information.
my_plt (s=0x5742d1 "___srget", v=0xbffff668) at plt.c:185
185       return -1;
(gdb) n
187     }
(gdb) n
build_symbol_table_bfd () at sfasli.c:88
88            if (q[u]->value) {
(gdb) b sfasli.c:89
Breakpoint 3 at 0xb1e28: file sfasli.c, line 89.
(gdb) c
Continuing.

Breakpoint 2, pltcomp (v1=0xbffaade0, v2=0x123b14) at plt.c:25
25        const Plt *p1=v1,*p2=v2;
(gdb) cl
Deleted breakpoint 2 
(gdb) c
Continuing.

Breakpoint 3, build_symbol_table_bfd () at sfasli.c:89
89              h->type=bfd_link_hash_defined;
(gdb) p q[u]->name
$10 = 0x575f53 "_acos"
(gdb) c
Continuing.

Breakpoint 3, build_symbol_table_bfd () at sfasli.c:89
89              h->type=bfd_link_hash_defined;
(gdb) p q[u]->name
$11 = 0x575f59 "_acosh"
(gdb) c
Continuing.

Breakpoint 3, build_symbol_table_bfd () at sfasli.c:89
89              h->type=bfd_link_hash_defined;
(gdb) cp q[u]->name
$12 = 0x575f60 "_asin"
(gdb) p q[u]->name
(gdb) c
Continuing.

Breakpoint 3, build_symbol_table_bfd () at sfasli.c:89
89              h->type=bfd_link_hash_defined;
(gdb) cp q[u]->name
$13 = 0x575f66 "_asinh"
(gdb) p q[u]->name
(gdb) c
Continuing.

Breakpoint 3, build_symbol_table_bfd () at sfasli.c:89
89              h->type=bfd_link_hash_defined;
(gdb) cp q[u]->name
$14 = 0x575f6d "_atan"
(gdb) p q[u]->name
(gdb) c
Continuing.

Breakpoint 3, build_symbol_table_bfd () at sfasli.c:89
89              h->type=bfd_link_hash_defined;
(gdb) cp q[u]->name
$15 = 0x575f73 "_atanh"
(gdb) p q[u]->name
(gdb) c
Continuing.

Breakpoint 3, build_symbol_table_bfd () at sfasli.c:89
89              h->type=bfd_link_hash_defined;
(gdb) cp q[u]->name
$16 = 0x575f83 "_cos"
(gdb) 

-----------

> -----Original Message-----
> From: Camm Maguire [mailto:address@hidden 
> Sent: October 27, 2006 11:05 AM
> To: address@hidden
> Cc: address@hidden; address@hidden
> Subject: Re: gcl-2.6.8pre on MAC OSX 10.2
> 
> 
> Greetings!
> 
> "Page, Bill" <address@hidden> writes:
> 
> > Camm,
> > 
> > On Thursday, October 26, 2006 7:01 PM you asked:
> > > 
> > > Greetings!  Just wondering if this is the last axiom issue with
> > > 2.6.8pre outstanding.  If not, what are the others?  If 
> more testing
> > > time is needed to answer this, how much more?
> > >
> > 
> > Here is the debugging output you asked for in your previous email.
> > 
> > On Thursday, October 26, 2006 4:41 PM you wrote:
> > > ... 
> > > Please verify this by stepping through with n and this point.  In
> > > fact, if you can step from this point to the bottom of 
> this for loop
> > > iteration, and then
> > > 
> > > (gdb) p 
> > > *bfd_link_hash_lookup(link_info.hash,q[u]->name,MY_BFD_FALSE,M
> > Y_BFD_FALSE,MY_BFD_TRUE)
> > > 
> > > that would be most helpful.  
> > > 
> > 
> > -------- 
> > 
> > (gdb) cond 1 (int) strstr(q[u]->name,"srget")
> > (gdb) c
> > Continuing.
> > GCL (GNU Common Lisp)  April 1994  131072 pages
> > Building symbol table for
> > 
> /private/automount/home/users/b/bi/billpage/osx/new/gcl-2.6.8p
> re/unixpor
> > t/raw_pre_gcl.tmp ..
> > 
> > Breakpoint 1, build_symbol_table_bfd () at sfasli.c:65
> > 65          if (strncmp(q[u]->section->name,"*UND*",5) && 
> !(q[u]->flags
> > & BSF_WEAK))
> > (gdb) p q[u]->name
> > $1 = 0x5742d1 "___srget"
> > (gdb) p q[u]->section->name
> > $2 = 0x114e74 "*UND*"
> > (gdb) p q[u]->flags
> > $3 = 2
> > (gdb) n
> > 68          if ((c=(char *)strstr(q[u]->name,"@@"))) {
> > (gdb) n
> > 73          } else if
> > (gdb) n
> > 78          if (h->type!=bfd_link_hash_defined) {
> > (gdb) n
> > 79            if (!q[u]->section)
> > (gdb) n
> > 81            if (!my_plt(q[u]->name,&pa)) {
> > (gdb) n
> > 88            if (q[u]->value) {
> > (gdb) n
> > 95          if (c) {
> > (gdb) p
> > 
> *bfd_link_hash_lookup(link_info.hash,q[u]->name,MY_BFD_FALSE,M
> Y_BFD_FALS
> > E,MY_BFD_TRUE)
> > No symbol "MY_BFD_FALSE" in current context.
> > (gdb) p 
> *bfd_link_hash_lookup(link_info.hash,q[u]->name,0,0,MY_BFD_TRUE)
> > No symbol "MY_BFD_TRUE" in current context.
> > (gdb) p *bfd_link_hash_lookup(link_info.hash,q[u]->name,0,0,1)
> > $4 = {
> >   root = {
> >     next = 0x0,
> >     string = 0x76db28 "___srget",
> >     hash = 163640344
> >   },
> >   type = bfd_link_hash_undefined,
> >   u = {
> >     undef = {
> >       next = 0x76db34,
> >       abfd = 0x54a2f0,
> >       weak = 0x0
> >     },
> >     def = {
> >       next = 0x76db34,
> >       section = 0x54a2f0,
> >       value = 0
> >     },
> >     i = {
> >       next = 0x76db34,
> >       link = 0x54a2f0,
> >       warning = 0x0
> >     },
> >     c = {
> >       next = 0x76db34,
> >       p = 0x54a2f0,
> >       size = 0
> >     }
> >   }
> > }
> 
> Perfect!  Here is the problem -- the symbol has no value, to the code
> never defines its address
> 
> > 88            if (q[u]->value) {
> 
> >   type = bfd_link_hash_undefined,
> 
> It would be helpful if you could break at line 89, and make sure that
> other symbols are defined through their symbol value.  Preferably,
> others in plt.h.
> 
> But before this, please step into my_plt with
> 
> (gdb) s
> 
> and step through the code.
> 
> This is also of interest therein:
> 
> (gdb) p mplt
> 
> and, before executing line 180:
> 
> (gdb) b pltcomp
> 
> then at each break into pltcomp, try to see why the named symbol is
> not found.
> 
> BTW, is this macosx intel?  If not, has anyone tried this?
> 
> Take care,
> 
> > (gdb) n
> > 58        for (u=0;u<v;u++) {
> > (gdb)
> > 
> > ------------
> > 
> > I guess it didn't know MY_BFD_FALSE and MY_BFD_TRUE but I
> > took a wild guess at what these symbols might be. Is this
> > output useful to you?
> > 
> > Regards,
> > Bill Page.
> > 
> > 
> > 
> 
> -- 
> Camm Maguire                                          
> address@hidden
> ==============================================================
> ============
> "The earth is but one country, and mankind its citizens."  -- 
>  Baha'u'llah
> 
> 






reply via email to

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