[PATCH] Disallow non-scalars as rvalues in agent expressions
Stan Shebs
stan@codesourcery.com
Thu Mar 18 05:00:00 GMT 2010
Bad Stuff(tm) happens when you try to compile an agent expression that
wants to use a non-scalar object like a struct. (We're talking about
the struct itself, not a pointer to it.) Now, it actually works in GDB
to say "print (int)bigstruct" - the first 32 bits of the struct get made
into an integer, and the rest is discarded. While in theory the
bytecode compiler could do likewise, and perhaps someone will make that
happen someday (it's not as simple as taking address, struct might be
partly in registers), in the meantime we need to prevent non-scalar
types from triggering internal errors all over the place. Committed to
trunk.
Stan
2010-03-17 Stan Shebs <stan@codesourcery.com>
* ax-gdb.c (require_rvalue): Disallow non-scalars.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nonscalar-patch-1
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100318/6bd2c560/attachment.ksh>
More information about the Gdb-patches
mailing list