Re: [git pull] kgdb-light -v8,

From: Jan Kiszka
Date: Mon Feb 11 2008 - 11:42:46 EST


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;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/