Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: Andy Wingo <wingo@igalia.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] JIT read_debug_info callback takes target symfile addr
Date: Wed, 25 Feb 2015 18:18:00 -0000	[thread overview]
Message-ID: <m3k2z5lutu.fsf@sspiff.org> (raw)
In-Reply-To: <87d250yaqq.fsf@igalia.com> (Andy Wingo's message of "Mon, 23 Feb	2015 15:15:57 +0100")

Andy Wingo <wingo@igalia.com> writes:
> Hi,
>
> The attached patch makes an incompatible change to the JIT reader
> interface to pass the target address of the symfile to the
> read_debug_info, instead of eagerly copying the symfile to GDB and
> passing the local address to the .so.  In many cases this allows the
> target to be simpler, as in many cases it's not necessary to allocate a
> symfile object at all.  In the case where you do need the memory in the
> GDB address space, well the target_read() callback is there for you.
>
> I have a patch coming that will allow JIT readers to be implemented in
> Guile.  It uses the JIT reader interface, though loaded from an
> extension instead of a shared library.  This patch would help extensions
> to be able to do JIT unwinding, as extensions have a much richer
> interface to GDB and in particular can query types and sizes from the
> inferior, without having to hard-code them from the reader side.  What
> you want is the target address, not the target's memory.
>
> WDYT?
>
>
> From 983216b213af8c2cf5853a814d2559062018fce4 Mon Sep 17 00:00:00 2001
> From: Andy Wingo <wingo@igalia.com>
> Date: Mon, 23 Feb 2015 15:06:09 +0100
> Subject: [PATCH] JIT read_debug_info callback takes target symfile address
>
> gdb/ChangeLog:
> 2015-02-23  Andy Wingo  <wingo@igalia.com>
>
> 	* NEWS: Announce JIT reader interface change.
> 	* jit-reader.in (GDB_READER_INTERFACE_VERSION): Bump to 2.
> 	(gdb_read_debug_info): Update typedef to express the memory as a
> 	target address, and update the comment.
> 	* jit.c (jit_reader_try_read_symtab): Don't read the symfile from
> 	target memory.  The JIT reader can do that if it likes using the
> 	gdb_symbol_callbacks structure.
>
> gdb/testsuite/ChangeLog:
> 2015-02-23  Andy Wingo  <wingo@igalia.com>
>
> 	* gdb.base/jitreader.c (read_debug_info): Update for changes in
> 	JIT reader interface and jithost.c test.
> 	* gdb.base/jithost.c (main): No need to allocate symfile objects
> 	with the new GDB_READER_INTERFACE_VERSION.
> 	* gdb.base/jithost.h: Removed.


Hi. A couple of high level comments.

1) My understanding is that we still need to support older versions of
the interface, at least for awhile.
Our currently deprecation policy is to never break anything
(or something within epsilon of that).
This doesn't scale. I'd like to see a formal policy where things
can live in a deprecated state for pre-specified awhile, after which
they can be deleted.

2) It's not clear to me whether we want to continue extending the JIT
interface, or just move it to the extension languages.
We'd still keep the existing interface, deprecated.
I'm not proposing we actually do this, at least not today.


  reply	other threads:[~2015-02-25 18:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 14:16 Andy Wingo
2015-02-25 18:18 ` Doug Evans [this message]
2015-02-26  8:58   ` Andy Wingo
2015-02-26 11:50     ` Pedro Alves
2015-02-26 12:51       ` Andy Wingo
2015-02-26 21:50         ` Alexander Smundak
2015-02-27 12:59           ` Andy Wingo

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=m3k2z5lutu.fsf@sspiff.org \
    --to=xdje42@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=wingo@igalia.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