This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/4] python support for fetching separate debug files: have_debug_info
- From: Doug Evans <dje at google dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches <gdb-patches at sourceware dot org>, Pedro Alves <palves at redhat dot com>, Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Mon, 24 Nov 2014 13:06:46 -0800
- Subject: Re: [PATCH 2/4] python support for fetching separate debug files: have_debug_info
- Authentication-results: sourceware.org; auth=none
- References: <yjt2d28ho9cw dot fsf at ruffy dot mtv dot corp dot google dot com> <837fyp57bu dot fsf at gnu dot org> <CADPb22QZckwEWPVrXZassarcAftT7aATy=vqsm_3-9qa967BLQ at mail dot gmail dot com> <83d28gtjr5 dot fsf at gnu dot org> <CADPb22S8A_bwAqUF6wpShQXyBQ62M0kfdCUG2vZsNASODyN0fg at mail dot gmail dot com>
On Fri, Nov 21, 2014 at 12:22 PM, Doug Evans <dje@google.com> wrote:
> Another way we *could* go, which I kinda like, is to provide a general
> purpose ELF API to Python, or try to do the bfd kind of thing and
> abstract away ELF vs COFF, etc, and export that through gdb. Then one
> could determine if debug info is present that way. If I were to do the
> former (the ELF API) I'd like to make it separate from gdb: why write
> something only some users can use. The latter (abstract away the file
> format) has its own problems of course, but one might simplify it to
> something along the lines of what libiberty/simple-object* provides.
> Either of these solutions allows one to watch for a special section
> pointing at separate debug info (e.g., .gnu_debuglink).
>
> [Down the road exporting a DWARF reader to Python would be useful too,
> but that's later. If it involved providing our own libelf/libdwarf so
> much the better.]
Filing for reference sake.
Another way to go, which I partially implemented,
was to export bfd's iovec to Python.
In the end it was more complex than I needed.