This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: time to workaround libc/13097 in fsf gdb?
- From: Doug Evans <dje at google dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 23 Sep 2014 16:05:10 -0700
- Subject: Re: time to workaround libc/13097 in fsf gdb?
- Authentication-results: sourceware.org; auth=none
- References: <CAP9bCMRko50FiANwa+h2FadG-k6Me69N04F+Le-bUnTVLQYKuQ at mail dot gmail dot com> <5411CFAE dot 7040805 at redhat dot com> <20140912115452 dot GA5626 at host2 dot jankratochvil dot net> <5412E3AC dot 80203 at redhat dot com> <20140912123320 dot GA8704 at host2 dot jankratochvil dot net> <5412EB1F dot 40309 at redhat dot com> <20140917201049 dot GA22880 at host2 dot jankratochvil dot net> <541C3FCF dot 4000400 at redhat dot com> <541C409E dot 6010408 at redhat dot com> <20140920213033 dot GA6255 at host2 dot jankratochvil dot net> <541F2311 dot 1040404 at redhat dot com> <541F2B1E dot 4030909 at redhat dot com>
On Sun, Sep 21, 2014 at 12:46 PM, Pedro Alves <palves@redhat.com> wrote:
>[...]
> @@ -1478,6 +1479,44 @@ svr4_current_sos (void)
> return svr4_current_sos_direct (info);
> }
>
> +/* Implement the "current_sos" target_so_ops method. */
> +
> +static struct so_list *
> +svr4_current_sos (void)
> +{
> + struct so_list *so_head = svr4_current_sos_1 ();
> + struct objfile *objfile;
> + struct obj_section *osect;
> + CORE_ADDR vsyscall_start, vsyscall_end;
> +
> + /* Filter out the vDSO module, if present. Its symbol file would
> + not be found on disk. The vDSO/vsyscall's OBJFILE is instead
> + managed by symfile-mem.c:add_vsyscall_page. */
> + if (gdbarch_vsyscall_range (target_gdbarch (),
> + &vsyscall_start, &vsyscall_end))
> + {
> + struct so_list **sop;
> +
> + sop = &so_head;
> + while (*sop != NULL)
> + {
> + struct so_list *so = *sop;
> +
> + if (vsyscall_start <= so->lm_info->l_ld
> + && so->lm_info->l_ld < vsyscall_end)
This test is subtle enough that I'd appreciate a full explanation here
of what's going on.
Thanks.
> + {
> + *sop = so->next;
> + free_so (so);
> + break;
> + }
> +
> + sop = &so->next;
> + }
> + }
> +
> + return so_head;
> +}
> +
I may have a few more comments, but I think Jan has covered them, so
I'm going to wait until the next version for further review.