* [Bug translator/10054] improve $expr->foo->bar->zoo error messages
2009-04-10 17:39 [Bug translator/10054] New: improve $expr->foo->bar->zoo error messages fche at redhat dot com
@ 2009-04-16 9:41 ` wenji dot huang at oracle dot com
2009-04-16 15:37 ` fche at redhat dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-04-16 9:41 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2009-04-16 09:41 -------
Created an attachment (id=3887)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3887&action=view)
first stage patch
With the patch, the correct local variable name will be focused instead of
top one.
stap -e 'probe kernel.function("vfs_read") {printf(" 0x%x\n",
$file->f_op->foo)}'
semantic error: unable to find local 'foo' near pc 0xc015bf6d (alternatives:
owner ... ) : identifier '$file' at <input>:1:54
source: probe kernel.function("vfs_read") {printf(" 0x%x\n",
$file->f_op->foo)}
^
'foo' replaces the previous 'file'. And the remains parts are "identifier
$file" and the position of "^". Seems not easy to change them since they are
from e->tok.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10054
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug translator/10054] improve $expr->foo->bar->zoo error messages
2009-04-10 17:39 [Bug translator/10054] New: improve $expr->foo->bar->zoo error messages fche at redhat dot com
2009-04-16 9:41 ` [Bug translator/10054] " wenji dot huang at oracle dot com
@ 2009-04-16 15:37 ` fche at redhat dot com
2009-04-16 16:21 ` jistone at redhat dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2009-04-16 15:37 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2009-04-16 15:36 -------
That's a good start. I thought it would be better to extend the
parser/staptree to track individual tokens within the target_symbol
components (and, actually, similarly for the probe point components[]).
So that way we'd have the whole token stream.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10054
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug translator/10054] improve $expr->foo->bar->zoo error messages
2009-04-10 17:39 [Bug translator/10054] New: improve $expr->foo->bar->zoo error messages fche at redhat dot com
2009-04-16 9:41 ` [Bug translator/10054] " wenji dot huang at oracle dot com
2009-04-16 15:37 ` fche at redhat dot com
@ 2009-04-16 16:21 ` jistone at redhat dot com
2009-05-09 1:50 ` jistone at redhat dot com
2010-04-28 22:14 ` jistone at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: jistone at redhat dot com @ 2009-04-16 16:21 UTC (permalink / raw)
To: systemtap
------- Additional Comments From jistone at redhat dot com 2009-04-16 16:20 -------
(In reply to comment #1)
> Created an attachment (id=3887)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3887&action=view)
> first stage patch
>
> With the patch, the correct local variable name will be focused instead of
> top one.
[...]
> 'foo' replaces the previous 'file'. And the remains parts are "identifier
> $file" and the position of "^". Seems not easy to change them since they are
> from e->tok.
This is a good first step. However, I would rather see an error "unable to find
member ..." generated at the point of failure. We should just make the mode of
translate_components be succeed-or-throw, and then the callers can be simpler.
For getting the right token, I would suggest changing the components vector's
element-type into a real struct (instead of just a std::pair), and then the
parsing token can be saved there.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10054
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug translator/10054] improve $expr->foo->bar->zoo error messages
2009-04-10 17:39 [Bug translator/10054] New: improve $expr->foo->bar->zoo error messages fche at redhat dot com
` (2 preceding siblings ...)
2009-04-16 16:21 ` jistone at redhat dot com
@ 2009-05-09 1:50 ` jistone at redhat dot com
2010-04-28 22:14 ` jistone at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: jistone at redhat dot com @ 2009-05-09 1:50 UTC (permalink / raw)
To: systemtap
------- Additional Comments From jistone at redhat dot com 2009-05-09 01:50 -------
(In reply to comment #3)
> This is a good first step. However, I would rather see an error "unable to
> find member ..." generated at the point of failure. We should just make the
> mode of translate_components be succeed-or-throw, and then the callers can be
> simpler.
This much is done now in commit 56212da9.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10054
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug translator/10054] improve $expr->foo->bar->zoo error messages
2009-04-10 17:39 [Bug translator/10054] New: improve $expr->foo->bar->zoo error messages fche at redhat dot com
` (3 preceding siblings ...)
2009-05-09 1:50 ` jistone at redhat dot com
@ 2010-04-28 22:14 ` jistone at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: jistone at redhat dot com @ 2010-04-28 22:14 UTC (permalink / raw)
To: systemtap
------- Additional Comments From jistone at redhat dot com 2010-04-28 21:06 -------
(In reply to comment #3)
> For getting the right token, I would suggest changing the components vector's
> element-type into a real struct (instead of just a std::pair), and then the
> parsing token can be saved there.
This has been done for a while, since commit c67847a0. I think we are in good
shape for this bug now.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=10054
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread