diff options
author | Stan Cox <scox@redhat.com> | 2009-04-22 11:34:14 -0400 |
---|---|---|
committer | Stan Cox <scox@redhat.com> | 2009-04-22 11:34:14 -0400 |
commit | 247f1e1fa09953347a4e5313ae0022f151316dae (patch) | |
tree | f0eafdab892bad048275c64c84f8873bc290c166 /tapsets.cxx | |
parent | 3a748561b96b9f67cf37731055a665cb491b48ab (diff) | |
download | systemtap-steved-247f1e1fa09953347a4e5313ae0022f151316dae.tar.gz systemtap-steved-247f1e1fa09953347a4e5313ae0022f151316dae.tar.xz systemtap-steved-247f1e1fa09953347a4e5313ae0022f151316dae.zip |
Make sdt.h big endian aware.
* sdt.h: Use .quad instead of .long for .probe section addresses.
ia64 and s390 require 'nop 0' and x86 tolerates it.
* tapsets.cxx (build): Fetch probe_name in a big endian friendly fashion.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index c4bfa488..bfc1d541 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -5978,7 +5978,7 @@ dwarf_builder::build(systemtap_session & sess, if (probe_scn_offset % (sizeof(__uint64_t))) probe_scn_offset += sizeof(__uint64_t) - (probe_scn_offset % sizeof(__uint64_t)); - probe_name = ((char*)((long)(pdata->d_buf) + (long)(*((int*)((long)pdata->d_buf + probe_scn_offset)) - probe_scn_addr))); + probe_name = ((char*)((long)(pdata->d_buf) + (long)(*((long*)((char*)pdata->d_buf + probe_scn_offset)) - probe_scn_addr))); probe_scn_offset += sizeof(void*); if (probe_scn_offset % (sizeof(__uint64_t))) probe_scn_offset += sizeof(__uint64_t) - (probe_scn_offset % sizeof(__uint64_t)); @@ -5997,7 +5997,7 @@ dwarf_builder::build(systemtap_session & sess, continue; const token* sv_tok = location->components[1]->arg->tok; location->components[1]->functor = TOK_STATEMENT; - location->components[1]->arg = new literal_number((int)probe_arg); + location->components[1]->arg = new literal_number((long)probe_arg); location->components[1]->arg->tok = sv_tok; ((literal_map_t&)parameters)[TOK_STATEMENT] = location->components[1]->arg; |