* [patch] Fix false warning: Shared library is missing debugging information.
@ 2010-01-11 15:13 Jan Kratochvil
2010-01-11 15:21 ` Tristan Gingold
2010-01-11 15:23 ` Pedro Alves
0 siblings, 2 replies; 7+ messages in thread
From: Jan Kratochvil @ 2010-01-11 15:13 UTC (permalink / raw)
To: gdb-patches
Hi,
since
http://sourceware.org/ml/gdb-cvs/2009-08/msg00134.html
commit 28bc5797a9be8409c7f78881f93fff58c4e9d6ed
Author: Doug Evans <dje@google.com>
GDB prints:
(gdb) info sharedlibrary
From To Syms Read Shared Object Library
0x000000362de00af0 0x000000362de18344 Yes (*) /lib64/ld-linux-x86-64.so.2
0x000000362ea05390 0x000000362ea107c8 Yes (*) /lib64/libpthread.so.0
0x000000362e21e860 0x000000362e32597c Yes (*) /lib64/libc.so.6
(*): Shared library is missing debugging information.
(gdb) _
despite the system has full separate debug info files installed.
This "Shared library is missing debugging information." message was a response
on a wish by Pedro Alves:
http://sourceware.org/ml/gdb-patches/2009-07/msg00086.html
We do have a "Syms Read" column in info shared's output, maybe we
should extend that from "Yes, No" -> "Yes,
Sorry-I've-tried-but-didn't-find-any, No".
So the case when debug info has been found - although in a separate debug info
file - should be IMO the case "Yes" and not the case
"Sorry-I've-tried-but-didn't-find-any".
With the patch GDB now prints in the same case:
(gdb) info sharedlibrary
From To Syms Read Shared Object Library
0x000000362de00af0 0x000000362de18344 Yes /lib64/ld-linux-x86-64.so.2
0x000000362ea05390 0x000000362ea107c8 Yes /lib64/libpthread.so.0
0x000000362e21e860 0x000000362e32597c Yes /lib64/libc.so.6
(gdb) _
No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
Thanks,
Jan
2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* solib.c (info_sharedlibrary_command): New variable objfile,
initialize it. Prefer checking symbols for separate debug info file.
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -842,6 +842,7 @@ info_sharedlibrary_command (char *pattern, int from_tty)
for (so = so_list_head; so; so = so->next)
{
struct cleanup *lib_cleanup;
+ struct objfile *objfile;
if (! so->so_name[0])
continue;
@@ -861,10 +862,16 @@ info_sharedlibrary_command (char *pattern, int from_tty)
ui_out_field_skip (uiout, "to");
}
+ /* We just check the state of any single separate debug info file, if
+ such one exists. */
+ objfile = so->objfile;
+ if (objfile->separate_debug_objfile)
+ objfile = objfile->separate_debug_objfile;
+
if (! ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ()))
&& so->symbols_loaded
- && !objfile_has_partial_symbols (so->objfile)
- && !objfile_has_full_symbols (so->objfile))
+ && !objfile_has_partial_symbols (objfile)
+ && !objfile_has_full_symbols (objfile))
{
so_missing_debug_info = 1;
ui_out_field_string (uiout, "syms-read", "Yes (*)");
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [patch] Fix false warning: Shared library is missing debugging information.
2010-01-11 15:13 [patch] Fix false warning: Shared library is missing debugging information Jan Kratochvil
@ 2010-01-11 15:21 ` Tristan Gingold
2010-01-11 16:08 ` Jan Kratochvil
2010-01-11 15:23 ` Pedro Alves
1 sibling, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2010-01-11 15:21 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
On Jan 11, 2010, at 4:12 PM, Jan Kratochvil wrote:
> Hi,
[...]
> despite the system has full separate debug info files installed.
>
> This "Shared library is missing debugging information." message was a response
[...]
> --- a/gdb/solib.c
> +++ b/gdb/solib.c
> @@ -842,6 +842,7 @@ info_sharedlibrary_command (char *pattern, int from_tty)
> for (so = so_list_head; so; so = so->next)
> {
> struct cleanup *lib_cleanup;
> + struct objfile *objfile;
>
> if (! so->so_name[0])
> continue;
> @@ -861,10 +862,16 @@ info_sharedlibrary_command (char *pattern, int from_tty)
> ui_out_field_skip (uiout, "to");
> }
>
> + /* We just check the state of any single separate debug info file, if
> + such one exists. */
> + objfile = so->objfile;
> + if (objfile->separate_debug_objfile)
> + objfile = objfile->separate_debug_objfile;
> +
> if (! ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ()))
> && so->symbols_loaded
> - && !objfile_has_partial_symbols (so->objfile)
> - && !objfile_has_full_symbols (so->objfile))
> + && !objfile_has_partial_symbols (objfile)
> + && !objfile_has_full_symbols (objfile))
> {
> so_missing_debug_info = 1;
> ui_out_field_string (uiout, "syms-read", "Yes (*)");
I think you should use !objfile_has_symbols (so->objfile) instead.
It is somewhat wrong to check objfile->separate_debug_objfile without checking the whole chain, because the
chain has no particular order.
(Of course, this only concerns Darwin but who knows in the future :-)
Thank you for improving the user experience,
Tristan.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [patch] Fix false warning: Shared library is missing debugging information.
2010-01-11 15:21 ` Tristan Gingold
@ 2010-01-11 16:08 ` Jan Kratochvil
2010-01-11 16:14 ` Pedro Alves
2010-01-11 18:08 ` Tom Tromey
0 siblings, 2 replies; 7+ messages in thread
From: Jan Kratochvil @ 2010-01-11 16:08 UTC (permalink / raw)
To: Tristan Gingold, Pedro Alves; +Cc: gdb-patches
On Mon, 11 Jan 2010 16:22:06 +0100, Tristan Gingold wrote:
> I think you should use !objfile_has_symbols (so->objfile) instead.
OK, missed that function, thanks.
> It is somewhat wrong to check objfile->separate_debug_objfile without
> checking the whole chain, because the chain has no particular order.
When thinking more about it it is probably more important than I thought. One
can have one of the .o files stripped while not the other ones.
On Mon, 11 Jan 2010 16:23:46 +0100, Pedro Alves wrote:
> separate_debug_objfile is now a list, so shouldn't you now look
> over them all (main and all seperate objfiles) for symbols?
yes...
No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
Thanks,
Jan
2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Tristan Gingold <gingold@adacore.com>
* solib.c (info_sharedlibrary_command): Replace
objfile_has_partial_symbols and objfile_has_full_symbols calls by
objfile_has_symbols.
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -863,8 +863,7 @@ info_sharedlibrary_command (char *pattern, int from_tty)
if (! ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ()))
&& so->symbols_loaded
- && !objfile_has_partial_symbols (so->objfile)
- && !objfile_has_full_symbols (so->objfile))
+ && !objfile_has_symbols (so->objfile))
{
so_missing_debug_info = 1;
ui_out_field_string (uiout, "syms-read", "Yes (*)");
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [patch] Fix false warning: Shared library is missing debugging information.
2010-01-11 16:08 ` Jan Kratochvil
@ 2010-01-11 16:14 ` Pedro Alves
2010-01-11 16:31 ` Jan Kratochvil
2010-01-11 18:08 ` Tom Tromey
1 sibling, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2010-01-11 16:14 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches
On Monday 11 January 2010 16:07:20, Jan Kratochvil wrote:
> 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
> Tristan Gingold <gingold@adacore.com>
>
> * solib.c (info_sharedlibrary_command): Replace
> objfile_has_partial_symbols and objfile_has_full_symbols calls by
> objfile_has_symbols.
>
This is OK. Thanks.
--
Pedro Alves
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] Fix false warning: Shared library is missing debugging information.
2010-01-11 16:14 ` Pedro Alves
@ 2010-01-11 16:31 ` Jan Kratochvil
0 siblings, 0 replies; 7+ messages in thread
From: Jan Kratochvil @ 2010-01-11 16:31 UTC (permalink / raw)
To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches
On Mon, 11 Jan 2010 17:14:22 +0100, Pedro Alves wrote:
> On Monday 11 January 2010 16:07:20, Jan Kratochvil wrote:
> > 2010-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
> >           Tristan Gingold  <gingold@adacore.com>
> >
> > Â Â Â Â Â Â Â Â * solib.c (info_sharedlibrary_command): Replace
> > Â Â Â Â Â Â Â Â objfile_has_partial_symbols and objfile_has_full_symbols calls by
> > Â Â Â Â Â Â Â Â objfile_has_symbols.
> >
>
> This is OK. Thanks.
Checked-in:
http://sourceware.org/ml/gdb-cvs/2010-01/msg00093.html
Thanks,
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] Fix false warning: Shared library is missing debugging information.
2010-01-11 16:08 ` Jan Kratochvil
2010-01-11 16:14 ` Pedro Alves
@ 2010-01-11 18:08 ` Tom Tromey
1 sibling, 0 replies; 7+ messages in thread
From: Tom Tromey @ 2010-01-11 18:08 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Tristan Gingold, Pedro Alves, gdb-patches
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Jan> Tristan Gingold <gingold@adacore.com>
Jan> * solib.c (info_sharedlibrary_command): Replace
Jan> objfile_has_partial_symbols and objfile_has_full_symbols calls by
Jan> objfile_has_symbols.
Looks good. This is ok.
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] Fix false warning: Shared library is missing debugging information.
2010-01-11 15:13 [patch] Fix false warning: Shared library is missing debugging information Jan Kratochvil
2010-01-11 15:21 ` Tristan Gingold
@ 2010-01-11 15:23 ` Pedro Alves
1 sibling, 0 replies; 7+ messages in thread
From: Pedro Alves @ 2010-01-11 15:23 UTC (permalink / raw)
To: gdb-patches; +Cc: Jan Kratochvil
On Monday 11 January 2010 15:12:58, Jan Kratochvil wrote:
> So the case when debug info has been found - although in a separate debug info
> file - should be IMO the case "Yes" and not the case
> "Sorry-I've-tried-but-didn't-find-any".
Sounds right to me.
> + /* We just check the state of any single separate debug info file, if
> + such one exists. */
> + objfile = so->objfile;
> + if (objfile->separate_debug_objfile)
> + objfile = objfile->separate_debug_objfile;
> +
> if (! ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ()))
> && so->symbols_loaded
> - && !objfile_has_partial_symbols (so->objfile)
> - && !objfile_has_full_symbols (so->objfile))
> + && !objfile_has_partial_symbols (objfile)
> + && !objfile_has_full_symbols (objfile))
> {
> so_missing_debug_info = 1;
> ui_out_field_string (uiout, "syms-read", "Yes (*)");
>
separate_debug_objfile is now a list, so shouldn't you now look
over them all (main and all seperate objfiles) for symbols?
--
Pedro Alves
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-01-11 18:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-11 15:13 [patch] Fix false warning: Shared library is missing debugging information Jan Kratochvil
2010-01-11 15:21 ` Tristan Gingold
2010-01-11 16:08 ` Jan Kratochvil
2010-01-11 16:14 ` Pedro Alves
2010-01-11 16:31 ` Jan Kratochvil
2010-01-11 18:08 ` Tom Tromey
2010-01-11 15:23 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox