This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: move agent opcodes to common file


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]