Bug 3625 - need better error messages for $target expression problems
Summary: need better error messages for $target expression problems
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: David Smith
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-30 18:39 UTC by Frank Ch. Eigler
Modified: 2007-02-19 21:55 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ch. Eigler 2006-11-30 18:39:36 UTC
While it's improved, it would be nice to give users a list of valid options for
$target expressions.  For example, if a nonexistent variable is referenced
($foo), we could list the variables that *are* available.  If a nonexistent
field ($foo->field) is given, similarly we could list the valid ones.  Etc.

This would supplant the (uninstalled) loc2c-test widget.
Comment 1 David Smith 2007-02-15 21:57:26 UTC
I've added code to src/tapsets.cxx to:
- list variables that exist when a non-existent target variable is accessed
- list structure members that exist when a non-existent structure member is
accessesd
Comment 2 Frank Ch. Eigler 2007-02-19 21:55:09 UTC
For the first case, does the variable lister also add in the globalish variables
reachable from parent scopes?  It may need to traverse the die's upward in a
similar way as find_variable_and_frame_base().