From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30502 invoked by alias); 10 Mar 2012 16:56:03 -0000 Received: (qmail 30492 invoked by uid 22791); 10 Mar 2012 16:56:01 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Mar 2012 16:55:47 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q2AGtgsS017559; Sat, 10 Mar 2012 17:55:42 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q2AGte2M019374; Sat, 10 Mar 2012 17:55:40 +0100 (CET) Date: Sat, 10 Mar 2012 16:56:00 -0000 Message-Id: <201203101655.q2AGte2M019374@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: sergiodj@redhat.com CC: gdb-patches@sourceware.org, tromey@redhat.com In-reply-to: (message from Sergio Durigan Junior on Fri, 09 Mar 2012 17:33:21 -0300) Subject: Re: [PATCH 2/3] Implement new features needed for handling SystemTap probes References: Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00373.txt.bz2 > From: Sergio Durigan Junior > Date: Fri, 09 Mar 2012 17:33:21 -0300 > > This is the second patch. It implements a bunch of new things needed to > support SystemTap probes, for both arch-dependent and independent bits. > There are new variables and methods for gdbarch, new files > (stap-probe.[ch]), new methods for reading and handling SystemTap probes > on elfread.c, adaptations on breakpoint.c to make the `break' command > understand the `-p' and `-probe' arguments, and so on. It also includes > documentation and testcases inclusions. > > Is this OK? > > gdb/ChangeLog > 2012-09-03 Sergio Durigan Junior > Tom Tromey > > * Makefile.in (SFILES): Add `stap-probe'. > (COMMON_OBS): Likewise. > (HFILES_NO_SRCDIR): Likewise. > * NEWS: Mention support for SystemTap probes. > * amd64-linux-tdep.c (amd64_linux_init_abi): Initializing proper > fields used by SystemTap probes' arguments parser. > * arm-linux-tdep.c: Including headers needed to perform the parsing > of SystemTap probes' arguments. > (arm_stap_is_single_operand): New function. > (arm_stap_parse_special_token): Likewise. > (arm_linux_init_abi): Initializing proper fields used by SystemTap > probes' arguments parser. > * ax-gdb.c (require_rvalue): Removing static declaration. > (gen_expr): Likewise. > * ax-gdb.h (gen_expr): Declaring function. > (require_rvalue): Likewise. > * breakpoint.c: Include `gdb_regex.h' and `stap-probe.h'. > (bkpt_stap_probe_breakpoint_ops): New variable. > (modify_semaphore): New function. > (insert_bp_location): Call `modify_semaphore'. > (remove_breakpoint_1): Likewise. > (momentary_breakpoint_from_master): Use the `semaphore' value. > (add_location_to_breakpoint): Likewise. > (break_command_1): Using proper breakpoint_ops according to the > argument passed by user in the command line. > (bkpt_stap_probe_create_sals_from_address): New function. > (bkpt_stap_probe_decode_linespec): Likewise. > (initialize_breakpoint_ops): Initializing breakpoint_ops from > SystemTap probes. > * breakpoint.h (struct bp_location) : New field. > (modify_semaphore): New function. > * cli-utils.c (skip_spaces_const): New function. > (extract_arg): Likewise. > * cli-utils.h (skip_spaces_const): Likewise. > (extract_arg): Likewise. > * coffread.c (coff_sym_fns): Add `sym_probe_fns' value. > * dbxread.c (aout_sym_fns): Likewise. > * elfread.c: Include `stap-probe.h' and `arch-utils.h'. > (stap_probe_key): New variable. > (struct stap_probe_per_objfile): New struct. > (handle_probe): New function. > (STAP_BASE_SECTION_NAME): New define. > (get_base_address_1): New function. > (get_base_address): Likewise. > (elf_get_probes): Likewise. > (elf_get_probe_argument_count): Likewise. > (elf_evaluate_probe_argument): Likewise. > (elf_compile_to_ax): Likewise. > (elf_symfile_relocate_probe): Likewise. > (stap_probe_key_free): Likewise. > (elf_probe_fns): New variable. > (elf_sym_fns): Add `sym_probe_fns' value. > (elf_sym_fns_lazy_psyms): Likewise. > (elf_sym_fns_gdb_index): Likewise. > (_initialize_elfread): Initialize objfile cache for SystemTap > probes. > * gdbarch.c: Regenerate. > * gdbarch.h: Regenerate. > * gdbarch.sh (stap_integer_prefix): New variable. > (stap_integer_suffix): Likewise. > (stap_register_prefix): Likewise. > (stap_register_suffix): Likewise. > (stap_register_indirection_prefix): Likewise. > (stap_register_indirection_suffix): Likewise. > (stap_gdb_register_prefix): Likewise. > (stap_gdb_register_suffix): Likewise. > (stap_is_single_operand): New function. > (stap_parse_special_token): Likewise. > (struct stap_parse_info): Forward declaration. > * i386-linux-tdep.c (i386_linux_init_abi): Initializing proper > fields used by SystemTap probes' arguments parser. > * i386-tdep.c: Including headers needed to perform the parsing > of SystemTap probes' arguments. > (i386_stap_is_single_operand): New function. > (i386_stap_parse_special_token): Likewise. > * i386-tdep.h (i386_stap_is_single_operand): Likewise. > (i386_stap_parse_special_token): Likewise. As far as I can tell SystemTap is Linux-specific. So I'd think its support should go completely in Linux-specific -tdep.c files.