This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: move agent opcodes to common file
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Fri, 18 Feb 2011 18:56:05 +0000
- Subject: Re: RFC: move agent opcodes to common file
- References: <m3ei773ae3.fsf@fleche.redhat.com>
Looks good to me.
Hmm. I think it'd be a good idea to wrap the direct accesses
to the gdb_agent_op_names array (there are a few
`gdb_agent_op_names[op]' in the code, in a function that
checks that "op" doesn't overflow the array length before
dereferencing it, and returns "?undef?" or something like that
if it does over- or underflow. It look like it'll happen if
you connect a new gdb to an older gdbserver with --debug enabled,
and send it the new opcodes.
--
Pedro Alves