From: Andrew Cagney <ac131313@redhat.com>
To: Kris Warkentin <kewarken@qnx.com>
Cc: "Gdb-Patches@Sources.Redhat.Com" <gdb-patches@sources.redhat.com>
Subject: Re: [patch] create sniffer for Neutrino core files
Date: Mon, 04 Aug 2003 14:17:00 -0000 [thread overview]
Message-ID: <3F2E6B0E.8010209@redhat.com> (raw)
In-Reply-To: <0d4901c34720$aaa71cb0$0202040a@catdog>
> This is leading in the direction of being able to sniff out QNX binaries
> without adding anything to our file format. Earlier we were considering
> adding a .note.qnxnto.ident to our binaries so that gdb could recognize and
> use the appropriate OSABI. Our architect doesn't like adding to/changing
> our binaries so he wants me to try to do it this way. The theory is, we
> KNOW if we're attached to a remote Neutrino machine. We KNOW if we've got a
> Neutrino core file. We KNOW if we're running on native Neutrino.
>
> Given all that we know, we shouldn't need to do anything to our binaries but
> rather just have an osabi sniffer that TELLS gdb that it should use
> GDB_OSABI_QNXNTO. This patch will tell us that we've got a core file so now
> all I need is a sniffer for the other two.
>
> Anyone see any problems with this?
Having just posted something similar to i386, no definitly not.
Andrew
> ChangeLog:
>
> * nto-tdep.c (nto_core_sniffer): New function to detect QNX core file.
> (regset_core_fns): Use nto_core_sniffer instead of default_core_sniffer.
>
> $ cvs diff -u nto-tdep.c
> Index: nto-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/nto-tdep.c,v
> retrieving revision 1.6
> diff -u -r1.6 nto-tdep.c
> --- nto-tdep.c 17 Jun 2003 18:30:48 -0000 1.6
> +++ nto-tdep.c 10 Jul 2003 20:10:58 -0000
> @@ -293,12 +293,20 @@
> /* Do nothing. */
> }
>
> +static int
> +nto_core_sniffer(struct core_fns *our_fns, bfd *abfd)
> +{
> + if (bfd_get_section_by_name (abfd, ".qnx_core_info"))
> + return 1;
> + return default_core_sniffer(our_fns, abfd);
> +}
> +
> /* Register that we are able to handle ELF file formats using standard
> procfs "regset" structures. */
> static struct core_fns regset_core_fns = {
> bfd_target_elf_flavour, /* core_flavour */
> default_check_format, /* check_format */
> - default_core_sniffer, /* core_sniffer */
> + nto_core_sniffer, /* core_sniffer */
> fetch_core_registers, /* core_read_registers */
> NULL /* next */
> };
>
>
>
prev parent reply other threads:[~2003-08-04 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-10 20:19 Kris Warkentin
2003-08-04 14:17 ` Andrew Cagney [this message]
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=3F2E6B0E.8010209@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kewarken@qnx.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