public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/5634] New: support pointer type punning
@ 2008-01-17 18:32 fche at redhat dot com
  2008-03-11 18:35 ` [Bug translator/5634] " jkenisto at us dot ibm dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: fche at redhat dot com @ 2008-01-17 18:32 UTC (permalink / raw)
  To: systemtap

It would be helpful to have a syntax for pointer type casting,
for times when the static type of the pointer does not match
the dynamic (actual) type.  Currently, this requires embedded-C
code to get around.

Perhaps like this:
    $ptr("struct tcp_socket")->tcp_socket_field

A more C-like syntax would be:
 ((struct tcp_socket*)$ptr)->tcp_socket_field
but parsing that is much more complicated.

-- 
           Summary: support pointer type punning
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=5634

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug translator/5634] support pointer type punning
  2008-01-17 18:32 [Bug translator/5634] New: support pointer type punning fche at redhat dot com
@ 2008-03-11 18:35 ` jkenisto at us dot ibm dot com
  2008-05-19 23:41 ` mhiramat at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jkenisto at us dot ibm dot com @ 2008-03-11 18:35 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jkenisto at us dot ibm dot com  2008-03-11 18:34 -------
Yes, this would be very useful, whatever the syntax.

In the example given, the pointer is a target variable ($ptr), but it seems
important to be able to cast script variables as well.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5634

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug translator/5634] support pointer type punning
  2008-01-17 18:32 [Bug translator/5634] New: support pointer type punning fche at redhat dot com
  2008-03-11 18:35 ` [Bug translator/5634] " jkenisto at us dot ibm dot com
@ 2008-05-19 23:41 ` mhiramat at redhat dot com
  2008-06-27 23:13 ` fche at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mhiramat at redhat dot com @ 2008-05-19 23:41 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From mhiramat at redhat dot com  2008-05-19 21:19 -------
Can this support casting to an array like below?

((struct tcp_socket[])$ptr)[1]->tcp_socket_field

or 

$ptr("struct tcp_socket []")[0]->tcp_socket_field


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5634

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug translator/5634] support pointer type punning
  2008-01-17 18:32 [Bug translator/5634] New: support pointer type punning fche at redhat dot com
  2008-03-11 18:35 ` [Bug translator/5634] " jkenisto at us dot ibm dot com
  2008-05-19 23:41 ` mhiramat at redhat dot com
@ 2008-06-27 23:13 ` fche at redhat dot com
  2008-08-01 14:28 ` twoerner at redhat dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: fche at redhat dot com @ 2008-06-27 23:13 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2008-06-27 20:51 -------
*** Bug 6704 has been marked as a duplicate of this bug. ***

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5634

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug translator/5634] support pointer type punning
  2008-01-17 18:32 [Bug translator/5634] New: support pointer type punning fche at redhat dot com
                   ` (2 preceding siblings ...)
  2008-06-27 23:13 ` fche at redhat dot com
@ 2008-08-01 14:28 ` twoerner at redhat dot com
  2008-08-01 14:29 ` twoerner at redhat dot com
  2009-01-30  2:13 ` fche at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: twoerner at redhat dot com @ 2008-08-01 14:28 UTC (permalink / raw)
  To: systemtap



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|                            |twoerner@redhat.com


http://sourceware.org/bugzilla/show_bug.cgi?id=5634

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug translator/5634] support pointer type punning
  2008-01-17 18:32 [Bug translator/5634] New: support pointer type punning fche at redhat dot com
                   ` (3 preceding siblings ...)
  2008-08-01 14:28 ` twoerner at redhat dot com
@ 2008-08-01 14:29 ` twoerner at redhat dot com
  2009-01-30  2:13 ` fche at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: twoerner at redhat dot com @ 2008-08-01 14:29 UTC (permalink / raw)
  To: systemtap



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |twoerner at redhat dot com
  GCC build triplet|twoerner@redhat.com         |


http://sourceware.org/bugzilla/show_bug.cgi?id=5634

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug translator/5634] support pointer type punning
  2008-01-17 18:32 [Bug translator/5634] New: support pointer type punning fche at redhat dot com
                   ` (4 preceding siblings ...)
  2008-08-01 14:29 ` twoerner at redhat dot com
@ 2009-01-30  2:13 ` fche at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: fche at redhat dot com @ 2009-01-30  2:13 UTC (permalink / raw)
  To: systemtap



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |jistone at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=5634

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-29 21:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-17 18:32 [Bug translator/5634] New: support pointer type punning fche at redhat dot com
2008-03-11 18:35 ` [Bug translator/5634] " jkenisto at us dot ibm dot com
2008-05-19 23:41 ` mhiramat at redhat dot com
2008-06-27 23:13 ` fche at redhat dot com
2008-08-01 14:28 ` twoerner at redhat dot com
2008-08-01 14:29 ` twoerner at redhat dot com
2009-01-30  2:13 ` fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).