Some cleanups on stap-probe.c
authorSergio Durigan Junior <sergiodj@redhat.com>
Mon, 23 Dec 2013 22:48:08 +0000 (20:48 -0200)
committerSergio Durigan Junior <sergiodj@redhat.com>
Mon, 23 Dec 2013 22:48:08 +0000 (20:48 -0200)
commit97c2dca091f6cd078ddbede0a6abee1a2fa9c4c2
tree535100f53b6e91987cce5c7dcd2959164abe1661
parentd192b37306c0aeb5882002c1aae0f1f480254a41
Some cleanups on stap-probe.c

This patch does some basic cleanups on the SystemTap SDT probes API.  It
removes spurious newlines, brackets, reindents some code, and do
explicit checks for NULL, NUL, and 0 where applicable.

2013-12-23  Sergio Durigan JUnior  <sergiodj@redhat.com>

* stap-probe.c (struct stap_probe) <args_parsed>: Add comment.
(stap_is_generic_prefix): Delete extra brackets.  Reindent.
(stap_parse_register_operand): Remove spurious newlines.  Simplify
code to parse special token.
(stap_parse_argument_conditionally): Add gdb_assert.
(stap_parse_argument_1): Likewise.  Explicitly check for NULL and
NUL.
(stap_parse_probe_arguments): Likewise.
(handle_stap_probe): Likewise.  Reindent code.
(get_stap_base_address): Explicitly check for NULL.
(stap_get_probes): Likewise.  Reindent code.
(stap_relocate): Explicitly check for 0.
(stap_gen_info_probes_table_values): Likewise.
gdb/ChangeLog
gdb/stap-probe.c