diff options
author | sergiodj <sergiodj> | 2012-04-27 20:47:48 +0000 |
---|---|---|
committer | sergiodj <sergiodj> | 2012-04-27 20:47:48 +0000 |
commit | 5b44dfe11eec41925b48c244ee32f363886bd84c (patch) | |
tree | 5d461ca480401dd524a08d3f0a9ea5c20a7a579c /gdb/gdbarch.sh | |
parent | a446a01b22076bf815e641b258dd2aeed4fd1a5b (diff) | |
download | gdb-5b44dfe11eec41925b48c244ee32f363886bd84c.tar.gz |
2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com>
Tom Tromey <tromey@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (SFILES): Add `probe' and `stap-probe'.
(COMMON_OBS): Likewise.
(HFILES_NO_SRCDIR): Add `probe'.
* NEWS: Mention support for static and SystemTap probes.
* amd64-tdep.c (amd64_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 `probe.h'.
(bkpt_probe_breakpoint_ops): New variable.
(momentary_breakpoint_from_master): Set the `probe' value.
(add_location_to_breakpoint): Likewise.
(break_command_1): Using proper breakpoint_ops according to the
argument passed by the user in the command line.
(bkpt_probe_insert_location): New function.
(bkpt_probe_remove_location): Likewise.
(bkpt_probe_create_sals_from_address): Likewise.
(bkpt_probe_decode_linespec): Likewise.
(tracepoint_probe_create_sals_from_address): Likewise.
(tracepoint_probe_decode_linespec): Likewise.
(tracepoint_probe_breakpoint_ops): New variable.
(trace_command): Using proper breakpoint_ops according to the
argument passed by the user in the command line.
(initialize_breakpoint_ops): Initializing breakpoint_ops for
static probes on breakpoints and tracepoints.
* breakpoint.h (struct bp_location) <probe>: New field.
* 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.
* configure.ac: Append `stap-probe.o' to be generated when ELF
support is present.
* configure: Regenerate.
* dbxread.c (aout_sym_fns): Add `sym_probe_fns' value.
* elfread.c: Include `probe.h' and `arch-utils.h'.
(probe_key): New variable.
(elf_get_probes): New function.
(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 static
probes.
* gdb_vecs.h (struct probe): New forward declaration.
(probe_p): New VEC declaration.
* 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-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_elf_init_abi): Initializing proper fields used by SystemTap
probes' arguments parser.
* i386-tdep.h (i386_stap_is_single_operand): New function.
(i386_stap_parse_special_token): Likewise.
* machoread.c (macho_sym_fns): Add `sym_probe_fns' value.
* mipsread.c (ecoff_sym_fns): Likewise.
* objfiles.c (objfile_relocate1): Support relocation for static
probes.
* parse.c (prefixify_expression): Remove static declaration.
(initialize_expout): Likewise.
(reallocate_expout): Likewise.
* parser-defs.h (initialize_expout): Declare function.
(reallocate_expout): Likewise.
(prefixify_expression): Likewise.
* ppc-linux-tdep.c: Including headers needed to perform the parsing
of SystemTap probes' arguments.
(ppc_stap_is_single_operand): New function.
(ppc_stap_parse_special_token): Likewise.
(ppc_linux_init_abi): Initializing proper fields used by SystemTap
probes' arguments parser.
* probe.c: New file, for generic statically defined probe support.
* probe.h: Likewise.
* s390-tdep.c: Including headers needed to perform the parsing of
SystemTap probes' arguments.
(s390_stap_is_single_operand): New function.
(s390_gdbarch_init): Initializing proper fields used by SystemTap
probes' arguments parser.
* somread.c (som_sym_fns): Add `sym_probe_fns' value.
* stap-probe.c: New file, for SystemTap probe support.
* stap-probe.h: Likewise.
* symfile.h: Include `gdb_vecs.h'.
(struct sym_probe_fns): New struct.
(struct sym_fns) <sym_probe_fns>: New field.
* symtab.c (init_sal): Initialize `probe' field.
* symtab.h (struct probe): Forward declaration.
(struct symtab_and_line) <probe>: New field.
* tracepoint.c (start_tracing): Adjust semaphore on breakpoints
locations.
(stop_tracing): Likewise.
* xcoffread.c (xcoff_sym_fns): Add `sym_probe_fns' value.
Diffstat (limited to 'gdb/gdbarch.sh')
-rwxr-xr-x | gdb/gdbarch.sh | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 5831172bfaa..956734abacb 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -792,6 +792,101 @@ M:void:record_special_symbol:struct objfile *objfile, asymbol *sym:objfile, sym # Get architecture-specific system calls information from registers. M:LONGEST:get_syscall_number:ptid_t ptid:ptid +# SystemTap related fields and functions. + +# Prefix used to mark an integer constant on the architecture's assembly +# For example, on x86 integer constants are written as: +# +# \$10 ;; integer constant 10 +# +# in this case, this prefix would be the character \`\$\'. +v:const char *:stap_integer_prefix:::0:0::0:gdbarch->stap_integer_prefix + +# Suffix used to mark an integer constant on the architecture's assembly. +v:const char *:stap_integer_suffix:::0:0::0:gdbarch->stap_integer_suffix + +# Prefix used to mark a register name on the architecture's assembly. +# For example, on x86 the register name is written as: +# +# \%eax ;; register eax +# +# in this case, this prefix would be the character \`\%\'. +v:const char *:stap_register_prefix:::0:0::0:gdbarch->stap_register_prefix + +# Suffix used to mark a register name on the architecture's assembly +v:const char *:stap_register_suffix:::0:0::0:gdbarch->stap_register_suffix + +# Prefix used to mark a register indirection on the architecture's assembly. +# For example, on x86 the register indirection is written as: +# +# \(\%eax\) ;; indirecting eax +# +# in this case, this prefix would be the charater \`\(\'. +# +# Please note that we use the indirection prefix also for register +# displacement, e.g., \`4\(\%eax\)\' on x86. +v:const char *:stap_register_indirection_prefix:::0:0::0:gdbarch->stap_register_indirection_prefix + +# Suffix used to mark a register indirection on the architecture's assembly. +# For example, on x86 the register indirection is written as: +# +# \(\%eax\) ;; indirecting eax +# +# in this case, this prefix would be the charater \`\)\'. +# +# Please note that we use the indirection suffix also for register +# displacement, e.g., \`4\(\%eax\)\' on x86. +v:const char *:stap_register_indirection_suffix:::0:0::0:gdbarch->stap_register_indirection_suffix + +# Prefix used to name a register using GDB's nomenclature. +# +# For example, on PPC a register is represented by a number in the assembly +# language (e.g., \`10\' is the 10th general-purpose register). However, +# inside GDB this same register has an \`r\' appended to its name, so the 10th +# register would be represented as \`r10\' internally. +v:const char *:stap_gdb_register_prefix:::0:0::0:gdbarch->stap_gdb_register_prefix + +# Suffix used to name a register using GDB's nomenclature. +v:const char *:stap_gdb_register_suffix:::0:0::0:gdbarch->stap_gdb_register_suffix + +# Check if S is a single operand. +# +# Single operands can be: +# \- Literal integers, e.g. \`\$10\' on x86 +# \- Register access, e.g. \`\%eax\' on x86 +# \- Register indirection, e.g. \`\(\%eax\)\' on x86 +# \- Register displacement, e.g. \`4\(\%eax\)\' on x86 +# +# This function should check for these patterns on the string +# and return 1 if some were found, or zero otherwise. Please try to match +# as much info as you can from the string, i.e., if you have to match +# something like \`\(\%\', do not match just the \`\(\'. +M:int:stap_is_single_operand:const char *s:s + +# Function used to handle a "special case" in the parser. +# +# A "special case" is considered to be an unknown token, i.e., a token +# that the parser does not know how to parse. A good example of special +# case would be ARM's register displacement syntax: +# +# [R0, #4] ;; displacing R0 by 4 +# +# Since the parser assumes that a register displacement is of the form: +# +# <number> <indirection_prefix> <register_name> <indirection_suffix> +# +# it means that it will not be able to recognize and parse this odd syntax. +# Therefore, we should add a special case function that will handle this token. +# +# This function should generate the proper expression form of the expression +# using GDB\'s internal expression mechanism (e.g., \`write_exp_elt_opcode\' +# and so on). It should also return 1 if the parsing was successful, or zero +# if the token was not recognized as a special token (in this case, returning +# zero means that the special parser is deferring the parsing to the generic +# parser), and should advance the buffer pointer (p->arg). +M:int:stap_parse_special_token:struct stap_parse_info *p:p + + # True if the list of shared libraries is one and only for all # processes, as opposed to a list of shared libraries per inferior. # This usually means that all processes, although may or may not share @@ -954,6 +1049,7 @@ struct core_regset_section; struct syscall; struct agent_expr; struct axs_value; +struct stap_parse_info; /* The architecture associated with the connection to the target. |