From: Eli Zaretskii <eliz@gnu.org>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa] Shared object matching for solib-som.c
Date: Wed, 19 Apr 2006 08:15:00 -0000 [thread overview]
Message-ID: <u8xq2x9pj.fsf@gnu.org> (raw)
In-Reply-To: <44458D3D.4030506@tausq.org> (message from Randolph Chung on Wed, 19 Apr 2006 09:07:09 +0800)
> Date: Wed, 19 Apr 2006 09:07:09 +0800
> From: Randolph Chung <randolph@tausq.org>
>
> @@ -787,7 +794,21 @@ som_solib_section_offsets (struct objfil
> {
> /* Oh what a pain! We need the offsets before so_list->objfile
> is valid. The BFDs will never match. Make a best guess. */
> - if (strstr (objfile->name, so_list->so_name))
> + char *p1, *p2;
> +
> + p1 = strrchr(objfile->name, '/');
> + p2 = strrchr(so_list->so_name, '/');
> +
> + if (p1)
> + p1++;
> + else
> + p1 = objfile->name;
> + if (p2)
> + p2++;
> + else
> + p2 = so_list->so_name;
> +
> + if (strcmp (p1, p2) == 0)
> {
> asection *private_section;
Please don't use literal slash characters in GDB sources: they are
non-portable. AFAICS, you simply need to use lbasename here, on both
file names.
next prev parent reply other threads:[~2006-04-19 8:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-19 1:07 Randolph Chung
2006-04-19 8:15 ` Eli Zaretskii [this message]
2006-04-19 8:29 ` Randolph Chung
2006-04-19 9:07 ` Eli Zaretskii
2006-04-19 12:33 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u8xq2x9pj.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=randolph@tausq.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox