From: fachkar.datawind@gmail.com (f. achkar)
To: linux-arm-kernel@lists.infradead.org
Subject: using openocd + gdb to debug linux kernel on arm926ejs
Date: Wed, 26 May 2010 16:34:20 -0400 [thread overview]
Message-ID: <4BFD85CC.7020807@gmail.com> (raw)
In-Reply-To: <AANLkTikfGIBaYnFskW4_TUzfWXBIy9fIqziNcedQwE8M@mail.gmail.com>
On 05/26/2010 04:11 PM, Steve Chen wrote:
> On Wed, May 26, 2010 at 2:51 PM, f. achkar <fachkar.datawind@gmail.com> wrote:
>
>> On 05/26/2010 03:41 PM, Steve Chen wrote:
>>
>>> On Wed, May 26, 2010 at 2:12 PM, f. achkar <fachkar.datawind@gmail.com> wrote:
>>>
>>>
>>>> hi,
>>>> This is my second posting (I'm not sure the first one passed the filter) sorry for that ...
>>>>
>>>> I'm newbie and have a s3c2450 based board (arm926ejs), I have a working compressed kernel image
>>>> zImage, this image boots properly via u-boot-1.1.6, however I simply
>>>> failed to debug remotely the vmlinux (root directory of linux source tree) via openocd-0.4.0 with a j-link segger.
>>>> is there a good reference on how to properly debug the linux kernel via openocd/gdb for an arm target on a linux hot machine?
>>>>
>>>>
>>> Actually, Nicolas Pitre posted an response in your first try. In
>>> summary, use uImage for uboot. vmlinux won't work.
>>>
>>> Regards,
>>>
>>> Steve
>>>
>>>
>> Steve,
>> thanks, I'm not sure I got what you mean! if I do the following:
>> gdb arch/arm/boot/uImage
>> GNU gdb (GDB) 6.8.50.20090417
>> ...
>> "/home/ferar/DW-SB02-linux-final/arch/arm/boot/uImage": not in
>> executable format: File format not recognized
>> (gdb) target remote localhost:3333
>> Remote debugging using localhost:3333
>> 0xc0008164 in ?? ()
>> 0xc0008164: b 0xc0008160
>> (gdb) set remote hardware-breakpoint-limit 2
>> (gdb) set remote hardware-watchpoint-limit 2
>> (gdb) load
>> No executable file specified.
>> Use the "file" or "exec-file" command.
>>
>> Note it is not executable format, I need to load and debug the kernel
>> not just boot (I don't have booting issues) I'm having trouble trying to
>> debug the kernel via jtag (openocd) gdb as outlined in the detail part
>> of my previous post! I wonder if you people got that portion of the post?
>> thanks,
>> ferar
>>
>>
> I have never used gdb to debug the kernel, so I'm not qualify to
> answer your questions. In general, if you need to use gdb (actually
> more accurately kgdb), you need to something like
>
thanks Steve,
let say I'm 95% sure that if you have jtag you don't need kgdb you
simply use gdb through the IEEE 1149.1 standard (1990!). Also for you
information you can use the jtag for boundary scan which also quite
useful (I think ;-/ ).
I'm sure few intelligent humans on this form have the know-how, and hope
they share that with the rest of us.
best regards,
ferar
> 1. Enable kgdb in the kernel config.
> 2. Boot your kernel as usual.
> 3. run cross-gdb on your host machine.
> 4. Do remote debugging in gdb from your host via either serial or
> Ethernet depends on how you have it configured.
>
> Regards,
>
> Steve
>
next prev parent reply other threads:[~2010-05-26 20:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 19:12 using openocd + gdb to debug linux kernel on arm926ejs f. achkar
2010-05-26 19:41 ` Steve Chen
2010-05-26 19:51 ` f. achkar
2010-05-26 20:11 ` Steve Chen
2010-05-26 20:34 ` f. achkar [this message]
2010-07-21 22:44 ` debugging kernel with gdb Jeff Hane
2010-07-22 17:15 ` Baurzhan Ismagulov
2010-07-23 6:53 ` ikjn
2010-05-26 19:46 ` using openocd + gdb to debug linux kernel on arm926ejs Kees Jongenburger
2010-05-26 20:25 ` f. achkar
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=4BFD85CC.7020807@gmail.com \
--to=fachkar.datawind@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).