[6/6] Fix comment for 'gdb_dlopen'

Message ID 20200226200542.746617-7-sergiodj@redhat.com
State New, archived
Headers

Commit Message

Sergio Durigan Junior Feb. 26, 2020, 8:05 p.m. UTC
  The 'gdb_dlopen' function doesn't return NULL if the shlib load
fails;n it actually throws an error.  This patch updates the comment
to reflect this.

gdbsupport/ChangeLog:
yyyy-mm-dd  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb-dlfcn.h (gdb_dlopen): Update comment.
---
 gdbsupport/gdb-dlfcn.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Terekhov, Mikhail via Gdb-patches Feb. 26, 2020, 8:22 p.m. UTC | #1
On Wed, Feb 26, 2020 at 2:06 PM Sergio Durigan Junior
<sergiodj@redhat.com> wrote:
>
> The 'gdb_dlopen' function doesn't return NULL if the shlib load
> fails;n it actually throws an error.  This patch updates the comment

Typo here (;n)

> to reflect this.
>
> gdbsupport/ChangeLog:
> yyyy-mm-dd  Sergio Durigan Junior  <sergiodj@redhat.com>
>
>         * gdb-dlfcn.h (gdb_dlopen): Update comment.
> ---
>  gdbsupport/gdb-dlfcn.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gdbsupport/gdb-dlfcn.h b/gdbsupport/gdb-dlfcn.h
> index 258cfebbc3..9e72a53dc0 100644
> --- a/gdbsupport/gdb-dlfcn.h
> +++ b/gdbsupport/gdb-dlfcn.h
> @@ -32,8 +32,8 @@ struct dlclose_deleter
>  typedef std::unique_ptr<void, dlclose_deleter> gdb_dlhandle_up;
>
>  /* Load the dynamic library file named FILENAME, and return a handle
> -   for that dynamic library.  Return NULL if the loading fails for any
> -   reason.  */
> +   for that dynamic library.  Throw an error if the loading fails for
> +   any reason.  */
>
>  gdb_dlhandle_up gdb_dlopen (const char *filename);
>
> --
> 2.24.1
>
  
Sergio Durigan Junior Feb. 26, 2020, 8:49 p.m. UTC | #2
On Wednesday, February 26 2020, Christian Biesinger wrote:

> On Wed, Feb 26, 2020 at 2:06 PM Sergio Durigan Junior
> <sergiodj@redhat.com> wrote:
>>
>> The 'gdb_dlopen' function doesn't return NULL if the shlib load
>> fails;n it actually throws an error.  This patch updates the comment
>
> Typo here (;n)

Thanks!  I fixed this locally.  After I submitted the series, I thought
that this one should probably have been merged with 5/6.  Oh, well...

Cheers,
  
Tom Tromey Feb. 28, 2020, 3:20 p.m. UTC | #3
>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:

Sergio> gdbsupport/ChangeLog:
Sergio> yyyy-mm-dd  Sergio Durigan Junior  <sergiodj@redhat.com>

Sergio> 	* gdb-dlfcn.h (gdb_dlopen): Update comment.

This one could go in immediately under the obvious rule.

Tom
  
Sergio Durigan Junior Feb. 28, 2020, 4:05 p.m. UTC | #4
On Friday, February 28 2020, Tom Tromey wrote:

>>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
>
> Sergio> gdbsupport/ChangeLog:
> Sergio> yyyy-mm-dd  Sergio Durigan Junior  <sergiodj@redhat.com>
>
> Sergio> 	* gdb-dlfcn.h (gdb_dlopen): Update comment.
>
> This one could go in immediately under the obvious rule.

Thanks, Tom.

Pushed: d7592e974706637058867b02626c52a30ef0a2ee
  

Patch

diff --git a/gdbsupport/gdb-dlfcn.h b/gdbsupport/gdb-dlfcn.h
index 258cfebbc3..9e72a53dc0 100644
--- a/gdbsupport/gdb-dlfcn.h
+++ b/gdbsupport/gdb-dlfcn.h
@@ -32,8 +32,8 @@  struct dlclose_deleter
 typedef std::unique_ptr<void, dlclose_deleter> gdb_dlhandle_up;
 
 /* Load the dynamic library file named FILENAME, and return a handle
-   for that dynamic library.  Return NULL if the loading fails for any
-   reason.  */
+   for that dynamic library.  Throw an error if the loading fails for
+   any reason.  */
 
 gdb_dlhandle_up gdb_dlopen (const char *filename);