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] Detect dwarf address size mismatch


Daniel Jacobowitz <drow@false.org> writes:
> On Wed, Jul 11, 2007 at 12:27:29PM -0700, Jim Blandy wrote:
>> Would it make sense to move the check after the extended_op switch
>> altogether, and always use extended_len to advance line_ptr?  This
>> would make GDB more robust against new extended opcodes.
>
> I thought about it; it might make sense to do this in the default
> case, but not in any of the handled cases, since they need to advance
> line_ptr anyway to read multiple items.

True.  But I think the check should go after the switch in any case;
there's no reason to only apply sanity checking to that one opcode.

But then as long as one's doing that check across all the extended
opcodes, one has the information needed to insulate the surrounding
code from the individual cases' vaguaries.

The first point seems like a definite should-do, unless I'm missing
something; the second one I agree is less clear-cut.


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