From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: sergiodj@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Extend SystemTap SDT probe argument parser
Date: Mon, 16 Dec 2013 17:09:00 -0000 [thread overview]
Message-ID: <201312161708.rBGH8m8L017003@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <m3fvps20i5.fsf@redhat.com> (message from Sergio Durigan Junior on Mon, 16 Dec 2013 15:01:38 -0200)
> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Date: Mon, 16 Dec 2013 15:01:38 -0200
>
> On Wednesday, December 11 2013, I wrote:
>
> > This patch extends the current generic parser for SystemTap SDT probe
> > arguments. It can be almost considered a cleanup, but the main point of
> > it is actually to allow the generic parser to accept multiple prefixes
> > and suffixes for the its operands (i.e., integers, register names, and
> > register indirection).
>
> Ping.
Can't say I like the added complexity, but the i386/amd64 are ok.
> > I have chosen to implement this as a list of const strings, which needs
> > to be declared as "static const char *const *", and is provided to
> > gdbarch on initialization. I think it is cleaner to implement it this
> > way, but for a moment I wondered whether demanding the variables to be
> > declared as "static" is a good idea... After some thought and
> > discussion, I decided to leave it as is.
> >
> > This patch is actually a preparation for an upcoming patch for ARM,
> > which implements the support for multiple integer prefixes (as defined
> > by ARM's asm spec). And AArch64 will also need this, for the same
> > reason.
> >
> > This patch was regtested on all architectures that it touches (i.e.,
> > i386, x86_64, ARM, PPC/PPC64, s390x and IA-64). No regressions were found.
> >
> > 2013-12-11 Sergio Durigan Junior <sergiodj@redhat.com>
> >
> > * amd64-tdep.c (amd64_init_abi): Declare SystemTap SDT probe
> > argument prefixes and suffixes. Initialize gdbarch with them.
> > * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
> > * gdbarch.c: Regenerate.
> > * gdbarch.h: Regenerate.
> > * gdbarch.sh (stap_integer_prefix, stap_integer_suffix)
> > (stap_register_prefix, stap_register_suffix)
> > (stap_register_indirection_prefix)
> > (stap_register_indirection_suffix): Declare as "const char *const
> > *" instead of "const char *". Adjust printing function.
> > (pstring_list): New function.
> > * i386-tdep.c (i386_elf_init_abi): Declare SystemTap SDT probe
> > argument prefixes and suffixes. Initialize gdbarch with them.
> > * ia64-linux-tdep.c (ia64_linux_init_abi): Likewise.
> > * ppc-linux-tdep.c (ppc_linux_init_abi): Likewise.
> > * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
> > * stap-probe.c (stap_is_generic_prefix): New function.
> > (stap_is_register_prefix): Likewise.
> > (stap_is_register_indirection_prefix): Likewise.
> > (stap_is_integer_prefix): Likewise.
> > (stap_generic_check_suffix): Likewise.
> > (stap_check_integer_suffix): Likewise.
> > (stap_check_register_suffix): Likewise.
> > (stap_check_register_indirection_suffix): Likewise.
> > (stap_parse_register_operand): Remove unecessary declarations for
> > variables holding prefix and suffix information. Use the new
> > functions listed above for checking for prefixes and suffixes.
> > (stap_parse_single_operand): Likewise.
> > ---
> > gdb/ChangeLog | 31 ++++++
> > gdb/amd64-tdep.c | 14 ++-
> > gdb/arm-linux-tdep.c | 14 ++-
> > gdb/gdbarch.c | 71 +++++++-----
> > gdb/gdbarch.h | 76 +++++++++----
> > gdb/gdbarch.sh | 79 +++++++++++---
> > gdb/i386-tdep.c | 15 ++-
> > gdb/ia64-linux-tdep.c | 11 +-
> > gdb/ppc-linux-tdep.c | 11 +-
> > gdb/s390-linux-tdep.c | 11 +-
> > gdb/stap-probe.c | 291 +++++++++++++++++++++++++++++++++++++-------------
next prev parent reply other threads:[~2013-12-16 17:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 3:56 Sergio Durigan Junior
2013-12-16 17:01 ` Sergio Durigan Junior
2013-12-16 17:09 ` Mark Kettenis [this message]
2013-12-16 17:16 ` Sergio Durigan Junior
2013-12-17 11:03 ` Pedro Alves
2013-12-17 17:28 ` Sergio Durigan Junior
2013-12-17 19:46 ` Pedro Alves
2013-12-17 21:06 ` Sergio Durigan Junior
2013-12-19 20:58 ` Sergio Durigan Junior
2013-12-19 21:09 ` Mark Kettenis
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=201312161708.rBGH8m8L017003@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@redhat.com \
/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