linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* mvista gdb 5.0 core dumping
@ 2001-10-31 19:43 Mark Pilon
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Pilon @ 2001-10-31 19:43 UTC (permalink / raw)
  To: linuxppc-embedded


I'm trying to debug the a kernel build from the 2_4_devel tree,
built w/ a toolset I built, debugging w/ mvista's 5.0 gdb:

ppc_405-gdb vmlinux
GNU gdb 5.0
Copyright 2000 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 "--host=i686-pc-linux-gnu
--target=powerpc-hardhat-linux"...Segmentation fault (core dumped)

attempting to debug gdb:

[mpilon@wolf linuxppc_2_4_devel]$ gdb `which ppc_405-gdb` core
GNU gdb 19991004
Copyright 1998 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 "i386-redhat-linux"...
Core was generated by `ppc_405-gdb vmlinux'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libncurses.so.4...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  0x80d9efe in read_dbx_symtab (objfile=0x81dec00)
    at ../../gdb/partial-stab.h:654
654     ../../gdb/partial-stab.h: No such file or directory.
(gdb) where
#0  0x80d9efe in read_dbx_symtab (objfile=0x81dec00)
    at ../../gdb/partial-stab.h:654
#1  0x80d8a41 in dbx_symfile_read (objfile=0x81dec00, mainline=0)
    at ../../gdb/dbxread.c:631
#2  0x80db4c9 in elfstab_build_psymtabs (objfile=0x81dec00, mainline=0,
    staboffset=1527808, stabsize=1260, stabstroffset=1529068,
stabstrsize=1597)
    at ../../gdb/dbxread.c:2652
#3  0x80de1f4 in elf_symfile_read (objfile=0x81dec00, mainline=0)
    at ../../gdb/elfread.c:663
#4  0x8084d3e in syms_from_objfile (objfile=0x81dec00, addrs=0xbffff280,
    mainline=1, verbo=0) at ../../gdb/symfile.c:807
#5  0x8084ee2 in symbol_file_add (name=0x81d3718 "vmlinux", from_tty=0,
    addrs=0x0, mainline=1, flags=32) at ../../gdb/symfile.c:943
#6  0x8085157 in symbol_file_command (args=0xbffffb40 "vmlinux", from_tty=0)
    at ../../gdb/symfile.c:1087
#7  0x80b377c in do_captured_command (data=0xbffff7a4) at ../../gdb/top.c:679
#8  0x80b36f3 in catch_errors (func=0x80b376c <do_captured_command>,
    args=0xbffff7a4, errstring=0x8169840 "", mask=6) at ../../gdb/top.c:615
#9  0x80b37ba in catch_command_errors (
    command=0x8084f9c <symbol_file_command>, arg=0xbffffb40 "vmlinux",
    from_tty=0, mask=6) at ../../gdb/top.c:699
#10 0x806b2ab in captured_main (data=0xbffff9d0) at ../../gdb/main.c:603
#11 0x80b36f3 in catch_errors (func=0x806ab24 <captured_main>,
    args=0xbffff9d0, errstring=0x8149451 "", mask=6) at ../../gdb/top.c:615
#12 0x806b4ff in main (argc=2, argv=0xbffffa24) at ../../gdb/main.c:761
(gdb)

any ideas what could be causing this?  I've debugged kernels before
w/ toolsets I've built.

thanks,

Mark

--
Mark Pilon

Minolta-QMS
P.O. Box 37
Fallon, MT.  59326-0037

1-406-853-0433

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: mvista gdb 5.0 core dumping
@ 2001-10-31 19:50 Wright, David
  2001-10-31 20:05 ` Mark Pilon
  0 siblings, 1 reply; 3+ messages in thread
From: Wright, David @ 2001-10-31 19:50 UTC (permalink / raw)
  To: Mark Pilon, linuxppc-embedded


What a timely question -- I just debugged this one last night.
This is a bug in the code in the partial-stab.h file.  Here's the
diff output of what I change in it to make this abort stop
happening:

602c602
< 	if (textlow_not_set
---
> 	if (pst && (textlow_not_set
605c605
< 		!= ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)))
---
> 		!= ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT))))
649c649
< 	if (textlow_not_set
---
> 	if (pst && (textlow_not_set
652c652
< 		!= ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)))
---
> 		!= ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT))))



I don't claim that this is a great solution, in that I have no
real sense of what the code is doing, but this change does get
rid of the null pointer dereference that's blowing you up.

  -- David Wright, Consulting Engineer
     InfiniSwitch Corp., Westborough, MA


> -----Original Message-----
> From: Mark Pilon [mailto:mpilon@midrivers.com]
> Sent: Wednesday, October 31, 2001 2:44 PM
> To: linuxppc-embedded@lists.linuxppc.org
> Subject: mvista gdb 5.0 core dumping
>
>
>
> I'm trying to debug the a kernel build from the 2_4_devel tree,
> built w/ a toolset I built, debugging w/ mvista's 5.0 gdb:
>
> ppc_405-gdb vmlinux
> GNU gdb 5.0
> Copyright 2000 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 "--host=i686-pc-linux-gnu
> --target=powerpc-hardhat-linux"...Segmentation fault (core dumped)
>
> attempting to debug gdb:
>
> [mpilon@wolf linuxppc_2_4_devel]$ gdb `which ppc_405-gdb` core
> GNU gdb 19991004
> Copyright 1998 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 "i386-redhat-linux"...
> Core was generated by `ppc_405-gdb vmlinux'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/lib/libncurses.so.4...done.
> Reading symbols from /lib/libm.so.6...done.
> Reading symbols from /lib/libdl.so.2...done.
> Reading symbols from /lib/libc.so.6...done.
> Reading symbols from /lib/ld-linux.so.2...done.
> #0  0x80d9efe in read_dbx_symtab (objfile=0x81dec00)
>     at ../../gdb/partial-stab.h:654
> 654     ../../gdb/partial-stab.h: No such file or directory.
> (gdb) where
> #0  0x80d9efe in read_dbx_symtab (objfile=0x81dec00)
>     at ../../gdb/partial-stab.h:654
> #1  0x80d8a41 in dbx_symfile_read (objfile=0x81dec00, mainline=0)
>     at ../../gdb/dbxread.c:631
> #2  0x80db4c9 in elfstab_build_psymtabs (objfile=0x81dec00,
> mainline=0,
>     staboffset=1527808, stabsize=1260, stabstroffset=1529068,
> stabstrsize=1597)
>     at ../../gdb/dbxread.c:2652
> #3  0x80de1f4 in elf_symfile_read (objfile=0x81dec00, mainline=0)
>     at ../../gdb/elfread.c:663
> #4  0x8084d3e in syms_from_objfile (objfile=0x81dec00,
> addrs=0xbffff280,
>     mainline=1, verbo=0) at ../../gdb/symfile.c:807
> #5  0x8084ee2 in symbol_file_add (name=0x81d3718 "vmlinux",
> from_tty=0,
>     addrs=0x0, mainline=1, flags=32) at ../../gdb/symfile.c:943
> #6  0x8085157 in symbol_file_command (args=0xbffffb40
> "vmlinux", from_tty=0)
>     at ../../gdb/symfile.c:1087
> #7  0x80b377c in do_captured_command (data=0xbffff7a4) at
> ../../gdb/top.c:679
> #8  0x80b36f3 in catch_errors (func=0x80b376c <do_captured_command>,
>     args=0xbffff7a4, errstring=0x8169840 "", mask=6) at
> ../../gdb/top.c:615
> #9  0x80b37ba in catch_command_errors (
>     command=0x8084f9c <symbol_file_command>, arg=0xbffffb40 "vmlinux",
>     from_tty=0, mask=6) at ../../gdb/top.c:699
> #10 0x806b2ab in captured_main (data=0xbffff9d0) at
> ../../gdb/main.c:603
> #11 0x80b36f3 in catch_errors (func=0x806ab24 <captured_main>,
>     args=0xbffff9d0, errstring=0x8149451 "", mask=6) at
> ../../gdb/top.c:615
> #12 0x806b4ff in main (argc=2, argv=0xbffffa24) at
> ../../gdb/main.c:761
> (gdb)
>
> any ideas what could be causing this?  I've debugged kernels before
> w/ toolsets I've built.
>
> thanks,
>
> Mark
>
> --
> Mark Pilon
>
> Minolta-QMS
> P.O. Box 37
> Fallon, MT.  59326-0037
>
> 1-406-853-0433
>
>
>

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mvista gdb 5.0 core dumping
  2001-10-31 19:50 mvista gdb 5.0 core dumping Wright, David
@ 2001-10-31 20:05 ` Mark Pilon
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Pilon @ 2001-10-31 20:05 UTC (permalink / raw)
  To: Wright, David, linuxppc-embedded


"Wright, David" wrote:
>
> What a timely question -- I just debugged this one last night.
> This is a bug in the code in the partial-stab.h file.  Here's the
> diff output of what I change in it to make this abort stop
> happening:


...

timely is right -- any idea how I was able to debug earlier kernels ?
I appreciate your perspective of doing this blind -- any idea what
I'm doing to _cause_ this? I'd rather not rebuild gdb ...

Mark

>
> 602c602
> <       if (textlow_not_set
> ---
> >       if (pst && (textlow_not_set
> 605c605
> <               != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)))
> ---
> >               != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT))))
> 649c649
> <       if (textlow_not_set
> ---
> >       if (pst && (textlow_not_set
> 652c652
> <               != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)))
> ---
> >               != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT))))
>
> I don't claim that this is a great solution, in that I have no
> real sense of what the code is doing, but this change does get
> rid of the null pointer dereference that's blowing you up.
>
>   -- David Wright, Consulting Engineer
>      InfiniSwitch Corp., Westborough, MA
>
> > -----Original Message-----
> > From: Mark Pilon [mailto:mpilon@midrivers.com]
> > Sent: Wednesday, October 31, 2001 2:44 PM
> > To: linuxppc-embedded@lists.linuxppc.org
> > Subject: mvista gdb 5.0 core dumping
> >
> >
> >
> > I'm trying to debug the a kernel build from the 2_4_devel tree,
> > built w/ a toolset I built, debugging w/ mvista's 5.0 gdb:
> >
> > ppc_405-gdb vmlinux
> > GNU gdb 5.0
> > Copyright 2000 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 "--host=i686-pc-linux-gnu
> > --target=powerpc-hardhat-linux"...Segmentation fault (core dumped)
> >
> > attempting to debug gdb:
> >
> > [mpilon@wolf linuxppc_2_4_devel]$ gdb `which ppc_405-gdb` core
> > GNU gdb 19991004
> > Copyright 1998 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 "i386-redhat-linux"...
> > Core was generated by `ppc_405-gdb vmlinux'.
> > Program terminated with signal 11, Segmentation fault.
> > Reading symbols from /usr/lib/libncurses.so.4...done.
> > Reading symbols from /lib/libm.so.6...done.
> > Reading symbols from /lib/libdl.so.2...done.
> > Reading symbols from /lib/libc.so.6...done.
> > Reading symbols from /lib/ld-linux.so.2...done.
> > #0  0x80d9efe in read_dbx_symtab (objfile=0x81dec00)
> >     at ../../gdb/partial-stab.h:654
> > 654     ../../gdb/partial-stab.h: No such file or directory.
> > (gdb) where
> > #0  0x80d9efe in read_dbx_symtab (objfile=0x81dec00)
> >     at ../../gdb/partial-stab.h:654
> > #1  0x80d8a41 in dbx_symfile_read (objfile=0x81dec00, mainline=0)
> >     at ../../gdb/dbxread.c:631
> > #2  0x80db4c9 in elfstab_build_psymtabs (objfile=0x81dec00,
> > mainline=0,
> >     staboffset=1527808, stabsize=1260, stabstroffset=1529068,
> > stabstrsize=1597)
> >     at ../../gdb/dbxread.c:2652
> > #3  0x80de1f4 in elf_symfile_read (objfile=0x81dec00, mainline=0)
> >     at ../../gdb/elfread.c:663
> > #4  0x8084d3e in syms_from_objfile (objfile=0x81dec00,
> > addrs=0xbffff280,
> >     mainline=1, verbo=0) at ../../gdb/symfile.c:807
> > #5  0x8084ee2 in symbol_file_add (name=0x81d3718 "vmlinux",
> > from_tty=0,
> >     addrs=0x0, mainline=1, flags=32) at ../../gdb/symfile.c:943
> > #6  0x8085157 in symbol_file_command (args=0xbffffb40
> > "vmlinux", from_tty=0)
> >     at ../../gdb/symfile.c:1087
> > #7  0x80b377c in do_captured_command (data=0xbffff7a4) at
> > ../../gdb/top.c:679
> > #8  0x80b36f3 in catch_errors (func=0x80b376c <do_captured_command>,
> >     args=0xbffff7a4, errstring=0x8169840 "", mask=6) at
> > ../../gdb/top.c:615
> > #9  0x80b37ba in catch_command_errors (
> >     command=0x8084f9c <symbol_file_command>, arg=0xbffffb40 "vmlinux",
> >     from_tty=0, mask=6) at ../../gdb/top.c:699
> > #10 0x806b2ab in captured_main (data=0xbffff9d0) at
> > ../../gdb/main.c:603
> > #11 0x80b36f3 in catch_errors (func=0x806ab24 <captured_main>,
> >     args=0xbffff9d0, errstring=0x8149451 "", mask=6) at
> > ../../gdb/top.c:615
> > #12 0x806b4ff in main (argc=2, argv=0xbffffa24) at
> > ../../gdb/main.c:761
> > (gdb)
> >
> > any ideas what could be causing this?  I've debugged kernels before
> > w/ toolsets I've built.
> >
> > thanks,
> >
> > Mark
> >
> > --
> > Mark Pilon
> >
> > Minolta-QMS
> > P.O. Box 37
> > Fallon, MT.  59326-0037
> >
> > 1-406-853-0433
> >
> >
> >

--
Mark Pilon

Minolta-QMS
P.O. Box 37
Fallon, MT.  59326-0037

1-406-853-0433

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-10-31 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-31 19:50 mvista gdb 5.0 core dumping Wright, David
2001-10-31 20:05 ` Mark Pilon
  -- strict thread matches above, loose matches on Subject: below --
2001-10-31 19:43 Mark Pilon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).