[cmucl-help] 19c alpha [Was Re: CMUCL 18c building on tru64 5.1]

Fausto Saporito fausto.saporito at gmail.com
Tue Sep 9 06:50:09 UTC 2014


Here is the alpha/regdef.h


#ifndef _REGDEF_H_
#define _REGDEF_H_

#define v0      $0

#define t0      $1
#define t1      $2
#define t2      $3
#define t3      $4
#define t4      $5
#define t5      $6
#define t6      $7
#define t7      $8

#define s0      $9
#define s1      $10
#define s2      $11
#define s3      $12
#define s4      $13
#define s5      $14
#define s6      $15
#define fp      $15     /* fp & s6 are the same */

#define a0      $16
#define a1      $17
#define a2      $18
#define a3      $19
#define a4      $20
#define a5      $21

#define t8      $22
#define t9      $23
#define t10     $24
#define t11     $25

#define ra      $26

#define pv      $27     /* pv and t5 are the same */
#define t12     $27

#define AT      $at

#define gp      $29

#define sp      $30
#define zero    $31

#endif

2014-09-09 7:26 GMT+02:00 Carl Shapiro <carl.shapiro at gmail.com>:
> On Mon, Sep 8, 2014 at 8:51 PM, Raymond Toy <toy.raymond at gmail.com> wrote:
>>
>> Not sure what that 0x302948ac is, but a1 should probably be the address of
>> call_into_c. I think this part of the code is trying to call debug_print
>> which is a C function, so the address of debug_print must be in one of the
>> registers, and a1 should be call_into_c.

(dbx) s
  [call_into_lisp:85 ,0x1201b4ec]       jsr     reg_ZERO,(reg_LIP)
(dbx) printx $a1
0x50000000

before the first jsr (to %initial-function) a1 is 0x50000000

but inside %initial-function a1 is set to 0

>*[., 0x30294884]       sll     t10, 0x20, t10
(dbx) stepi
>*[., 0x30294888]       lda     t10, 0(t10)
(dbx) stepi
>*[., 0x3029488c]       ldah    t10, 0(t10)
(dbx) stepi
>*[., 0x30294890]       lda     a1, 0(zero)     <======
(dbx) stepi
>*[., 0x30294894]       ldah    a1, 0(a1)
(dbx) stepi
>*[., 0x30294898]       sll     a1, 0x20, a1
(dbx) stepi
>*[., 0x3029489c]       lda     a1, 0(a1)
(dbx) stepi
>*[., 0x302948a0]       ldah    a1, 0(a1)

really I don't understand this code... I load 0 in a1, then load-high
a1 with a1 (but it's 0)
then shift left 0 with 0, etc...

after few instructions I call:

>*[., 0x302948a8]       jsr     v0, (a1), 0x302948ac

but a1 is 0.
(dbx) printx $v0
0x30294860    <=== %initial-function

how can we inspect the code of %initial-function ?

>
>
> Can we find out what is in a1 at the time of the crash?  That should be the
> jump target.  I am curious if it is 0, which it certainly seems like, but we
> have no idea what the debugger might be doing behind your back.  If the
> lisp.nm file does not contain an address for debug_print, genesis will

this is the line in lisp.nm

0x000000120152ec T debug_print

> default that value to 0.  (A really smelly value like 0xdeaddead would be a
> better default.)


More information about the cmucl-help mailing list