From: Pedro Alves <palves@redhat.com>
To: lgustavo@codesourcery.com
Cc: "'gdb-patches@sourceware.org'" <gdb-patches@sourceware.org>,
Mike Frysinger <vapier@gentoo.org>,
Yao Qi <yao@codesourcery.com>
Subject: Re: [PATCH, gdbserver] Further cleanup of FDPIC/DSBT divergences
Date: Tue, 25 Jun 2013 15:03:00 -0000 [thread overview]
Message-ID: <51C9B0BA.20707@redhat.com> (raw)
In-Reply-To: <51C34F14.8070803@codesourcery.com>
On 06/20/2013 07:51 PM, Luis Machado wrote:
> Hi,
>
> At some point, c6x used different data structures for its DSBT-based
> loadmap.
>
> DSBT-based
>
> struct target_loadmap
> {
> /* Protocol version number, must be zero. */
> Elf32_Word version;
> /* Pointer to the DSBT table, its size, and the DSBT index. */
> unsigned *dsbt_table;
> unsigned dsbt_size, dsbt_index;
> /* Number of segments in this map. */
> Elf32_Word nsegs;
> /* The actual memory map. */
> struct target_loadseg segs[/*nsegs*/];
> };
>
> FDPIC-based
>
> struct target_loadmap
> {
> /* Protocol version number, must be zero. */
> Elf32_Half version;
> /* Number of segments in this map. */
> Elf32_Half nsegs;
> /* The actual memory map. */
> struct target_loadseg segs[/*nsegs*/];
> };
>
> We shared a little bit of code with FDPIC-based targets though...
>
> struct target_loadseg
> {
> /* Core address to which the segment is mapped. */
> Elf32_Addr addr;
> /* VMA recorded in the program header. */
> Elf32_Addr p_vaddr;
> /* Size of this segment in memory. */
> Elf32_Word p_memsz;
> };
>
> Things have changed, and c6x is now using the exact same data structures
> as FDPIC-based targets in uClibc. Please refer to
> http://lists.uclibc.org/pipermail/uclibc/2013-May/047789.html for the
> uClibc changes that led to this.
>
> Mark Salter, the author of the uClibc change, has agreed with the
> solution i proposed:
> http://lists.uclibc.org/pipermail/uclibc/2013-May/047790.html.
>
> It is all good, but we've been conditionalizing the c6x-specific
> target_loadmap data structure based on the presence of PT_GETDSBT. This
> has always been defined in uClibc and, since Mark's change, it doesn't
> work as a hint of whether to use the new or the old target_loadmap data
> structure anymore. Therefore we will/already have a potential problem
> with backwards compatibility.
>
> Bernhard has stated that backwards compatibility on uClibc's side is not
> a problem: http://lists.uclibc.org/pipermail/uclibc/2013-June/047801.html.
>
> With all that exposed, my proposed change to gdbserver is to drop all
> the DSBT-specific bits, remove their definitions and explicitly use
> FDPIC definitions instead, making things a little bit cleaner.
>
> In the following patch i also changed the code slightly to stop defining
> linux_read_loadmap to NULL and i switched to explicitly setting the
> target hook to NULL in the absence of the required definition.
This is fine with me.
Does this mean that solib-frv.c / solib-dsbt.c and the
solib-fdpic.c from
http://www.sourceware.org/ml/gdb-patches/2010-12/msg00291.html
?
can all be combined? I'm confused on the current state
of bfin solib debugging -- it is still depending on out of
tree patches?
--
Pedro Alves
next prev parent reply other threads:[~2013-06-25 15:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 18:57 Luis Machado
2013-06-24 13:47 ` Yao Qi
2013-06-24 14:25 ` Luis Machado
2013-08-08 16:41 ` Luis Machado
2013-08-09 15:08 ` Pedro Alves
2013-08-09 17:20 ` Luis Machado
2013-08-10 0:33 ` Yao Qi
2013-08-12 13:41 ` Luis Machado
2013-08-12 14:06 ` Pedro Alves
2013-08-26 5:31 ` Mike Frysinger
2013-06-24 16:17 ` Mike Frysinger
2013-06-25 15:03 ` Pedro Alves [this message]
2013-06-25 15:04 ` Luis Machado
2013-06-25 16:26 ` Mike Frysinger
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=51C9B0BA.20707@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
--cc=vapier@gentoo.org \
--cc=yao@codesourcery.com \
/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