lkml.org 
[lkml]   [2008]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [git pull] kgdb-light -v8,
Ingo Molnar wrote:
> In any case, if there are any open issues we are very much ready and
> willing to address them now or after any potential upstream merge of
> this codebase. This has meanwhile become one of the best-reviewed pieces
> of kernel code in living memory ;-)
>

I spotted one... :)

> +int __weak kgdb_validate_break_address(unsigned long addr)
> +{
> + char tmp_variable[BREAK_INSTR_SIZE];
> +
> + return probe_kernel_read((char *)addr, tmp_variable, BREAK_INSTR_SIZE);

...dst and src are twisted. Fix below (should make sw-breakpoints work
again).

Jan


diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index dce89d1..10fe113 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -153,14 +153,14 @@ int __weak kgdb_validate_break_address(unsigned long addr)
{
char tmp_variable[BREAK_INSTR_SIZE];

- return probe_kernel_read((char *)addr, tmp_variable, BREAK_INSTR_SIZE);
+ return probe_kernel_read(tmp_variable, (char *)addr, BREAK_INSTR_SIZE);
}

int __weak kgdb_arch_set_breakpoint(unsigned long addr, char *saved_instr)
{
int err;

- err = probe_kernel_read((char *)addr, saved_instr, BREAK_INSTR_SIZE);
+ err = probe_kernel_read(saved_instr, (char *)addr, BREAK_INSTR_SIZE);
if (err)
return err;



\
 
 \ /
  Last update: 2008-02-11 17:45    [W:0.071 / U:7.064 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site