X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fdtrace-probe.c;h=528378231cd6cdb67b8022debafb5e17a3bc6df9;hb=e379e5f385f874adb0b414f917adb1fc50e20de9;hp=52973784e9aa2353fd855481683883762c8dfb9f;hpb=814cf43a1f16157fcbe2c662f567d064393a0fcb;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c index 52973784e9..528378231c 100644 --- a/gdb/dtrace-probe.c +++ b/gdb/dtrace-probe.c @@ -21,7 +21,6 @@ #include "defs.h" #include "probe.h" -#include "common/vec.h" #include "elf-bfd.h" #include "gdbtypes.h" #include "obstack.h" @@ -122,7 +121,7 @@ public: CORE_ADDR get_relocated_address (struct objfile *objfile) override; /* See probe.h. */ - unsigned get_argument_count (struct frame_info *frame) override; + unsigned get_argument_count (struct gdbarch *gdbarch) override; /* See probe.h. */ bool can_evaluate_arguments () const override; @@ -152,7 +151,7 @@ public: struct dtrace_probe_arg *get_arg_by_number (unsigned n, struct gdbarch *gdbarch); - /* Build the GDB internal expressiosn that, once evaluated, will + /* Build the GDB internal expression that, once evaluated, will calculate the values of the arguments of the probe. */ void build_arg_exprs (struct gdbarch *gdbarch); @@ -693,7 +692,7 @@ dtrace_probe::get_relocated_address (struct objfile *objfile) /* Implementation of the get_argument_count method. */ unsigned -dtrace_probe::get_argument_count (struct frame_info *frame) +dtrace_probe::get_argument_count (struct gdbarch *gdbarch) { return m_args.size (); } @@ -856,13 +855,14 @@ dtrace_static_probe_ops::get_probes /* Read the contents of the DOF section and then process it to extract the information of any probe defined into it. */ - if (!bfd_malloc_and_get_section (abfd, sect, &dof)) + if (bfd_malloc_and_get_section (abfd, sect, &dof) && dof != NULL) + dtrace_process_dof (sect, objfile, probesp, + (struct dtrace_dof_hdr *) dof); + else complaint (_("could not obtain the contents of" "section '%s' in objfile `%s'."), sect->name, abfd->filename); - - dtrace_process_dof (sect, objfile, probesp, - (struct dtrace_dof_hdr *) dof); + xfree (dof); } }