* how to add debug information into the vmlinux
@ 2007-08-17 20:49 Xu Yang
2007-08-17 21:30 ` Jesper Juhl
0 siblings, 1 reply; 6+ messages in thread
From: Xu Yang @ 2007-08-17 20:49 UTC (permalink / raw)
To: linux-kernel
Hello everyone,
I am trying to port kernel 2.6.19 onto my system.so I need the c code
, which can show me where the program is running. I add -g when I
compile it.
after I got the vmlinux( uncompressed) I used arm-none-eabi-objcopy
--change-addresses 0x40000000 to change the start address.
it seems that the debug information is strange. expecially after the
mmu is turned on , it totally disappreared.
anyone knows how to handle this?
thanks in advance.
regards,
yang
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to add debug information into the vmlinux
2007-08-17 20:49 how to add debug information into the vmlinux Xu Yang
@ 2007-08-17 21:30 ` Jesper Juhl
2007-08-18 19:49 ` Xu Yang
0 siblings, 1 reply; 6+ messages in thread
From: Jesper Juhl @ 2007-08-17 21:30 UTC (permalink / raw)
To: Xu Yang; +Cc: linux-kernel
On 17/08/07, Xu Yang <risingsunxy@googlemail.com> wrote:
> Hello everyone,
>
> I am trying to port kernel 2.6.19 onto my system.so I need the c code
> , which can show me where the program is running. I add -g when I
> compile it.
>
You shouldn't need to do that manually, simply go into "make
menuconfig", enter the "Kernel hacking" menu and select the "Kernel
debugging" and "Compile the kernel with debug info" options.
You may also want to enable "Compile the kernel with frame pointers"
and various other options in that menu to get more debug info.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to add debug information into the vmlinux
2007-08-17 21:30 ` Jesper Juhl
@ 2007-08-18 19:49 ` Xu Yang
2007-08-18 19:54 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Xu Yang @ 2007-08-18 19:49 UTC (permalink / raw)
To: Jesper Juhl; +Cc: linux-kernel
Hi Jesper,
I tried as what you told me. and the vmlinux does contain debug
information. but the start address of this vmlinux is 0xc0008000. when
I tried to run this vmlinux, the program always exit at 0x80a0. I
checked out that here is the place mmu is turned on.
so I used objcopy --change-addresses 0x40000000 to change the start
address of the vmlinux, and the program goes further.but the debug
information disappeared.
how to handle this? (making the program running and debug information available)
thanks,
regards,
yang
2007/8/17, Jesper Juhl <jesper.juhl@gmail.com>:
> On 17/08/07, Xu Yang <risingsunxy@googlemail.com> wrote:
> > Hello everyone,
> >
> > I am trying to port kernel 2.6.19 onto my system.so I need the c code
> > , which can show me where the program is running. I add -g when I
> > compile it.
> >
> You shouldn't need to do that manually, simply go into "make
> menuconfig", enter the "Kernel hacking" menu and select the "Kernel
> debugging" and "Compile the kernel with debug info" options.
> You may also want to enable "Compile the kernel with frame pointers"
> and various other options in that menu to get more debug info.
>
>
> --
> Jesper Juhl <jesper.juhl@gmail.com>
> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
> Plain text mails only, please http://www.expita.com/nomime.html
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to add debug information into the vmlinux
2007-08-18 19:49 ` Xu Yang
@ 2007-08-18 19:54 ` Jan Engelhardt
2007-08-18 20:01 ` Xu Yang
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2007-08-18 19:54 UTC (permalink / raw)
To: Xu Yang; +Cc: Jesper Juhl, linux-kernel
On Aug 18 2007 21:49, Xu Yang wrote:
>
>I tried as what you told me. and the vmlinux does contain debug
>information. but the start address of this vmlinux is 0xc0008000. when
>I tried to run this vmlinux, the program always exit at 0x80a0. I
>checked out that here is the place mmu is turned on.
>so I used objcopy --change-addresses 0x40000000 to change the start
>address of the vmlinux, and the program goes further.but the debug
>information disappeared.
Are you using an UML image... or were you really trying to gdb a real vmlinux?
Jan
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to add debug information into the vmlinux
2007-08-18 19:54 ` Jan Engelhardt
@ 2007-08-18 20:01 ` Xu Yang
2007-08-18 21:10 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Xu Yang @ 2007-08-18 20:01 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Jesper Juhl, linux-kernel
this vmlinux file is running on my software virtual prototype system.
and my software enviorment can only load elf file, so I am using this
real vmlinux file.
regards,
Yang
2007/8/18, Jan Engelhardt <jengelh@computergmbh.de>:
>
> On Aug 18 2007 21:49, Xu Yang wrote:
> >
> >I tried as what you told me. and the vmlinux does contain debug
> >information. but the start address of this vmlinux is 0xc0008000. when
> >I tried to run this vmlinux, the program always exit at 0x80a0. I
> >checked out that here is the place mmu is turned on.
> >so I used objcopy --change-addresses 0x40000000 to change the start
> >address of the vmlinux, and the program goes further.but the debug
> >information disappeared.
>
> Are you using an UML image... or were you really trying to gdb a real vmlinux?
>
>
>
> Jan
> --
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to add debug information into the vmlinux
2007-08-18 20:01 ` Xu Yang
@ 2007-08-18 21:10 ` Jan Engelhardt
0 siblings, 0 replies; 6+ messages in thread
From: Jan Engelhardt @ 2007-08-18 21:10 UTC (permalink / raw)
To: Xu Yang; +Cc: Jesper Juhl, linux-kernel
On Aug 18 2007 22:01, Xu Yang wrote:
>
>this vmlinux file is running on my software virtual prototype system.
>and my software enviorment can only load elf file, so I am using this
>real vmlinux file.
Maybe there is a problem in your virtual prototype system (VM?).
Jan
--
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-08-18 21:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-17 20:49 how to add debug information into the vmlinux Xu Yang
2007-08-17 21:30 ` Jesper Juhl
2007-08-18 19:49 ` Xu Yang
2007-08-18 19:54 ` Jan Engelhardt
2007-08-18 20:01 ` Xu Yang
2007-08-18 21:10 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®