symbol: replace find_symbol() by get_dso_symbols()

Old find_symbol() just find symbol by name, the new one
get_dso_symbols() will return all symbols/notes.

And user of this functions, will match name/pattern by itself.

For now get_dso_symbols() used like find_symbol(), this behaviour will
be changed in next patches.

Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
uprobes,sdt: add all events for all matched symbols/notes

Not only for first one.

As Jovi, noticed for example:
  mulitple probe location with same sdt name
    For example(in my x86-64 machine):
    #readelf -n /lib64/libc.so.6 | grep lll_futex_wake
      Name: lll_futex_wake
      Name: lll_futex_wake

After this patch events will be added for both sdt notes.

Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
uprobes: use strglobmatch() instead of just strcmp()

This will allow us to use pattern's instead of just symbol names

For example for C++ applications with it's function names convention, it
will be useful for functions with different number of arguments or
types.
Or all methods in class/object C++.

Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
symbol: fix segmentation fault at sdt_note_addr()

Because dst.d_buf must be 24 bytes long (on x86-64) while there is only
8 bytes (allocated on stack).

return address was at: 0x7fffffffdd88
dst.d_buf:             0x7fffffffdd78

And after elf64_xlatetom() executed, it called memmove() into dst.d_buf,
and overwrite return address for sdt_note_addr(), and after retq
executed it jumps to 0x0.

Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
symbol: use actor instead of dynamically allocate array of symbols.

Like Jovi suggested, replace dynamic allocatins, by callback/actor.

I've renamed get_dso_symbols() -> read_dso_symbols(), since it really do
this.
read_dso_symbols() will call actor for every symbol/sdt note that it will
found.
And replace usage of get_dso_symbols() by read_dso_symbols() inn
parse_events_resolve_symbol() (uprobes)

This patch also fix some memory leaks (on failures), and drop some exit()
inside parse_events_resolve_symbol()

Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>