This is the mail archive of the
frysk@sourceware.org
mailing list for the frysk project.
Re: New fhpd commands: ptype & plocation
Teresa Thomas wrote:
Following is an example taken from /Variable.java/:
// Get the DWARF operations that describe the variable's location
from its DIE
List ops = variableDie.getFormData(frame.getAdjustedAddress());
// Create a LocationExpression from it
LocationExpression locationExpression = new
LocationExpression(frame, variableDie, ops);
// Decode the expression to get the location and create a
PieceLocation from it
PieceLocation pieceLocation = new
PieceLocation(locationExpression.decode(this.getType(frame).getSize()));
pieceLocation will now contain the (list of) location(s). You can
print it by using its toPrint function, manipulate
its bytes, etc. [Refer /Location.java /and /PieceLocation.java/ (or
ping me :-) ) for its other functions]
Awesome. This is perfect, thanks
Regards
Phil