This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/5] libthread_db: debug output should go to gdb_stdlog


Pedro Alves <palves@redhat.com> writes:

>    if (libthread_db_debug || *libthread_db_search_path)
>      {
> +      struct ui_file *file;
>        const char *library;
>  
>        library = dladdr_to_soname (*info->td_ta_new_p);
>        if (library == NULL)
>  	library = LIBTHREAD_DB_SO;
>  
> -      printf_unfiltered (_("Using host libthread_db library \"%s\".\n"),
> -			 library);
> +      file = *libthread_db_search_path != '\0' ? gdb_stdout : gdb_stdlog;

Nit: why don't we check libthread_db_debug instead? like:

      file = libthread_db_debug ? gdb_stdlog : gdb_stdout;

> +      fprintf_unfiltered (file, _("Using host libthread_db library \"%s\".\n"),
> +			  library);

-- 
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]