[RFA 3/4] Improved linker-debugger interface
Sergio Durigan Junior
sergiodj@redhat.com
Tue Jul 17 23:42:00 GMT 2012
On Tuesday, July 17 2012, Jan Kratochvil wrote:
> On Thu, 12 Jul 2012 14:35:54 +0200, Gary Benson wrote:
>> --- a/gdb/probe.h
>> +++ b/gdb/probe.h
>> @@ -210,6 +210,17 @@ extern void info_probes_for_ops (char *arg, int from_tty,
>>
>> extern struct cmd_list_element **info_probes_cmdlist_get (void);
>>
>> +/* Return the argument count of the specified probe. */
>
> /* OBJFILE must be known to have probes support. */
I was considering suggesting the removal of the `gdb_assert' calls, and
instead make it a simple check and return properly if the OBJFILE does
not support probes.
unsigned
get_probe_argument_count (struct objfile *objfile, struct probe *probe)
{
if (objfile->sf == NULL || objfile->sf->sym_probe_fns == NULL)
return 0;
return objfile->sf->sym_probe_fns->sym_get_probe_argument_count (objfile,
probe);
}
It would cover the case when OBJFILE does not support probe and would
not be less safe.
--
Sergio
More information about the Gdb-patches
mailing list