symbolic debug of loadable modules with kgdb light
Caz Yokoyama
cazyokoyama@gmail.com
Fri Oct 2 01:18:00 GMT 2009
Hello Joel,
Please start the paperwork for filing an assignment with the FSF. I don't
have a employer. This is a volunteer work while on job hunting.
Please find the updated patch in attachment.
- interrupt_sequence_sysrq_g -> interrupt_sequence_break_g
- Linux kernel -> The Linux kernel
- Tested. No regression.
-caz
-----Original Message-----
From: Joel Brobecker [mailto:brobecker@adacore.com]
Sent: Thursday, October 01, 2009 4:33 PM
To: Caz Yokoyama
Cc: 'Eli Zaretskii'; gdb-patches@sourceware.org; 'Daniel Jacobowitz'; 'Pedro
Alves'
Subject: Re: symbolic debug of loadable modules with kgdb light
> +2009-10-01 Kazuyoshi Caz Yokoyama <caz@caztech.com>
> +
> + * remote.c (interrupt_sequence_control_c)
> + (interrupt_sequence_break, interrupt_sequence_sysrq_g)
> + (interrupt_sequence_modes): New constants.
> + (interrupt_sequence_mode, interrupt_on_connect): New variable.
> + (show_interrupt_sequence): New function.
> + (set_remotebreak, show_remotebreak): New function.
> + (send_interrupt_sequence): New function.
> + (remote_start_remote): Call send_interrupt_sequence if
> + interrupt_on_connect is true.
> + (remote_stop_as): Call send_interrupt_sequence.
> + (_initialize_remote): Add interrupt-sequence and
interrupt-on-connect,
> + modify remotebreak to call set_remotebreak and show_remotebreak.
Very nice and clean! Just a few nits as shown below, but they are minor
and can be mechanically fixed. So the code part of the patch is
pre-approved, after you address the last comments below (it means that
you have permission to commit the patch, but please make sure to send
a copy of the patch that you end up checking in). I think Eli already
approved the latest version of the documentation part, but he'll
probably want to have a last quick look.
And of course, now that I talk about checking in your patch, I am
now only realizing that you do not seem to have an assignment filed
with the FSF. This is a requirement for us to accept your patch.
Perhaps you have an assignment on file through your employer?
I couldn't find you in their records using either your name or
email domain. Let me know if you'd like me to get you started with
the paperwork. It takes a few weeks, so start ASAP if needed.
> +const char interrupt_sequence_sysrq_g[] = "BREAK-g";
You forgot to rename this constant to interrupt_sequence_break_g,
to match the actual litteral value.
> +/* This boolean variable specifies whether interrupt_sequence is sent
> + to remote target when gdb connect to it.
> + This is mostly needed when you debug Linux kernel.
> + Linux kernel expects BREAK g which is Magic SysRq g for connecting
gdb. */
I've noticed a few English mistakes. I started pointed them out, but in
the end, it's probably simpler if I give you the correct version:
/* This boolean variable specifies whether interrupt_sequence is sent
to the remote target when gdb connects to it.
This is mostly needed when you debug theLinux kernel: The Linux kernel
expects BREAK g which is Magic SysRq g for connecting gdb. */
> + struct cmd_list_element *cmd;
> + static char *cmd_name;
This should not be static. That way, it gets allocated on the stack
and then released after the function returns.
--
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remotebreak.patch
Type: application/octet-stream
Size: 12607 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20091002/2145bdc0/attachment.obj>
More information about the Gdb-patches
mailing list