This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFA] sol-thread.c: Get rid of bogus GDB warning


Approved, please check it in.

Peter.Schauer wrote:
> 
> With a current CVS GDB I get:
> 
> pes@milch_2016$ cd gdb/testsuite/gdb.base
> pes@milch_2017$ ../../gdb
> GNU gdb 5.0
> Copyright 2000 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "sparc-sun-solaris2.7".
> (gdb) symbol-file break
> Reading symbols from break...done.
> warning: sol_thread_new_objfile: td_ta_new: generic error.
> 
> I consider this warning bogus, here is a fix:
> 
>         * sol-thread.c (ps_pdmodel):  Return PR_MODEL_UNKNOWN instead of
>         PS_ERR if exec_bfd is not yet open.
> 
> *** ./sol-thread.c.orig Fri Sep 15 21:27:29 2000
> --- ./sol-thread.c      Sun Sep 17 21:07:55 2000
> ***************
> *** 1321,1329 ****
>   ps_pdmodel (gdb_ps_prochandle_t ph, int *data_model)
>   {
>     if (exec_bfd == 0)
> !     return PS_ERR;
> !
> !   if (bfd_get_arch_size (exec_bfd) == 32)
>       *data_model = PR_MODEL_ILP32;
>     else
>       *data_model = PR_MODEL_LP64;
> --- 1321,1328 ----
>   ps_pdmodel (gdb_ps_prochandle_t ph, int *data_model)
>   {
>     if (exec_bfd == 0)
> !     *data_model = PR_MODEL_UNKNOWN;
> !   else if (bfd_get_arch_size (exec_bfd) == 32)
>       *data_model = PR_MODEL_ILP32;
>     else
>       *data_model = PR_MODEL_LP64;
> 
> --
> Peter Schauer                   pes@regent.e-technik.tu-muenchen.de

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