public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Alexander Lochmann <alexander.lochmann@tu-dortmund.de>
To: David Smith <dsmith@redhat.com>, Josh Stone <jistone@redhat.com>,
	       systemtap@sourceware.org
Subject: Re: SystemTap for Android - patchset
Date: Fri, 08 Jul 2016 05:38:00 -0000	[thread overview]
Message-ID: <577F3C55.6050508@tu-dortmund.de> (raw)
In-Reply-To: <27ef4d79-281d-f7cc-2e98-433edc2256d8@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 2381 bytes --]

On 07.07.2016 23:14, David Smith wrote:
> On 07/07/2016 03:52 PM, Alexander Lochmann wrote:
>> On 07.07.2016 19:39, David Smith wrote:
>>> OK, I'll believe you. However, your fix above still isn't correct. The
>>> whole point of autoconf-asm-syscall.c is to test if asm/syscall.h exists
>>> and is usable. If so, STAPCONF_ASM_SYSCALL_H will get defined. If
>>> autoconf-asm-syscall.c doesn't compile correctly, then
>>> STAPCONF_ASM_SYSCALL_H won't be defined.
>>>
>>> What needs to happen next here is for you to back out this change,
>>> recompile systemtap, then try to compile a few systemtap scripts. We'll
>>> need to see the errors to know what to fix. I'd guess we'll need to test
>>> STAPCONF_ASM_SYSCALL_H in some more places.
>> Ok. Here is the error message I get:
>> /tmp/stapE7HrAi/alexv9_src.c: In function
>> 'function___global__stp_syscall_nr__overload_0':
>> /tmp/stapE7HrAi/alexv9_src.c:7975:2: error: implicit declaration of
>> function '_stp_syscall_get_nr'
>>
>> I tested three scripts so far. All of them do not compile due to the
>> above error.
>> Do you need one of the scripts?
> 
> Nope.
> 
> One of the reasons we include <asm/syscall.h> is to get the kernel's
> syscall_get_nr() macros. If the kernel doesn't have a <asm/syscall.h>,
> we define our own versions of syscall_get_nr() in runtime/syscall.h. The
> arm platform already has our custom version of that macro in
> runtime/syscall.h.
> 
> I'd guess we aren't including systemtap's runtime/syscall.h in the
> proper place.  Here's a patch that might work:
> 
> ====
> diff --git a/tapset/linux/aux_syscalls.stp b/tapset/linux/aux_syscalls.stp
> index 110e6e9..2cc3cea 100644
> --- a/tapset/linux/aux_syscalls.stp
> +++ b/tapset/linux/aux_syscalls.stp
> @@ -43,6 +43,8 @@
>  // Get _stp_val_array and _stp_lookup_* definitions.
>  #include "linux/syscalls-common.h"
> 
> +#include "syscall.h"
> +
>  static void
>  _stp_lookup_str2(const _stp_val_array * const array, long val, char *ptr,
>  		 int len, int base)
> ====
> 
Yes. Works. :) At least for the four scripts I tested.

- Alex

-- 
Technische Universität Dortmund
Alexander Lochmann                PGP key: 0xBC3EF6FD
Otto-Hahn-Str. 16                 phone:  +49.231.7556141
D-44227 Dortmund                  fax:    +49.231.7556116
http://ess.cs.tu-dortmund.de/Staff/al


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-07-08  5:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f01a1f27-3cdb-61a4-cbdb-7bffd1032c8e@tu-dortmund.de>
2016-07-01 16:15 ` Alexander Lochmann
2016-07-01 16:56   ` David Smith
2016-07-01 17:47   ` Josh Stone
2016-07-06 12:29     ` Alexander Lochmann
2016-07-06 16:42       ` Frank Ch. Eigler
2016-07-06 20:05         ` Alexander Lochmann
2016-07-06 20:15           ` Frank Ch. Eigler
2016-07-06 20:27             ` Alexander Lochmann
2016-07-07 16:00       ` David Smith
2016-07-07 16:06       ` David Smith
2016-07-07 16:23         ` Alexander Lochmann
2016-07-07 17:39           ` David Smith
2016-07-07 20:51             ` Alexander Lochmann
2016-07-07 21:14               ` David Smith
2016-07-08  5:38                 ` Alexander Lochmann [this message]
2016-07-08 15:31                   ` David Smith
2016-07-07 18:47       ` David Smith
2016-07-07 19:01         ` Alexander Lochmann
2016-07-07 19:24           ` David Smith
2016-07-07 19:32             ` Alexander Lochmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577F3C55.6050508@tu-dortmund.de \
    --to=alexander.lochmann@tu-dortmund.de \
    --cc=dsmith@redhat.com \
    --cc=jistone@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).