aboutsummaryrefslogtreecommitdiff
path: root/gdb/dtrace-probe.c
AgeCommit message (Collapse)AuthorFilesLines
2015-03-27Initialize EXPR in dtrace-probe::dtrace_process_dof_probeJoel Brobecker1-1/+1
GCC 4.4.7 generates the following warning: | cc1: warnings being treated as errors | dtrace-probe.c: In function ‘dtrace_process_dof_probe’: | dtrace-probe.c:416: error: ‘expr’ may be used uninitialized in this function | make[2]: *** [dtrace-probe.o] Error 1 Later versions (GCC 5) do a better job and don't generate the warning, but it does not hurt to pre-initialize "expr" to NULL. gdb/ChangeLog: * dtrace-probe.c (dtrace_process_dof_probe): Initialize expr to NULL.
2015-03-26dtrace-probe: Handle error while parsing probe argument.Joel Brobecker1-2/+12
The debugger on Solaris has been broken since the introduction of DTrace probe support: (gdb) start Temporary breakpoint 1 at 0x80593bc: file simple_main.adb, line 4. Starting program: /[...]/simple_main [Thread debugging using libthread_db enabled] No definition of "mutex_t" in current context. The problem occurs while trying to parse a probe's argument, and the exception propagates all the way to the top. This patch fixes the issue by containing the exception and falling back on using the "long" builtin type if the argument's type could not be determined. Also, the parsing should be done using the C language parser. gdb/ChangeLog: * dtrace-probe.c (dtrace_process_dof_probe): Contain any exception raised while parsing the probe arguments. Force parsing to be done using the C language parser. * expression.h (parse_expression_with_language): Declare. * parse.c (parse_expression_with_language): New function.
2015-02-27More redefinition errors in C++ modePedro Alves1-2/+2
In C++, we can't forward declare objects like in C. The compiler complains about symbol redefinition. Most cases of this were fixed in e36122e9, but dtrace probes introduced a new one meanwhile. This patch fixes it the same way e36122e9 fixed the others. gdb/ 2015-02-27 Pedro Alves <palves@redhat.com> * dtrace-probe.c (dtrace_probe_ops): Make extern.
2015-02-192015-02-19 Steve Ellcey <sellcey@imgtec.com>Steve Ellcey1-3/+7
* dtrace-probe.c (dtrace_process_dof_probe): Initialize arg.expr. (dtrace_get_probes) Change type of variable 'dof'.
2015-02-17New probe type: DTrace USDT probes.Jose E. Marchesi1-0/+907
This patch adds a new type of probe to GDB: the DTrace USDT probes. The new type is added by providing functions implementing all the entries of the `probe_ops' structure defined in `probe.h'. The implementation is self-contained and does not depend on DTrace source code in any way. gdb/ChangeLog: 2015-02-7 Jose E. Marchesi <jose.marchesi@oracle.com> * breakpoint.c (BREAK_ARGS_HELP): Help string updated to mention the -probe-dtrace new vpossible value for PROBE_MODIFIER. * configure.ac (CONFIG_OBS): dtrace-probe.o added if BFD can handle ELF files. * Makefile.in (SFILES): dtrace-probe.c added. * configure: Regenerate. * dtrace-probe.c: New file. (SHT_SUNW_dof): New constant. (dtrace_probe_type): New enum. (dtrace_probe_arg): New struct. (dtrace_probe_arg_s): New typedef. (struct dtrace_probe_enabler): New struct. (dtrace_probe_enabler_s): New typedef. (dtrace_probe): New struct. (dtrace_probe_is_linespec): New function. (dtrace_dof_sect_type): New enum. (dtrace_dof_dofh_ident): Likewise. (dtrace_dof_encoding): Likewise. (DTRACE_DOF_ENCODE_LSB): Likewise. (DTRACE_DOF_ENCODE_MSB): Likewise. (dtrace_dof_hdr): New struct. (dtrace_dof_sect): Likewise. (dtrace_dof_provider): Likewise. (dtrace_dof_probe): Likewise. (DOF_UINT): New macro. (DTRACE_DOF_PTR): Likewise. (DTRACE_DOF_SECT): Likewise. (dtrace_process_dof_probe): New function. (dtrace_process_dof): Likewise. (dtrace_build_arg_exprs): Likewise. (dtrace_get_arg): Likewise. (dtrace_get_probes): Likewise. (dtrace_get_probe_argument_count): Likewise. (dtrace_can_evaluate_probe_arguments): Likewise. (dtrace_evaluate_probe_argument): Likewise. (dtrace_compile_to_ax): Likewise. (dtrace_probe_destroy): Likewise. (dtrace_gen_info_probes_table_header): Likewise. (dtrace_gen_info_probes_table_values): Likewise. (dtrace_probe_is_enabled): Likewise. (dtrace_probe_ops): New variable. (info_probes_dtrace_command): New function. (_initialize_dtrace_probe): Likewise. (dtrace_type_name): Likewise.