logo       

kgdb on arm for 2.6: msg#00061

linux.kernel.debugging.kgdb.bugs

Subject: kgdb on arm for 2.6

Hi,

I'm trying to get kgdb working on a custom non-MMU ARM-based platform but am running into problems. I can add a call to breakpoint() in the kernel and am able to connect with gdb/ddd but I cant step or resume execution once stopped. I can view memory and registers, view the backtrace, etc so I know my custom serial code is working OK. In trying to track down the breakpoint issue, I found that both kgdb_set_mem() and kgdb_get_mem() have the following lines:

if ((unsigned long)addr < TASK_SIZE)
return -EINVAL;

I'm loading the kernel starting at address 0 so the address value being passed in is fairly small (my kernel image is only a couple meg). On my platform, I wasn't sure what to set TASK_SIZE to so I copied what some other arm-based platforms have and set it to 0x01a00000UL. This of course causes all get or set mem calls to fail. If I comment-out these checks I can set the breakpoint correctly and continue to it. I'm hoping someone can help me understand what this check is supposed to be doing and if I should be setting TASK_SIZE much smaller than I currently am.

Also, at any breakpoint, if I try to execute a step/next, I always get "warning: Invalid remote reply:" returned. Should this work on an ARM (nommu) platform?

By the way, for reference, I'm using 2.6.14.3 with both the uc0 and hsc0 patches applied in addition to all the current kgdb patches.

Thanks,
Lance


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise