Port-vax archive

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

Re: Building current...



On 2015-12-03 00:01, Johnny Billquist wrote:
On 2015-12-02 19:52, Christos Zoulas wrote:
On Dec 2,  7:39pm, bqt%update.uu.se@localhost (Johnny Billquist) wrote:
-- Subject: Re: Building current...

| I'm really rusty on gdb. How do I do that?

"disassemble"? With the pc address (info reg)? I think it defaults to
that.

Actually, just disassemble will do it, as it picks the surroundings of
the PC...

(gdb) disass
Dump of assembler code for function htab_find_slot_with_hash:
    0x004455a4 <+2>:     subl2 $0x8,sp
    0x004455a7 <+5>:     movl 0x4(ap),r7
    0x004455ab <+9>:     movl 0xc(ap),r10
    0x004455af <+13>:    movl 0x10(r7),r9
    0x004455b3 <+17>:    cmpl 0x10(ap),$0x1
    0x004455b7 <+21>:    bneq 0x4455dc <htab_find_slot_with_hash+58>
    0x004455b9 <+23>:    addl3 r9,r9,r1
    0x004455bd <+27>:    addl2 r9,r1
    0x004455c0 <+30>:    ashl $0x2,0x14(r7),r0
    0x004455c5 <+35>:    cmpl r1,r0
    0x004455c8 <+38>:    bgtru 0x4455dc <htab_find_slot_with_hash+58>
    0x004455ca <+40>:    pushl r7
    0x004455cc <+42>:    calls $0x1,0x444fca
    0x004455d1 <+47>:    tstl r0
    0x004455d3 <+49>:    bneq 0x4455d8 <htab_find_slot_with_hash+54>
    0x004455d5 <+51>:    brw 0x445721 <htab_find_slot_with_hash+383>
    0x004455d8 <+54>:    movl 0x10(r7),r9
    0x004455dc <+58>:    ashl $0x4,0x38(r7),r3
    0x004455e1 <+63>:    movab 0x527a3c[r3],r2
    0x004455e9 <+71>:    movl 0x4(r2),r0
=> 0x004455ed <+75>:    extzv $0x1f,$0x1,r10,0xfffffff8(fp)
    0x004455f3 <+81>:    mull3 0xfffffff8(fp),r0,r1
---Type <return> to continue, or q <return> to quit---
    0x004455f8 <+86>:    rotl $0x1,r0,r4
    0x004455fc <+90>:    bicl2 $0xfffffffe,r4
    0x00445603 <+97>:    mull2 r10,r4
    0x00445606 <+100>:   addl2 r1,r4
    0x00445609 <+103>:   emul r10,r0,$0x0,r0
    0x0044560e <+108>:   addl3 r4,r1,r0
    0x00445612 <+112>:   subl3 r0,r10,r6
    0x00445616 <+116>:   rotl $0x1f,r6,r6

Hmm, I can't see what's wrong. extzv with those arguments should be ok
according to VARM. But maybe I'm confused...?

There is something fishy going on.

On today's -current, on the 8650.

Same problem, but a different PC...

#   compile  make/job.o
cc -O1 -fgcse -fstrength-reduce -fgcse-after-reload -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2 -Wno-format-zero-length -Werror --sysroot=/ -DMAKE_NATIVE -DUSE_EMALLOC -c -Wno-format-nonliteral /usr/src/usr.bin/make/job.c
cc: internal compiler error: Illegal instruction (program cc1)
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.NetBSD.org/support/send-pr.html> for instructions.
*** Error code 4

Stop.
make: stopped in /usr/src/usr.bin/make
Krille:usr.bin/make# gdb /usr/libexec/cc1
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "vax--netbsdelf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/libexec/cc1...(no debugging symbols found)...done.
(gdb) core obj/cc1.core
[New process 1]
warning: Error reading shared library list entry at 0x21c00000
Core was generated by `cc1'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x0044574e in htab_find_slot (2132804784, 2139078748, 0)
(gdb) bt
#0  0x0044574e in htab_find_slot (2132804784, 2139078748, 0)
Backtrace stopped: Cannot access memory at address 0x4bb66c03
(gdb) disassemble
Dump of assembler code for function htab_find_slot:
   0x00445734 <+2>:     subl2 $0x4,sp
   0x00445737 <+5>:     movl 0x4(ap),r6
   0x0044573b <+9>:     movl 0x8(ap),r7
   0x0044573f <+13>:    pushl r7
   0x00445741 <+15>:    calls $0x1,*0x0(r6)
   0x00445745 <+19>:    pushl 0xc(ap)
   0x00445748 <+22>:    pushl r0
   0x0044574a <+24>:    pushl r7
   0x0044574c <+26>:    pushl r6
=> 0x0044574e <+28>:    calls $0x4,0x4455a2 <htab_find_slot_with_hash>
   0x00445755 <+35>:    ret
End of assembler dump.
(gdb)


I honestly do not thing the extzv was the problem before. Either the code dump is incoplete/incorrect, the memory is corrupted, or else gdb is confused, or I'm doing something wrong here.

	Johnny



Home | Main Index | Thread Index | Old Index