Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Steven J. Hill" <sjhill@cotw.com>
To: binutils@sourceware.cygnus.com, linux-mips@oss.sgi.com
Subject: Corrupted symbols for MIPS debugging...
Date: Thu, 13 Sep 2001 14:42:33 -0500	[thread overview]
Message-ID: <3BA10C29.713DB745@cotw.com> (raw)

Greetings.

I am currently working with the Insight as well as the
command line driven GDB for remotely debugging my MIPS
kernel (using KGDB of course). Here are the tools used
to compile, link, etc.:

    binutils-2.11.90.0.31 (HJLu patches applied)
    gcc-3.0.1 (stock)
    glibc-2.3.3 (minor build patches)
    linux-kernel-2.4.5 (OSS)
    Insight debugger (20010910-cvs)
    gdb-5.1 (20010913-cvs)

I have breakpoints set at the 'sys_create_module'
and 'sys_init_module' functions in the kernel. Observe
the output below:

--------------------------------------------------------------------
(gdb) target remote /dev/ttyS1
Remote debugging using /dev/ttyS1
0x80012828 in breakinst () at af_packet.c:1879
1879            sock_unregister(PF_PACKET);
(gdb) bt
#0  0x80012828 in breakinst () at af_packet.c:1879
#1  0x8001a0d4 in sys_create_module (name_user=0x10001dc8 "cfi_probe", 
    size=8176) at module.c:305
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x80012828 in breakinst () at af_packet.c:1879
1879            sock_unregister(PF_PACKET);
(gdb) bt
#0  0x80012828 in breakinst () at af_packet.c:1879
#1  0x8001a2c0 in sys_init_module (name_user=0x10001dc8 "cfi_probe", 
    mod_user=0x1002eed0) at module.c:363
--------------------------------------------------------------------

The address 0x80012828 is clearly not in af_packet.c. Herein
is the problem. I have looked at various output with objdump
and nm, but am not getting any clues as to why the symbols
are corrupted. Below is the compile and final link line for
the kernel:

--------------------------------------------------------------------
mipsel-linux-gcc -I /opt/mipskern/include/asm/gcc -D__KERNEL__
-I/opt/mipskern/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strict-aliasing -g -G 0 -mno-abicalls -fno-pic -mcpu=r5000 -mips2
-Wa,--trap -pipe   -c -o init/main.o init/main.c

mipsel-linux-ld -G 0 -static -T arch/mips/ld.script -Ttext 0x80001000
arch/mips/kernel/head.o arch/mips/kernel/init_task.o init/main.o init/version.o
\
        --start-group \
        arch/mips/kernel/kernel.o arch/mips/mm/mm.o kernel/kernel.o mm/mm.o
fs/fs.o ipc/ipc.o arch/mips/math-emu/fpu_emulator.o \
         drivers/char/char.o drivers/block/block.o drivers/misc/misc.o
drivers/net/net.o drivers/media/media.o drivers/ide/idedriver.o
drivers/pci/driver.o drivers/video/video.o drivers/usb/usbdrv.o \
        net/network.o \
        arch/mips/lib/lib.a /opt/mips/settop/lib/lib.a arch/mips/brcm/brcm.a \
        --end-group \
        -o vmlinux
--------------------------------------------------------------------

Does anyone have some insight (no pun intended) as to what is
wrong here. Thanks everyone.

-Steve

-- 
 Steven J. Hill - Embedded SW Engineer

             reply	other threads:[~2001-09-13 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-13 19:42 Steven J. Hill [this message]
2001-09-13 20:03 ` Corrupted symbols for MIPS debugging H . J . Lu
2001-09-13 20:00   ` Steven J. Hill
2001-09-13 20:13     ` H . J . Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BA10C29.713DB745@cotw.com \
    --to=sjhill@cotw.com \
    --cc=binutils@sourceware.cygnus.com \
    --cc=linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox