logo       

Re: weak declarations for set_breakpoint and remove_breakpoint: msg#00072

linux.kernel.debugging.kgdb.bugs

Subject: Re: weak declarations for set_breakpoint and remove_breakpoint

On Tue, Jan 10, 2006 at 09:10:03PM +0530, Milind Dumbare wrote:

> Patch attached below puts weak declaration of kgdb_arch_set_breakpoint &
> kgdb_arch_remove_breakpoint in kernel/kgdb.c and changes
> kgdb_activate_sw_breakpoints & kgdb_deactivate_sw_breakpoints
> accordingly.
[snip]
> +return 0;
> +}
[snip]
> +return 0;
> +}

Odd spacing.

> @@ -776,26 +801,12 @@
> int kgdb_activate_sw_breakpoints(void)
> {
> int i;
> - int error = 0;
> unsigned long addr;
> for (i = 0; i < MAX_BREAKPOINTS; i++) {
> if (kgdb_break[i].state != bp_set)
> continue;
> addr = kgdb_break[i].bpt_addr;
> - if (kgdb_ops->set_breakpoint) {
> - if ((error = kgdb_ops->set_breakpoint(addr,
> - kgdb_break[i].saved_instr)) < 0)
> - return error;
> - } else {
> - if ((error = kgdb_get_mem((char *)addr,
> - kgdb_break[i].saved_instr,
> - BREAK_INSTR_SIZE)) < 0)
> - return error;
> -
> - if ((error = kgdb_set_mem((char *)addr,
> kgdb_ops->gdb_bpt_instr,
> - BREAK_INSTR_SIZE)) < 0)
> - return error;
> - }
> + kgdb_arch_set_breakpoint(addr, kgdb_break[i].saved_instr);

This should be:
if ((error = kgdb_arch_set_breakpoint(addr,
kgdb_break[i].saved_instr))
return error;

> @@ -850,21 +861,12 @@
> int kgdb_deactivate_sw_breakpoints(void)

Same.

--
Tom Rini
http://gate.crashing.org/~trini/


-------------------------------------------------------
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