From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: "Ulrich Weigand" <uweigand@de.ibm.com>
Subject: Re: [rfc][2/3] Remote core file generation: register notes
Date: Wed, 09 Nov 2011 16:05:00 -0000 [thread overview]
Message-ID: <201111091605.12123.pedro@codesourcery.com> (raw)
In-Reply-To: <201110211856.p9LIud0r012859@d06av02.portsmouth.uk.ibm.com>
On Friday 21 October 2011 19:56:39, Ulrich Weigand wrote:
> write_gcore_file today uses a target hook target_make_corefile_notes in
> order to generate the core file note section. Having this as a target
> hook is really inappropriate when we want to support remote core file
> generation; it should really be a gdbarch callback instead.
>
> Note that this is the same transition we had with *reading* core files;
> that was intially supported on native targets only, but is now usually
> supported for remote targets via gdbarch hooks.
>
> To avoid having to complete that transition in one go across all
> targets, the patch for now adds a gdbarch_make_corefile_notes routine
> in addition to target_make_corefile_notes. For architectures that
> do not yet provide a gdbarch_make_corefile_notes routine, common
> code will fall back on the target hook.
>
> The patch implements this routine for all Linux targets in linux-tdep.c,
> moving code from linux-nat.c there. Note that not even all Linux targets
> can be converted at this point, only those that already implement the
> gdbarch_core_regset_sections hook -- if we don't have that, we do not
> know the sizes of core file register sections, and have to fall back
> on using regset data types from native system headers.
>
> Therefore, I'm keeping a fall-back native-only implementation in
> linux-nat.c for now; to avoid duplication this uses a helper routine
> in linux-tdep.c for everything except the core register sets.
>
> Note that the previous BFD patch is a prerequiste; otherwise, we might
> get link failures due to unresolved symbols for cross GDB builds.
This looks very good to me.
--
Pedro Alves
next prev parent reply other threads:[~2011-11-09 16:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-21 18:57 Ulrich Weigand
2011-11-09 16:05 ` Pedro Alves [this message]
2011-11-09 18:19 ` Ulrich Weigand
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=201111091605.12123.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.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