* Corrupted symbols for MIPS debugging...
@ 2001-09-13 19:42 Steven J. Hill
2001-09-13 20:03 ` H . J . Lu
0 siblings, 1 reply; 4+ messages in thread
From: Steven J. Hill @ 2001-09-13 19:42 UTC (permalink / raw)
To: binutils, linux-mips
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Corrupted symbols for MIPS debugging...
2001-09-13 20:03 ` H . J . Lu
@ 2001-09-13 20:00 ` Steven J. Hill
2001-09-13 20:13 ` H . J . Lu
0 siblings, 1 reply; 4+ messages in thread
From: Steven J. Hill @ 2001-09-13 20:00 UTC (permalink / raw)
To: H . J . Lu; +Cc: binutils, linux-mips
"H . J . Lu" wrote:
>
> > (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
>
> Please provide
>
> (gdb) list breakinst
> (gdb) print breakinst
>
(gdb) target remote /dev/ttyS1
Remote debugging using /dev/ttyS1
0x80012828 in breakinst () at af_packet.c:1879
1879 sock_unregister(PF_PACKET);
(gdb) list breakinst
1874
1875 static void __exit packet_exit(void)
1876 {
1877 remove_proc_entry("net/packet", 0);
1878 unregister_netdevice_notifier(&packet_netdev_notifier);
1879 sock_unregister(PF_PACKET);
1880 return;
1881 }
1882
1883 static int __init packet_init(void)
(gdb) print breakinst
$1 = {<text variable, no debug info>} 0x80012824 <breakinst>
(gdb) c
Continuing.
--
Steven J. Hill - Embedded SW Engineer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Corrupted symbols for MIPS debugging...
2001-09-13 19:42 Corrupted symbols for MIPS debugging Steven J. Hill
@ 2001-09-13 20:03 ` H . J . Lu
2001-09-13 20:00 ` Steven J. Hill
0 siblings, 1 reply; 4+ messages in thread
From: H . J . Lu @ 2001-09-13 20:03 UTC (permalink / raw)
To: Steven J. Hill; +Cc: binutils, linux-mips
On Thu, Sep 13, 2001 at 02:42:33PM -0500, Steven J. Hill wrote:
>
> --------------------------------------------------------------------
> (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
Please provide
(gdb) list breakinst
(gdb) print breakinst
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Corrupted symbols for MIPS debugging...
2001-09-13 20:00 ` Steven J. Hill
@ 2001-09-13 20:13 ` H . J . Lu
0 siblings, 0 replies; 4+ messages in thread
From: H . J . Lu @ 2001-09-13 20:13 UTC (permalink / raw)
To: Steven J. Hill; +Cc: binutils, linux-mips
On Thu, Sep 13, 2001 at 03:00:59PM -0500, Steven J. Hill wrote:
> "H . J . Lu" wrote:
> >
> > > (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
> >
> > Please provide
> >
> > (gdb) list breakinst
> > (gdb) print breakinst
> >
> (gdb) target remote /dev/ttyS1
> Remote debugging using /dev/ttyS1
> 0x80012828 in breakinst () at af_packet.c:1879
> 1879 sock_unregister(PF_PACKET);
> (gdb) list breakinst
> 1874
> 1875 static void __exit packet_exit(void)
> 1876 {
> 1877 remove_proc_entry("net/packet", 0);
> 1878 unregister_netdevice_notifier(&packet_netdev_notifier);
> 1879 sock_unregister(PF_PACKET);
> 1880 return;
> 1881 }
> 1882
> 1883 static int __init packet_init(void)
> (gdb) print breakinst
> $1 = {<text variable, no debug info>} 0x80012824 <breakinst>
> (gdb) c
> Continuing.
It sounds like the bug we have fixed. Please try my current gcc,
binutils and gdb binary rpms on oss.sgi.com. They work for me.
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-09-13 20:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-13 19:42 Corrupted symbols for MIPS debugging Steven J. Hill
2001-09-13 20:03 ` H . J . Lu
2001-09-13 20:00 ` Steven J. Hill
2001-09-13 20:13 ` H . J . Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox